Prove that if $f$ is differentiable at 0, then the function $f(|x|)$ is differentiable at 0 if and only if $f'(0)=0$ I have the following exercise:
Prove that if $f$ is differentiable at 0, then the function $f(|x|)$ is differentiable at 0 if and only if $f'(0)=0$
This problem is somewhat similar and the accepted solution seems correct to me. But I would like to know if there is a different way to solve it, also, the difference to the exercise here is that we do not know that $f(0) = 0$.
I hope you can help me, thank you.

Let $g(x) = f(|x|)$.
If $f'(0) = 0$ then ${f(|x|) - f(0) \over |x|} \to 0$ so  ${f(|x|) - f(0) \over x} \to 0$ and hence $g$ is differentiable at $x=0$ (and $g'(0) = 0$).
If $g$ is differentiable at $x=0$ then ${f(|x|) - f(0) \over x} \to g'(0)$ and ${f(|x|) - f(0) \over -x} \to g'(0)$ and so $g'(0) = 0$. Taking the limit with $x>0$ shows that
$f'(0) = g'(0) = 0$.
