Existence of nowhere differentiable functions

Fix $\epsilon>0$. Since $f \in X$ is uniformly continuous (by Heine theorem), there exists $k \in \mathbb{N}$ such that

$$|x-y| \leq \frac{1}{k} \implies |f(x)-f(y)| \leq \epsilon.$$

Set $x_i := \frac{i}{N}$, $i \in \{0,\ldots,N\}$ for some $N \geq k$ (which we will choose later) and denote by $\chi$ the piecewise linear function satisfying

$$\chi(x_i) = 0 \qquad \text{for all $i \in \{1,\ldots,N\}$ odd}$$

and

$$\chi(x_i) = 1 \qquad \text{for all $i \in \{1,\ldots,N\}$ even}.$$

The function $\chi$ has slope $N$ around any point $x \in [0,1]$. Now let $p$ be a piecewise linear function such that $p(i/k) = f(i/k)$ for all $i \in \{0,\ldots,k\}$. Note that the slope of this function is at most $\epsilon k$. Therefore the slope of the function

$$f_{\epsilon}(x) := p(x) + \frac{\epsilon}{2} \chi(x)$$

is at least $\frac{\epsilon}{2} N - \epsilon k$. If we choose $N \in \mathbb{N}$ sufficiently large, we have $f_{\epsilon} \in U_n$. Since

$$\|f-f_{\epsilon}\|_{\infty} \leq \|f-p\|_{\infty} + \frac{\epsilon}{2} \|\chi\|_{\infty} \leq \frac{3}{2} \epsilon$$

this proves that $U_n$ is dense in $X$.


The picture which you should have in mind looks as follows:

$\hspace{130pt}$enter image description here

So for any continuous function there exists a "saw-tooth" function which is very close to $f$ (close in the sense of supremum norm).


I would proceed as follows: Let $g\in C([0,1])$. Of course, we work in the topology of uniform convergence (i.e. the $\sup$ metric).

  1. Write $g$ as the limit of piecewise linear functions $g_k$.
  2. Perturb the $g_k$ slightly to continuous functions $\tilde{g}_k$ by adding small spikes such that, say, $\|\tilde{g}_k-g_k\|<2^{-k}$ and $\tilde{g}_k\in U_n$ (so the spikes must have little height, but also a very small width).
  3. Show that $\tilde{g}_k\xrightarrow{k\to\infty}g$ to conclude.

The construction of the $\tilde{g}_k$ looks a bit messy to me, so maybe there is a better way. But it is functional analysis after all. Sometimes one has to get his or here hands dirty with ugly formulae...

Remark: For point (1) you could also use polynomials to approximate $g$. I advise piecewise linear functions because I thing they make the construction of the $\tilde{g}_k$ slightly easier. Feel free to prove me wrong, though.