# Is there an analytic function which is not monotone on any interval?

I am in search of a an analytic function $f:\mathbb{R} \to \mathbb{R}$ which is not monotone on any nonempty open interval. Does one exist, or is there a proof that no such function exists?

If there does not exist such a function, is there an example of an infinitely differentiable function which is not monotone on any interval?

-
Consider any nonconstant $C^1$ function $f$. Without loss of generality, choose any $x$ such that $f'(x) = \delta > 0$. Now, what can you say about $f'$ in a small (enough) interval around $x$? Conclusion? –  cardinal Nov 20 '11 at 1:44

If $f$ is continuously differentiable, so in particular if it is twice differentiable, then $\{x:f'(x)>0\}$ and $\{x:f'(x)<0\}$ are open, and unless $f$ is constant at least one of the sets is nonempty. On an open interval in one of these sets, $f$ is monotone.
Oh, so if a function is twice differentiable at a point, then the first derivative must be continuous at that point, and assuming $f'(x)>0$ we may find $\delta>0$ so that $f'(y)>0$ for all $y \in (x-\delta,x+\delta)$, then on this interval $f$ must be increasing. –  nullUser Nov 20 '11 at 4:25