Skip to main content

Section 6.2 Nowhere Differentiable Functions

Note on the exam.

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.
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).
Figure 6.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.
  1. Show that \(L_N\) is closed for each \(N \in \N\text{.}\)
  2. Show that \(L_N\) is nowhere dense for each \(N \in \N\text{.}\)
  3. 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{.}\)
  4. 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*} \begin{split} |f(s) - f(t)| \amp \le |f(s) - f_{n_k}(s)| + |f_{n_k}(s) - f_{n_k}(t_{n_k})| \\ \amp \quad + |f_{n_k}(t_{n_k}) - f_{n_k}(t)| + |f_{n_k}(t) - f(t)| \\ \amp \le |f(s) - f_{n_k}(s)| + N |s - t_{n_k}| + N |t_{n_k} - t| + |f_{n_k}(t) - f(t)|. \end{split} \end{equation*}
Letting \(k \to \infty\text{,}\) we obtain
\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
\begin{equation*} \|\phi\|_{\sup}= \frac{\varepsilon}{2}. \end{equation*}
Figure 6.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{.}\)
Finally, let \(g = p + \phi\text{.}\) Then
\begin{equation*} \|f - g\|_{\sup}\le \|f - p\|_{\sup}+ \|\phi\|_{\sup}\lt \varepsilon. \end{equation*}
Moreover, the function \(g\) is piecewise continuously differentiable, and
\begin{equation*} \lim_{s \to t} \frac{|g(s) - g(t)|}{|s - t|} = |g'(t)| = |p'(t) \pm (M + N + 1)| \ge N + 1 \end{equation*}
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
\begin{equation*} \lim_{s \to t} \frac{f(s) - f(t)}{s - t} = f'(t). \end{equation*}
Therefore, there exists \(\delta \gt 0\) such that
\begin{equation*} \left|\frac{f(s) - f(t)}{s - t} - f'(t)\right| \lt 1 \end{equation*}
for all \(s \in [a,b]\) with \(0 \lt |s - t| \lt \delta\text{.}\) So
\begin{equation*} |f(s) - f(t)| \le (|f'(t)| + 1) |s - t| \end{equation*}
whenever \(|s - t| \lt \delta\text{.}\) (The case \(s = t\) is trivial here.) On the other hand, if \(|s - t| \ge \delta\text{,}\) then
\begin{equation*} |f(s) - f(t)| \le \frac{2\n f_{\sup}}{\delta} |s - t|. \end{equation*}
If we choose \(N \in \N\) with
\begin{equation*} N \ge |f'(t)| + 1 + \frac{2\n f_{\sup}}{\delta}, \end{equation*}
then it follows that
\begin{equation*} |f(s) - f(t)| \le N|s - t| \end{equation*}
for all \(s \in [a,b]\text{.}\) Hence \(f \in L_N\) for some \(N \in \N\text{,}\) which means that \(f \in \bigcup_{N\in\N} L_N\text{.}\)