$$g(x)=\begin{cases} x+2x^2\sin\left(\frac{1}{x}\right)&\text{ if }x\neq0\\\ 0&\text{ if }x=0 \end{cases}$$ Show that there is a sequence $\{x_n\}$ with $\{x_n\} \to 0$ as $n$ approaches infinity, such that $g'(x_n)=0\ \forall n$ but $g'(0) \ne 0$.
I calculated $$g'(x)=4x\sin\left(\frac{1}{x}\right)-2\cos\left(\frac{1}{x}\right)+1 ,\text{ if }x\neq0$$
I tried to construct a sequence where $\{x_n\}=\dfrac 1 {2\pi n}$ so that $g'(x_n)=0$, but I'm not sure if this is the right way to prove the question. If this is not right, how can I go about showing it?