I have been asked to determine in which points $x \in \mathbb R$,
$f: \mathbb R \to \mathbb R, x \to (\ln(1+|x|))^2$ is differentiable.
I know for $x>0$ $f(x)$ is differentiable according to the chain rule, and the same goes for $x<0$. In my attempt to show differentiability (or lack thereof) in $0$ I got stuck.
$\lim_{x \rightarrow 0^{+}} \frac{(\ln(1+x))^2-f(0)}{x}$ = $\lim_{x \rightarrow 0^{+}} \frac{(\ln(1+x))^2}{x}$. My first guess now would be l'Hôpital but I do not have the $\frac{\infty}{\infty} or \frac{0}{0}$ condition. Any suggestions on how I could proceed? Or, is it more appropriate to use the $h \to 0$ limit definition here? Generally speaking I am a bit perplexed why we use two definitions, or not even that - just alternatives - for differentiability , namely $\lim_{h \rightarrow 0} \frac{f(x+h)-f(x)}{h}$ and $\lim_{x \rightarrow 0}\frac{f(x)-f(0)}{x-0}$. Is one more suitable than the other in certain circumstances, or is the use of either equivalently suitable? Your help is greatly appreciated.
There are at least two ways to do this. First, you can use the difference quotient definition as you've been doing. You've done the right-hand limit correctly, but when you say you don't have the form $\frac{0}{0},$ you're mistaken. I think you're being misled by the $f(0)$ term, but notice that unless $f(0)=0,$ the function is not continuous at zero, and surely not differentiable there. One application of Hopital's rule gives 0. Then you can compute the left-hand limit in the same way, remembering to put $-x$ in for $|x|$. This also turns out to be $0$, so the answer is yes, the function is differentiable and $f'(0)=0.$
The second way to do it is to differentiate $f$ in $(0,\infty)$ and $(-\infty, 0)$ and observe that both derivates approach $0$ at $0$. It is a consequence of the Mean Value Theorem that under these circumstances, $f$ is continuously differentiable at $0$.