For $f : [0;1] \to \mathbb{R}$, let $M\_f := \{x \in [0;1] \mid f(x)$ is a local strict maximum of $f\}$. It is easy to see that for any $f$, $M\_f$ is at most countable. It is also easy to see that there can be a continuous $f$ such that $M\_f$ is infinite. 
The first question you can ask is the following: is there a continuous $f$ such that $M\_f$ is dense in $[0;1]$? 
To answer this, one can build an ad hoc function; the construction is a bit nasty, I leave the details to those that want to see for themselves, but a nicer solution seems to be the following: show that a continuous function that is nowhere differentiable (e.g., the Weierstrass function) has a dense $M\_f$. 
We can think of this generalization; any solution will most likely be nowhere differentiable. 


My question is the following: 



> 
> Is it true that if $f$ is continuous and nowhere differentiable, then $M\_f$ is dense in $[0;1]$? 
> 
> 
> 


What I've tried so far: it is a known result that if a continuous function is monotonous on some interval $I$, then it is differentiable almost everywhere on $I$, so the idea would be to show that a function such that $M\_f$ isn't dense has to be monotonous on some interval. So assume $M\_f$ is not dense, then find an interval $I$ such that $M\_f \cap I =\emptyset$, and then try to work on this interval, knowing that local maxima on this interval have to be non-strict, i.e., for any interval $J\subset I$, if $x\in J$ and $f(x)$ is a maximum of $f$ on $J$ then there is some $y\in J$ such that $f(y)=f(x)$.
This approach has been unsuccessful so far, but I think there might be something to do with the theory of bounded variations; I haven't tried this yet.
Any ideas, counterexamples?



Density of the max set of a non-differentiable function
The conjecture as stated, for *strict* maxima, is not correct. It becomes true, though, if possibly non-strict maxima are considered also.


All this and more is discussed in [Posey, Vaughan, Extrema and nowhere differentiable functions, Rocky Mountain J. Math. (1986).](https://projecteuclid.org/download/pdf_1/euclid.rmjm/1250126725)


