Show that this function is not increasing on any interval containing $0$: $$f(x) = \begin{cases}x + 2x^2\sin\left(\frac1x\right),& x\ne 0\\0,& x = 0\;.\end{cases}$$
I am having a tough time answering this question in a rigorous mathematical way, here is what I have tried:
I have proved in a previous part of this question that $f\,'(0) = 1$.
The derivative when $x\ne 0$ is, 
$$f\,'(x) = 1+4x\sin\left(\frac1x\right)−2\cos\left(\frac1x\right)\;.$$
I have $$\lim\limits_{x\to 0} f\,'(x) = 1 - 2\cos\left(\frac1x\right)\;,$$ which oscillates between $3$ & $-1$.
Since $f\,'(x)$ containing $0$, is not continuous, it cannot be increasing on the interval. Am I on the right track here?
Thanks in advance!
 A: (Note that the second term in your derivative for non-zero $x$ should be $2x\sin(1/x)$, and the third should be $-\cos(1/x)$, unless the second term in the function is supposed to be $2x^2\sin(1/x)$.)
You’re working too hard: in order to show that $f$ is not increasing in any interval containing $0$, it suffices to show that in any interval containing $0$ there is a point $x$ such that $f\,'(x)<0$.
A: You're on the right track, but the equation $$\lim\limits_{x\to 0} f\,'(x) = 1 - 2\cos\left(\frac1x\right)$$
doesn't make sense as it stands. It almost makes sens, though, in that the omitted term goes to zero as $x\to0$. So it is definitely true that the derivative oscillates infinitely much near the origin, with upper and lower bounds that approach $3$ and $-1$. For your purposes, though, you just need a sequence of points approaching $0$ where the derivative is negative. Good candidates for such a sequence are points $x$ where $\cos(1/x)=-1$. I trust you can take it from there on your own.
A: You are correct till the part you compute your first derivative. I assume that the function is $$ f(x) = \begin{cases}  x + 2x^2\sin(1/x) & \text{ for }x  \neq  0 \\ 0 & \text{ for } x = 0\end{cases} $$so that the derivative is given by $$ f'(x) = \begin{cases} 1 + 4x \sin(1/x) - 2 \cos(1/x) & x \neq 0\\ 1 & x = 0\end{cases}$$
Consider any interval containing $0$ i.e say $(-a,b)$ where $a,b \in \mathbb{R}^+$. By archimedean property, you can find $n \in \mathbb{N}$, such that $$\dfrac1{n \pi} \in (-a,b).$$
Note that since $\dfrac1{(n+1) \pi} < \dfrac1{n \pi}$, we have that $$\dfrac1{(n+1) \pi} \in (-a,b).$$
Now look at the derivatives at $\dfrac1{n \pi}$ and $\dfrac1{(n+1) \pi}$ and conclude what you want.
