# For the function $f(x) = x^2 \sin(1/x)$ for $x \ne 0\,$and $f(x)= 0$ if $x=0$, show that $f$ does not have local maximum or minimum in $0$.

We have $f(x) = x^2 \sin(\frac{1}{x})$ for $x$ does not equal $0$ and $f(x)= 0$ if x equals $0$.

I know that the function is continuous for all $x$ by using the squeeze theorem. I also know that in $x=0$, the derivative is equal to $0$, again because of the squeeze theorem. The derivative is equal to $2x\sin(\frac{1}{x})-\cos(\frac{1}{x})$, which is not a continuous function.

I have to show that in the domain $[0,\infty)$ the endpoint $0$ is neither a local maximum nor a local minimum, which seems counter-intuitive.

I know $f'(0)=0$ and that $0$ is an endpoint. In my opinion, $0$ should be either a local minimum or local maximum and I do not know where to start to show that this is not the case.

• You just need to show that there are arbitrarily small $x, y > 0$ with $f(x) < 0 < f(y)$. – Daniel Fischer Sep 30 '13 at 16:00
• I know that for sin(1/x) the following holds: -1=< sin(1/x) =< 1, but I do not know how to continue to prove your statement. – Ruben Sep 30 '13 at 16:09

If you take $$x_k=\frac{1}{\frac{\pi}{2}+2k\pi}$$ and $$y_k=\frac{1}{\frac{3}{2}\pi+2k\pi}$$ then $f(x_k) = x_k^2 > 0$ and $f(y_k) = y_k^2 \cdot (-1) < 0$ and $\lim_{k\to\infty} x_k = \lim_{k\to\infty} y_k = 0$. It means that in any neighborhood of $0$, you can find $x_k$ and $y_k$ for some $k>0$ and $f(x_k) > 0 > f(y_k)$.
• For those of us who were struggling to see the inspiration behind these particular choice of sequences: it's because $\frac{\pi}{2} + 2k\pi = \frac{\pi}{2}(4n+1)$ which makes sine be equal to 1 $\forall k$. Similarly, $\frac{3}{2} \pi + 2k\pi = \frac{\pi}{2}(4n+3)$ which makes sine be equal to -1 $\forall k$. – alwaysiamcaesar May 21 at 7:06
Find $x,y \ne 0$ such that : $f(x) > 0$ and $f(y) < 0$, or vice versa. hint : $\sin(-x) = -\sin(x)$