# Let $f(x) = x^2 \sin (1/x^2),\,x\ne 0,$ and $f(0)=0.$ Prove $f$ is differentiable on $\mathbb R$

Let $f(x) = x^2 \sin (1/x^2),\,x\ne 0,$ and $f(0)=0.$ Prove $f$ is differentiable on $\mathbb R$

So $f'(x)=2x\sin 1/x^2 -\frac{2\cos 1/x^2}{x}$ when $x\ne 0$, but what about at $0$? My prof in the assignment solutions just says "$f'(0) = 0$." (though his solutions tend to be quite abbreviated). Am I missing something obvious? Is he skipping steps or can you go right from $f(0) = 0$ to $f'(0)=0$?

-
You can't go from $f(0) = 0$ to $f'(0) = 0$, for example consider $f(x) = x$. – Yoni Rozenshein Dec 12 '12 at 8:59

Hint: We need to go back to the definition of the derivative. So we want to calculate $$\lim_{h\to 0}\frac{h^2\sin(1/h^2)-0}{h}.$$ There is some cancellation, and we need $$\lim_{h\to 0}h\sin(1/h^2).$$ Now use the fact that $|\sin t|\le 1$.
Remark: Examining the derivative when $x\ne 0$ will not do the job. It turns out that the derivative is not continuous at $0$, so its values near $0$ do not give information about its value at $0$.
Oh, so the $f(0)=0$ lets you put 0 instead of $x^2\sin 1/x^2$ in the derivative definition allowing you to evaluate it. Right? – fhyve Dec 12 '12 at 6:56
@fhyve: Yes, that's why in the displayed formula for the definition of the derivative, I put in the "useless" $-{}0$. That's the $f(0)$. – André Nicolas Dec 12 '12 at 7:15