I am working through a bank of previous exams and couldn't figure a problem out to my satisfaction.
Let $f(x) : \mathbb{R} \to \mathbb{R}\,$ be a continuous function.
- Show that $f$ can have at most countably many strict local maxima.
- Assume that $f$ is not monotone on any interval. Then show that the local maxima of $f$ are dense in $\mathbb{R}$.