# Differentiable but not continuously differentiable.

Given $f: \mathbb{R} \rightarrow \mathbb{R}$ defined as $$f(x)=\left\{\begin{array}{cc}x^2\sin\left(\frac{1}{x}\right)&,x\neq 0\\ 0&,x=0\end{array}\right\}.$$ I am trying to prove $f$ is differentiable at $x=0$ but not continuously differentiable there.

• Outline: use the definition of derivative to compute $f'(0)$, then compute $f'(x)$ for $x \neq 0$ and show $f'(x) \not\to 0$ as $x \to 0$. Commented Aug 10, 2015 at 3:13
• In other words using the definition $f ' (0) = \lim_{x \to 0} \frac{f(x)-f(0) }{x-0}$ , we have to show that $\lim_{x \to 0} \frac{x^2 \sin\left( \frac 1 x \right) - 0 }{x-0}$ exists, and it does - it equals to zero.
– john
Commented Jan 28, 2021 at 6:31

First, use normal differentiation rules to show that if $x\ne0$ then $$f'(x)=2x\sin\Bigl(\frac1x\Bigr)-\cos\Bigl(\frac1x\Bigr)\ .\tag{*}$$ Then use the definition of the derivative to find $f'(0)$. You should get $$f'(0)=0\ .$$ Then show that $f'(x)$ has no limit as $x\to0$, so $f'$ is not continuous at $0$. (Hint: the first term in $(*)$ tends to $0$; what happens to the second?)