Is $f'$ continuous at $0$ if $f(x)=x^2\sin(1/x)$ Let $f(x)=x^2\sin(1/x)$ for $x≠ 0$ and $f(0)=0$ for $x=0$.
Is $f'$ continuous at $0$?
My attempt: $f'(x)=2x\sin(1/x)-\cos(1/x)$. Since when $x$ goes to $0$, the limit of $\cos(1/x)$ does not exist, it is not continuous. But I'm not sure since we did define $f(0)=0$...
 A: Your argument is correct: for $x\ne 0$ the derivative is $$f\;'(x)=2x\sin\left(\frac1x\right)-\cos\left(\frac1x\right)\;,$$ and $$\lim_{x\to 0}\;f\;'(x) = \lim_{x\to 0} \left(2x\sin\left(\frac1x\right)-\cos\left(\frac1x\right)\right)=-\lim_{x\to 0}\;\cos\left(\frac1x\right)$$ does not exist, so it cannot equal $f\;'(0)$. The latter of course, is $$\lim_{h\to 0}\frac{f(h)-f(0)}{h}=\lim_{h\to 0}\;h\sin\left(\frac1h\right)=0\;,$$ but you don’t need that to determine that $f\;'$ is not continuous at $0$.
A: You are correct: $f'$ is not continuous at $0$. Nevertheless, $f$ is differentiable at $0$, with $f'(0) = 0$. This doesn't come from formally differentiating the expression for $f$, but by working directly from the definition of differentiability.  
Incidentally, although the derivative of a differentiable function doesn't have to be continuous, it does have to satisfy the intermediate value property: for every $a$ and $b$, if $c$ lies between $f'(a)$ and $f'(b)$ then there exists $x$ between $a$ and $b$ such that $f'(x) = c$.
