Local minima of $f(x) = \begin{cases} 5 x^2 (2 - \sin \tfrac{1}{x}) & \text{ if } x \neq 0 \\ 0 & \text{ if } x = 0 \end{cases}$ dense near $0$ Consider
$$f(x) = 
\begin{cases} 
5 x^2 (2 - \sin \tfrac{1}{x}) & \text{ if } x \neq 0 \\ 
0 & \text{ if } x = 0.   
\end{cases} 
$$
For any given $\delta > 0$ it is very clear from the graph of $f$ that there is at least one (in fact infinitely many) point $x_\delta$ in $(-\delta, \delta)$ at which $f'(x_\delta) = 0$. Somehow, I am not getting how to mathematically prove this. Can anyone help me out?

 A: Just look at the right side of zero for simplicity for the moment.
The derivative is $10x(2-\sin(1/x))+5\cos(1/x)$. $2-\sin(1/x) \in [1,3]$ so the first term is in $[10x,30x]$.
You have a sequence where $\cos(1/x)=1$, namely $x_k=\frac{1}{2k\pi},k=1,2,\dots$. You have a sequence where $\cos(1/x)=-1$, namely $y_k=\frac{1}{(2k+1)\pi},k=1,2,\dots$. This means that for each $k$ such that $30y_k<1$, $f'$ changes sign on the interval $[y_k,x_k]$ at least once, so a zero exists on this interval by the intermediate value theorem. Moreover the intervals are disjoint if you remove one endpoint or the other, so you're actually finding a different zero each time, not the same one over and over.
You can imitate this on the left side of zero.
Technically, this is just showing there are infinitely many zeros of the derivative. To finish you would need to do something similar to estimate the second derivative at each zero. I'll just sketch the idea. Note that the second derivative is $10(2-\sin(1/x))+10 \cos(1/x)/x+5 \sin(1/x)/x^2$. Now for small enough $x$, $\cos(1/x)$ is actually small at a zero of the derivative (no more than $6x$ in absolute value), so that middle term is no more than $60$ in absolute value, leaving you with a bounded term plus $\sin(1/x)(5/x^2-10)$. Since $\cos(1/x)$ is small, $\sin(1/x)$ is not small, so this whole term is large for $x$ small enough. So all but perhaps a few of the zeros are guaranteed to be extrema just from this analysis.
