# Finding if exist the derivative at $x=0$

$f(x) = \left\{ \begin{array}{ll} \ln(\sin(x))-\ln(x) & \mbox{if } 0<x<\pi \\ 0 \\ \ln(-\sin(x)) - \ln(-x) & \mbox{if } -\pi<x<0 \end{array} \right.$

The function is continuous, I've already checked that out. My problem is that I can not find whether the derivative exists at $x=0$.

Using the derivative by definition i get $$\lim_{h\to 0} \frac{\ln(\sin(h))-\ln(h)}{h}$$ and find that difficult to resolve. Thanks

HINT

Note that

$$\frac{\ln(\sin h)-\ln h}{h}=\frac{\ln\left(\frac{\sin h}{h}\right)}{h}=\frac{\ln\left(1-\frac{h^2}6+o(h^2)\right)}{-\frac{h^2}6+o(h^2)}\frac{-\frac{h^2}6 +o(h^2)}{h}$$

and recall that as $x\to 0$ by standard limit $\frac{\log(1+x)}x \to 1$.

• Is that the first term expansion of the Taylor Series? What happens with the error? or is it ok to not include it in the expansion ? – Karl May 7 '18 at 21:51
• @Karl Yes precisely, I gave it as a hint, I can add if you have doubts on that. – gimusi May 7 '18 at 21:52
• @Karl Now it is in a complete form with the remainder in Peano's form. – gimusi May 7 '18 at 21:56
• Should not be $1-\frac{h^2}6+o(h^2)$ ? – Karl May 7 '18 at 22:08
• ops...good point! yes of course, I fix – gimusi May 7 '18 at 22:11

Justify the following steps:

$$\lim_{h\to0}\frac{\log\frac{\sin h}h}{h}\stackrel{\text{L'Hospital}}=\lim_{h\to0}\frac h{\sin h}\cdot\frac{h\cos h-\sin h}{h^2}=$$

$$=\lim_{h\to0}\frac{h\cos h-\sin h}{h\sin h}\stackrel{\text{L'Hospital}}=\lim_{h\to0}-\frac{h\sin h}{\sin h+h\cos h}=$$

$$\stackrel{\text{L'Hospital}}=\lim_{h\to0}\frac{\sin h+h\cos h}{2\cos h-h\sin h}=\frac0{2-0}=0$$

• Nice application of l'Hopital, not much effective in that case but useful in case of a lack of knowledge of Taylor's expansion. – gimusi May 7 '18 at 22:04

Since you have proved that $f$ is continuous at $0$, you can try and see whether $$\lim_{x\to0}f'(x)$$ exists finite: in this case it will be the derivative at $0$ (possibly the most relevant theoretical application of l’Hôpital).

Note that $f$ is obviously differentiable for $x\ne0$, with $$f'(x)=\dfrac{\cos x}{\sin x}-\dfrac{1}{x}$$ Now the limit is easier: $$\lim_{x\to0}\frac{x\cos x-\sin x}{x\sin x}= \lim_{x\to0}\frac{x\cos x-\sin x}{x^2}= \lim_{x\to0}\frac{-x\sin x}{2x}=0$$

• That's also a very nice alternative! – gimusi May 7 '18 at 22:30