Function with local extreme value at a point but not monotone in any of its neighborhood

derivativesfunctionsmaxima-minimareal-analysis

In a question a function is given as-

$f(x)=\begin{cases}x^4(2+sin(\frac{1}{x})) & \text{if x$\neq$ 0} \\[2ex] 0 & \text{if x=0}\end{cases}$

In this function, $f'(0)$ comes out to be 0 (and f has minima at 0) and in every neighborhood of 0, $f'(x)$ has both positive and negative values which implies that in every neighborhood of 0, $f(x)$ is not monotonic.
It is easy to prove.

If $f$ has an extreme value at zero then there should $\exists$ a neighborhood in the left such that $f$ is monotonic decreasing to $f(0)$ and a neighborhood at right such that $f$ increases monotonic to right from $f(0)$ or vice versa if the function is continuous.

But this example suggest that $\not\exists$ any neighbourhood of 0 in which function becomes monotone.

Calculations suggest that $f$ has minima at 0 and $f'(x)$ changes its sign in every neighborhood of $0$. But why $f$ has a minimum at 0? It seems somewhat surprising to me.

Best Answer

Maybe a picture will help. Your function does indeed have a minimum at $0$, in fact it is always between $x^4$ and $3 x^4$, but the graph is so wiggly as $x \to 0$ that there are no intervals $(0,\epsilon)$ or $(-\epsilon, 0)$ on which it is monotonic.

enter image description here