# Having trouble while trying to prove the differentiabilty of $x^2\sin{\left(\frac 1x\right)}$

Let a function be defined as:

$$f(x)=x^2\sin{\left(\frac 1x\right)}$$ for $$x \neq 0$$ and $$f(x)=0$$ for $$x=0$$

I'm trying to prove that f is differentiable at 0 using the definition of derivative. However in the process of doing this I was stopped by this limit:

$$\lim_{h \to 0} \frac{\sin\left({\frac{1}{x+h}}\right)-\sin\left({\frac{1}{x}}\right)}{h}$$

Is it possible to solve this limit question without using l'Hopital's rule?

• Uhm... weren't you trying to show differentibility at $0$? Where does all that stuff com from? – Saucy O'Path Apr 22 at 21:04

You don't have to compute that limit. Indeed $$f'(0)=\lim_{h\to0}\frac{f(0+h)-f(0)}{h}=\lim_{h\to 0}\frac{f(h)}{h}=\lim_{h\to 0}h\sin(1/h)$$ which you can compute using the squeeze theorem since $$0\leq |h\sin(1/h)|\leq |h|.$$
$$\left|\frac{x^2\sin\left(\frac1x\right)-0}{x-0}\right|\le x$$
Hint: Use that $$\sin(x)-\sin(y)=2 \sin \left(\frac{x}{2}-\frac{y}{2}\right) \cos \left(\frac{x}{2}+\frac{y}{2}\right)$$