Originally Posted by

**tonio** There's a confusion here, me thinks: it's g'(x) which isn't continuous at x = 0. Of course g is cont. at x=0 since, as shown, it is differentiable there.

Now, as the OP wrote, $\displaystyle g'(x)=2x\sin \frac{1}{x}-\cos \frac{1}{x}$ , and it's easy to see the limit of this when x approaches zero doesn't exists. For example, one can make $\displaystyle x\rightarrow 0$ through the points $\displaystyle x_n=\frac{1}{2n\pi}\,,\,n\in \mathbb{N}$ and then through $\displaystyle y_n=\frac{1}{(2n-1)\pi}\,,\,n\in \mathbb{N}$ , and we get two different results.

Tonio