Multiple choice exercise on $f(x)= \frac {\sin x}{|x|+ \cos x}$

A is true answer

By definition of the derivative $$f'(0)=\lim_{h\to0}\frac{\frac{\sin h}{|h|+\cos h} - \frac{\sin 0}{0+1} }h= \lim_{h\to0}\frac{\sin h}{h(|h|+\cos h)} $$ Note that (using L'Hospital and then substitution) $$ \lim_{h\to0^+}\frac{\sin h}{h(|h|+\cos h)}=\lim_{h\to0^+}\frac{\sin h}{h(h+\cos h)}=\lim_{h\to0^+}\frac{\cosh}{2h+\cos h - h\sinh)}=1 $$

Verify by yourself that also $$ \lim_{h\to0^-}\frac{\sin h}{h(|h|+\cos h)}= \lim_{h\to0^-}\frac{\sin h}{h(-h+\cos h)}=1 $$

Conclude that $f'(0)=1$


So you got that $f'(0)$ is defined, to show $f'$ is continuous at $x=0$ one need to show for example that $$\lim_{x\to0} f'(x)=f'(0)$$

$$\lim_{x\to0} f'(x) = \lim_{x\to0}\lim_{h\to0}\frac{\frac{\sin x+h}{|x+h|+\cos (x+h)} - \frac{\sin x}{|x|+\cos x} }h= \lim_{h\to0}\lim_{x\to0}\frac{\frac{\sin x+h}{|x+h|+\cos (x+h)} - \frac{\sin x}{|x|+\cos x} }h=f'(0) $$ The switching the order of limits is allowed when the function is uniformly continuous. A continuous function on a compact set is uniformly continuous, so everything is fine here, but I guess that you won't like this sort of answer:)


Using $x\ne0$: $|x|'=\mathrm{sgn}(x)$ where $$\mathrm{sgn}(x) = \begin{cases}1&x>0\\0&x=0\\-1&x<0\end{cases}$$ $$f'(x)=\frac{\cos (x)}{\left| x\right| +\cos (x)}-\frac{\sin (x) (\mathrm{sgn}(x)-\sin (x))}{(\left| x\right| +\cos (x))^2},\quad x\ne0$$

$$\lim_{x\to0^+} f'(x) = \frac{1}{0 +1}-\frac{0 (0-0)}{(0 +1)^2}=1$$

Similarly $$\lim_{x\to0^-} f'(x) = 1$$ Conclude $$\lim_{x\to0} f'(x)=f'(0)$$ and you done.


I feel you are looking for a descriptive answer, still leaving it here as an answer since it explains your doubt.

From graph:

enter image description here

Where green is $f$, blue is $f'$, orange is $f''$. $f'$ is clearly continuous but not differentiable at $0$


As per the discussion with @Quintic in the above comments,

$f'(x)=\frac {1+|x|\cos x-\frac {x}{|x|} \sin x}{(|x|+\cos x)^2}$.

Now, $\lim_{h \to 0} f'(0+h)=\lim_{h \to 0} \frac {1+|h|\cos h-\frac {h}{|h|}\sin h}{(|h|+\cos h)^2}=\lim_{h \to 0}\frac {1+h\cos h-\sin h}{(h+\cos h)^2}$. (Where $h \gt 0$)

$\Rightarrow \lim_{h\to 0} f'(0+h)=\frac {1+0-0}{(0+1)^2}=1.$

Similarly, $\lim_{h\to 0} f'(0-h)=\lim_{h\to 0} \frac {1+h\cos h-\sin h}{(h+\cos h)^2}$ (Where $h \gt 0)$

$\Rightarrow \lim_{h\to 0} f'(0-h)=1$.

Hence $\lim_{h\to 0} f'(0+h)=\lim_{h\to 0} f'(0-h) \Rightarrow$ $f'$ is continuous at $x=0$.