2 Answers for Derivative of $x^2 \sin 1/x$ Derivative of $x^2\sin(1/x)$ : 
if we use the derivative rules to take the derivative of this function we conclude that It is not defined at x =0,
but if we use the derivative definition (lim x -> a), we get this:
$$x\sin(1/x)$$
which has a derivative of 1 at 0. 
Which is the answer? I mean obviously the formal defintion is right, but why does this happen?

Your application of the derivative definition is mistaken. We do not get $x \sin \frac{1}{x}$. I could show you where you went wrong if you showed me how you did it. It should be $$2x \sin \frac{1}{x}-\cos \frac{1}{x}$$
So your first answer is correct. The derivative is undefined at $x=0$. 
