This section gives a serious application of the theory in the previous section to an interesting problem which would have already made sense in Analysis 1. It’s also a great showcase of many of the different results we’ve proved throughout the unit. This year, though, I do not think we will have time to go over it in detail in the lectures, and so I have decided to make in non-examinable.
Another, possibly surprising, consequence of the Baire category theorem is the following.
Corollary6.8.
Let \(a, b \in \R\) with \(a \lt b\text{.}\) Then the set of continuous functions \([a,b] \to \R\) that are nowhere differentiable in \((a,b)\) is dense in \(C^0([a,b])\text{.}\)
In particular there exist continuous functions on \([a,b]\) that are nowhere differentiable, which is already a remarkable fact.
Proof.
Let
\begin{equation*}
\mathcal{L} = \set{f \in C^0([a,b])}{f \text{ is differentiable at some point }t \in (a,b)}.
\end{equation*}
For every \(N \in \N\text{,}\) define
\begin{equation*}
\begin{split}
L_N = \big\{f \in C^0([a,b]) : {}\amp \text{there exists }t \in [a,b]\text{ such that}\\
\amp |f(s) - f(t)| \le N |s - t| \text{ for all } s \in [a,b]\big\}
\end{split}\text{.}
\end{equation*}
That is, \(L_N\) consists of functions \(f \in C^0([a,b])\) such that for some \(t \in [a,b]\text{,}\) the modulus of the slope of the line connecting \((t, f(t))\) and \((s, f(s))\) is less than or equal to \(N\) for any \(s \in [a,b]\) (see Figure 6.1).
Figure6.1.Illustration of a function \(f \in L_N\text{.}\) Geometrically, this means that there is a point \(t \in [a,b]\) such that the graph \(\{(s,f(s)) : s
\in [a,b]\}\) of \(f\) intersects the cone \(\{(s,u) : \abs u \ge N
\abs{s-t}\}\) only at the point \((t,f(t))\text{.}\)
Our strategy is as follows.
Show that \(L_N\) is closed for each \(N \in \N\text{.}\)
Show that \(L_N\) is nowhere dense for each \(N \in \N\text{.}\)
Apply Corollary 6.5, concluding that \(C^0([a,b]) \setminus \bigcup_{N\in\N} L_N\) is dense in \(C^0([a,b])\text{.}\)
Show that \(\mathcal{L} \subseteq\bigcup_{N\in\N} L_N\text{.}\)
Once this is achieved, it follows that \(C^0([a,b]) \setminus \mathcal{L}\) contains a dense set, so it is itself dense in \(C^0([a,b])\text{.}\) This then concludes the proof.
Step 1.
Fix \(N \in \N\text{.}\) We want to show that \(L_N\) is closed in \(C^0([a,b])\text{.}\) To this end, consider a sequence \((f_n)_{n \in \N}\) in \(L_N\) that converges in \(C^0([a,b])\) to some function \(f \in
C^0([a,b])\text{.}\) Then for every \(n \in \N\) there exists a number \(t_n
\in [a,b]\) such that
\begin{equation*}
|f_n(s) - f_n(t_n)| \le N |s - t_n|
\end{equation*}
for all \(s \in [a,b]\text{.}\) Consider the sequence \((t_n)_{n \in \N}\) in \([a,b]\text{.}\) By the theorem of Bolzano–Weierstrass, there exists a subsequence \((t_{n_k})_{k \in \N}\) such that \(t_{n_k} \to t\) as \(k \to \infty\) for some \(t \in [a,b]\text{.}\) Therefore, for any \(s \in
[a,b]\text{,}\) we have the inequality
\begin{equation*}
|f(s) - f(t)| \le N |s - t|.
\end{equation*}
Hence \(f \in L_N\text{.}\) It follows that \(L_N\) is closed.
Step 2.
Next we prove that \(C^0([a,b]) \setminus L_N\) is dense (and so \(L_N\) is nowhere dense by Lemma 6.4) in \(C^0([a,b])\text{.}\) To this end, let \(f \in C^0([a,b])\) and fix \(\varepsilon \gt 0\text{.}\) We wish to construct a function \(g \in
C^0([a,b]) \setminus L_N\) such that \(\|f - g\|_{\sup}\lt
\varepsilon\text{.}\)
By the Weierstrass approximation theorem, there exists a polynomial \(p\) such that \(\|f - p\|_{\sup}\lt
\varepsilon/2\text{.}\) Let \(M = \sup_{t \in [a,b]} |p'(t)|\) and \(k = \frac 12\varepsilon/(N + M + 1)\text{.}\) Consider the ‘sawtooth’ function \(\phi \maps [a,b] \to \R\text{,}\) given by
\begin{equation*}
\phi(t) = \begin{cases}
(M + N + 1) (t - kj) \amp \text{if }kj \le t \lt k(j + 1) \text{ for }j \in \Z \text{ even}, \\
(M + N + 1) (kj + k - t) \amp \text{if }kj \le t \lt k(j + 1) \text{ for } j \in \Z \text{ odd}
\end{cases}
\end{equation*}
(see Figure 6.2). Note that \(\phi\) is constructed such that
Figure6.2.The ‘sawtooth’ function \(\phi\text{.}\) Each tooth has height \(\varepsilon/2\) and width \(2k\text{,}\) so that the line segments have slope \(\pm\varepsilon/2k = \pm(N+M+1)\text{.}\)
for any \(t \in [a,b]\) where the derivative exists. At any point where the derivative does not exist, we still have one-sided derivatives, corresponding to one-sided limits, satisfying the same inequality. Therefore, for any \(t \in [a,b]\text{,}\) there exists \(s \in [a,b]\) with \(|g(s) - g(t)| \gt N|s - t|\text{.}\) In other words, we have shown that \(g \in C^0([a,b]) \setminus L_N\text{.}\)
Step 3.
We know that \(L_N\) is nowhere dense for any \(N \in \N\text{.}\) Using Corollary 6.5, we now infer that \(C^0([a,b]) \setminus \bigcup_{N\in\N} L_N\) is dense in \(C^0([a,b])\text{.}\)
Step 4.
Next, we want to show that \(\mathcal{L} \subseteq\bigcup_{N\in\N}
L_N\text{.}\) To this end, let \(f \in \mathcal{L}\) and assume that it is differentiable at the point \(t \in (a,b)\text{.}\) Then