# Paradox: Is the derivative of this function continuous at $x=0$?

\begin{equation} h(x)= \begin{cases} x^2 \sin(\frac{1}{x})&\text{ if } x\neq 0\\ 0&\text{ if } x=0 \end{cases} \end{equation} Is the derivative of $h(x)$ continuous at $x = 0$?

How about the derivative of $k(x) = xh(x)$?

When I tried to differentiate it directly, the $\cos(1/x)$ in the result suggests that the limit of $h'(x)$ when $x\rightarrow 0$ does not exist.

However, when I use the definition to calculate the derivative, it shows that the derivative is $0$ when $x\rightarrow0$.

Which one is correct?

• This means that the function is differentiable but not continuous differentiable. – Jimmy R. Feb 15 '16 at 12:13

Both are. For $x \ne 0$, we have $$h'(x) = 2x \sin\frac 1x - \cos \frac 1x$$ so $\lim_{x\to0} h'(x)$ does not exist. On the other hand $$\lim_{x\to 0}\frac{h(x) - h(0)}x = \lim_{x\to 0 } x\sin \frac 1x = 0$$ that is $h'(0) = 0$. So $h$ is differentiable with $$h'(x) = \begin{cases} 2x \sin \frac 1x - \cos \frac 1x, & x \ne 0\\ 0 & x =0 \end{cases}$$ which is not continuous at $0$.