Why is this function continuous but not differentiable? I have a true and false on my practice exam about this function being continuous but not differentiable. The answer is true, but I don't understand how it is not differentiable. 
$$
f(x) =
\begin{cases}
x\sin(1/x)  &amp; : \text{if }x \neq 0 \\
0 &amp; : \text{if }x=0
\end{cases}
$$

I know that when $x$ doesn't equal $0$, that it is continuous and differentiable since $x\sin(1/x)$ is composed of 2 continuous and differentiable functions.  

I also found it to be continuous when $x=0$. 
For it being differentiable at $x=0$, I took $\lim_{x\to 0}\frac{f(x)-0}{x-0}$ and got $\lim_{x\to 0}\frac{x\sin x}{x}$ and then the limit equals $0$. Does this not show it's differentiable? what am I doing wrong?
In the calculation of the limit you have substituted $r=1/x.$ The limit is not $\frac{r\sin r}r$ as $r$ goes to $0$ but (the same expression) as $r$ goes to $\pm\infty.$
Because $$sin (1/x)$$ is oscillating near 0 and the limit doesn't exist...
And just use the fact that 
 $$x^msin(1/x^n)$$ is differentiable iff $$m  &gt;1$$ .ofcourse the interval of consideration is $$[0,1]$$