Is a $C^\infty$ function local monotone at a minimum?

The following is a modified exercise from an analysis 1 book.

Is there a function $f:\mathbb{R} \rightarrow \mathbb{R}$ with:
i) $f$ has in $0$ a strict local and global minimum.
ii) $f\in C^\infty$
iii) There is no $\varepsilon>0$ so that $f$ is monotone in $(-\varepsilon,0]$
iv) There is no $\varepsilon>0$ so that $f$ is monotone in $[0,\varepsilon)$

-

Yeah there is a function. $$f(x)=\left\{ \begin{array}{rl} \sin^2\left(\frac{1}{x}\right) e^{-(x^{-2})}+e^{-(x^{-4})} & x\neq 0\\ 0 & x=0\\ \end{array}\right.$$ It's obvious that the function is $C^\infty$, since $e^{-(x^{-4})}$ is strictly greater $0$ and the other term is greater equal $0$, $f$ must have a strict global and local minimum in $0$.
The monotonicity thing is a bit more technical, using $$a_n=\frac{1}{2\pi n} \quad b_n=\frac{1}{2\pi n + \frac{\pi}{2} }$$ with $a_n, b_n \rightarrow 0$ and $$a_n> b_n>a_{n-1}$$ for all $n$ (where the sequences are defined).$$f(a_n)=e^{-16\pi^4 n^4}$$ and $$f(b_n)=e^{-(2 \pi n+\frac{\pi}{2})^2}+e^{-(2\pi n+ \frac{\pi}{2})^4}$$ We see $f(b_n)>f(b_{n+1})$, but $f(a_n)< f(b_n)> f(a_{n-1})$. So the function can't be monotone on $[0,\varepsilon)$
asked Feb 15 at 16:46 answered Feb 15 at 16:46 Did you just made this question to share? Seems you already knew the answer to it before posting. – Pedro Tamaroff Mar 24 '13 at 20:34