Existence of nowhere differentiable functions I have troubles with one step of my solution to this problem:

Show that there exists a continuous function $f:[0,1]\to \mathbb{R}$ which is not differentiable at any point. Hint: Consider $X=C([0,1],\mathbb{R})$ and $$U_n:=\left\{f\in X\sup\limits_{0<|h|\leq 1/n}\left|\frac{f(t+h)-f(t)}{h}\right|>n\quad \forall t\in[0,1]\right\}$$

I'm able to prove that $U_n$ is open and I know that if I can show that all $U_n$ are dense in $C([0,1])$ I can apply the Baire category theorem to show that there exist such a function.
Unfortunately I have no idea how I should prove that all $U_n$ are dense in $C[0,1]$? So if someone could tell me how I prove that the $U_n$ are dense, then I would be very happy.
 A: 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}$
So for any continuous function there exists a "saw-tooth" function which is very close to $f$ (close in the sense of supremum norm).
A: 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).


*

*Write $g$ as the limit of piecewise linear functions $g_k$.

*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).

*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.
