Let $f(x):\mathbb{R}\to\mathbb{R}$ be a continuously differentiable function infinite times $(f\in C^\infty)$ such that for every $n\in\mathbb{N^+}$:
$$f^{(n)}(0)=0$$
Prove or disprove that if $f(x)$ is not constant at a neighborhood of $x=0$, then $x=0$ is an extremum of $f(x)$.
Because I don't know how to prove this, I tried to find a counterexample. However, the only function I could think of, which was not constant and could be manipulated to follow the requirements, is $f(x)=e^{-\frac{1}{x^2}}$. Problem is, of course, that $x=0$ is indeed an extremum (minimum) of the function.
I would glad to hear your opinions. Thank you!