# 006. Differentiability of Unknown Functions

#### Given a function $f(x)$ defined in the open interval $(-\frac{\pi}{2}, \frac{3\pi}{2})$ as below,

\begin{aligned} f(x) = \begin{cases} \; 2 \sin^3 x \quad &\left( -\cfrac{\pi}{2} < x < \cfrac{\pi}{4} \right) \\\\ \; \cos x \quad &\left( \cfrac{\pi}{4} \leq x < \cfrac{3\pi}{2} \right) \end{cases} \end{aligned}

#### for a real number $t$, draw the graph $g(t)$ which represents the number of real number $k$’s such that

(i) $-\cfrac{\pi}{2} < k < \cfrac{3\pi}{2}$

(ii) $\sqrt{ \vert f(x) - t \vert }$ is not differentiable at $x = k$

First, draw the graph of $f(x)$. Although $\sin x$ is convex in $(-\frac{\pi}{2}, 0)$ and concave in $(0, \frac{\pi}{2})$, it is suspicious for $2 \sin^3 x$ to do so because $\vert \sin x \vert \leq 1$. To check the convexity of $2 \sin^3 x$, the sign of its second-order function $6 \sin x (2 - 3 \sin^2 x)$ could be used. Since the sign of $f''(x)$ is changed near $x = 0$ from negative to positive, the convexity of $2 \sin^3 x$ is opposite to $\sin x$. Observing that $f(x)$ has the inflection point, the graph of $f(x)$ as below. Note that $f(x)$ has another inflection point in $(-\frac{\pi}{2}, 0)$.

Now, to draw the graph of $g(t)$, Knowing that the form of $\vert f(x) - t \vert$ usually has sharp points at the folded points which are not differentiable, $g(t)$ would be not continuous.

However, the unclear issue points are $t = -1, 0$. Looking first $t = 0$, it is unclear because $f(x)$ has the inflection point at $x = 0$. To check if $\sqrt{\vert 2 \sin^3 x \vert}$ is differentiable at $x = 0$, \begin{aligned} \lim_{x \to 0+} \left( \sqrt{2 \sin^3 x} \right)' &= \lim_{x \to 0+}\cfrac{6 \sin^2 x \cos x}{2 \sqrt{2 \sin^3 x}} = \lim_{x \to 0+} \cfrac{3 \sin^2 x \cos x}{\sqrt{2} \sin x \sqrt{\sin x}} = \lim_{x \to 0+} \cfrac{3 \sqrt{\sin x} \cos x}{\sqrt{2}} = 0 \\\\ \lim_{x \to 0-} \left( \sqrt{-2 \sin^3 x} \right)' &= \lim_{x \to 0-} \cfrac{-6 \sin^2 x \cos x}{2 \sqrt{-2 \sin^3 x}} = \lim_{x \to 0-} \cfrac{-3 \sin^2 x \cos x}{\sqrt{2} (-\sin x) \sqrt{-\sin x}} = \lim_{x \to 0-} \cfrac{3 \sqrt{-\sin x} \cos x}{\sqrt{2}} = 0 \end{aligned}

So, $\sqrt{\vert 2 \sin^3 x \vert}$ is differentiable at $x = 0$ and $g(0) = 2$. Now, looking into the case of $t = -1$, it is much harder to notice that $\sqrt{ \vert \cos x + 1 \vert }$ may not be differentiable since $\vert \cos x + 1 \vert$ is already smooth. But it could be. To check if $\sqrt{\vert \cos x + 1 \vert}$ is differentiable at $x = \pi$, \begin{aligned} \lim_{x \to \pi+} \left( \sqrt{\cos x + 1} \right)' &= \lim_{x \to \pi+} \cfrac{-\sin x}{2 \sqrt{\cos x + 1}} = \lim_{x \to \pi+} \cfrac{-\sin x \sqrt{1 - \cos x}}{2 \sqrt{\cos x + 1}\sqrt{1 - \cos x}}\\\\ &= \lim_{x \to \pi+} \cfrac{-\sin x \sqrt{1 - \cos x}}{2 \sqrt{\sin^2 x}} = \lim_{x \to \pi+} \cfrac{-\sin x \sqrt{1 - \cos x}}{-2 \sin x} = \cfrac{\sqrt{2}}{2} \\\\ \lim_{x \to \pi-} \left( \sqrt{\cos x + 1} \right)' &= \lim_{x \to \pi-} \cfrac{-\sin x}{2 \sqrt{\cos x + 1}} = \lim_{x \to \pi-} \cfrac{-\sin x \sqrt{1 - \cos x}}{2 \sqrt{\cos x + 1}\sqrt{1 - \cos x}}\\\\ &= \lim_{x \to \pi-} \cfrac{-\sin x \sqrt{1 - \cos x}}{2 \sqrt{\sin^2 x}} = \lim_{x \to \pi-} \cfrac{-\sin x \sqrt{1 - \cos x}}{2 \sin x} = \cfrac{-\sqrt{2}}{2} \end{aligned}

So, $\sqrt{\vert \cos x + 1\vert}$ is not differentiable at $x = \pi$ and $g(-1) = 3$.