Local Maxima with no monotonous neighborhood In undergraduate level calculus, we just learned about Rolle’s, Lagrange, and Fermat’s theorems.
We learned that a local maxima is a point (c), for which exists a delta such that every x in the c’s neighborhood (x-delta,x+delta) is smaller than c.
The professor said that contrast to all logical intuition, there exists a function in which there does not exist a monotonous neighborhood around either side of c. 
But he did not give a clue of how to construct one.
Does anyone have any idea what function could have this unique property?
**edit: How would you answer this question if f(x) is continuous?
Thank you
 A: One example is $f(x)=   |x||\sin \frac{1}{x}|$ for $x \neq0$ and $f(0)=0$. Also notice that $\lim_{x\rightarrow 0} f(x)=0$ so $f$ is continuous.
We observe that there is a sequence $\xi_n\rightarrow 0$ such that $f(\xi_n)=0$. Now, since $f$ is not always zero near the origin $f$ cannot possibly be monotonous in any left or right neighborhood of zero.
For an example where $0$ is a strict local min. we can take $f(x)=|x||\sin \frac{1}{x}|+x^2$. When $|\sin \frac{1}{x}|$ vanishes then $f(x)$ behaves as $x^2$, and when $|\sin \frac{1}{x}|$ is $1$ then $f(x)$ behaves as $|x|$ since $|x|>>x^2$, therefore $f$ has the desired property.
We can also take a look at the graph of $f$ to be convinced. 

A: This is the answer the professor provided when we asked him about it.
He said he was thinking about the family of functions which are Always Continuous, Nowhere Differentiable.
And because if a function is monotonous it must be differentiable, this function is nowhere monotonous.
I think it's beautiful and worth sharing.
Hope you enjoy it as well.
A concrete example of this function is:
The Weirstrass Function (https://en.wikipedia.org/wiki/Weierstrass_function)
It's function:
$$f(x)=\sum _{n=0}^{\infty }a^{n}\cos(b^{n}\pi x),$$
And it's graph:

