A topological space $X$ is a Baire space if a countable intersection of open dense sets is still dense in $X$. Then Baire category theorem consists in:

Theorem: (Baire) A complete metric space is a Baire space.

It is a surprising consequence of Baire category theorem that almost all continuous functions are nowhere differentiable in the following sense: Let $C([0,1])$ be the set of continuous functions $[0,1] \rightarrow \mathbb{R}$ endowed with the sup norm $|| \cdot || : f \mapsto \max\limits_{x \in [0,1]} |f(x)|$; then

Property: The set of continuous nowhere differentiable functions is dense in $C([0,1])$.

Proof. For all $n>0$, let

$U_n= \{ f \in C([0,1]) \mid \forall x \in [0,1], \exists y \in B(x,1/n), |f(x)-f(y)| >n |x-y| \}$.

For convenience, let $V_n$ be the complement of $U_n$ in $C([0,1])$. We first show that $U_n$ is open, or equivalently that $V_n$ is closed.

Let $(f_k)$ be a sequence in $V_n$ converging to some $f \in C([0,1])$. So for all $k>0$, there exists $x_k \in [0,1]$ such that for all $y \in B(x_k,1/n)$, $|f_k(x_k)-f_k(y)| \leq n|x_k-y|$. By compactness, there is a subsequence $(x_{\sigma(k)})$ converging to some $x \in [0,1]$. Let $y \in B(x,1/n)$; for $N>0$ large enough, $|x_{\sigma(k)}-y|<1/n$ and $|x_{\sigma(k)}-x|<1/n$ for all $k \geq N$. Then, for $k \geq N$:

$\begin{array}{lcl} |f(x)-f(y)| & \leq & |f(x)-f_{\sigma(k)}(x)| +|f_{\sigma(k)}(x)-f_{\sigma(k)}(x_{\sigma(k)})| \\ & & +|f_{\sigma(k)}(x_{\sigma(k)})-f_{\sigma(k)}(y)|+|f_{\sigma(k)}(y)-f(y)| \\ & \leq & 2 ||f-f_{\sigma(k)}||_{\infty}+n|x-x_{\sigma(k)}|+n|x_{\sigma(k)}-y| \end{array}$

When $k \rightarrow + \infty$, we get $|f(x)-f(y)| \leq n|x-y|$. Therefore, $f \in V_n$ hence $V_n$ is closed.

Then, we show that $U_n$ is dense in $C([0,1])$. Let $f \in C([0,1])$ and $\epsilon>0$. Because $f$ is uniformly continuous (according to Heine theorem), there exists $\delta>0$ such that for all $x,y \in [0,1]$, $|x-y|<\delta$ implies $|f(x)-f(y)|<\epsilon$. Now let $0=x_0 such that $|x_{i+1}-x_i|<\delta$ for $0 \leq i \leq n$.

Introduce $g \in C([0,1])$ piecewise linear such that $g(x_i)=f(x_i)$, $g'(x)>n$ and $|g(x)-f(x_i)|<\epsilon/2$ for all $x \in [x_i,x_{i+1}]$ and $0 \leq i \leq n+1$. In particular, $g \in U_n$. Let $x \in [0,1]$ and $0 \leq i \leq n$ such that $x \in [x_i,x_{i+1}]$. Then

$|f(x)-g(x)| \leq |f(x)-f(x_i)|+|g(x_i)-g(x)| \leq \epsilon$,

hence $||f-g||_{\infty} \leq \epsilon$. Therefore, $U_n$ is dence in $C([0,1])$.

Because $C([0,1])$ is a Banach space, $U:= \bigcap\limits_{n \geq 1} U_n$ is dense in $C([0,1])$ according to Baire theorem. However, any fonction of $U$ is nowhere differentiable, consequently the set of nowhere differentiable functions is itself dense in $C([0,1])$. $\square$

Corollary: The set of continuous nowhere locally monotonic functions is dense in $C([0,1])$.

A monotonic function being almost everywhere differentiable, a nowhere differentiable function is nowhere locally monotonic and the assertion follows from the property. However, we can give a direct proof using Baire category theorem:

Sketch of proof. For $p,q \in \mathbb{Q}$ with $p, let $I_{p,q}= \{f \in C([0,1]) \mid f \ \text{increasing on} \ [p,q] \}$. If $f \in I_{p,q}$ and $\epsilon>0$, then there exists a piecewise linear function $f_{\epsilon}$ oscillating around $f$ such that $||f-f_{\epsilon}||_{\infty} < \epsilon$ and $f_{\epsilon} \notin I_{p,q}$. Therefore, $I_{p,q}$ has empty interior. Moreover, $I_{p,q}$ is closed: let $(f_n)$ be a sequence in $I_{p,q}$ converging to some $f \in C([0,1])$; then, for all $x, $f(x)-f(y) = \lim\limits_{n \to + \infty} f_n(x)-f_n(y) \leq 0$, so $f \in I_{p,q}$.

The same argument can be used for $D_{p,q} = \{f \in C([0,1]) \mid f \ \text{decreasing on} \ [p,q] \}$.

According to Baire category theorem, the set $\bigcup\limits_{p of continuous functions locally monotonic at some point has empty interior. $\square$