Use the limit definition to show that $g'(0)$ exists but $g'(0)\neq \lim_{x\to 0} g'(x)$, where
$g(x)=\begin{cases}x^2\sin\frac1x,&\text{when }x\neq0\\\\ 0,&\text{when }x=0\end{cases}$
I find that when $x\neq 0$, $g'(x)=2x \sin\dfrac1x-\cos\dfrac1x$.
My problem is that when I can't compute
$\lim_{x\to0}g'(x)=2\lim_{x\to0}x \sin\frac1x-\lim_{x\to0}\cos\frac1x$
question from Rogawski, Jon. Calculus Single Variable. 2nd ed. New York: W.H. Freeman, 2012. Print.