🧮 Brain Teaser

The Weierstrass Nowhere-Dense Ghost: A Dense GδG_\delta of Non-Differentiability

Let f:[0,1]Rf: [0,1] \to \mathbb{R} be a continuous function. Define the set

E={x[0,1]:lim suph0f(x+h)f(x)h=+}E = \left\{ x \in [0,1] : \limsup_{h \to 0} \frac{|f(x+h) - f(x)|}{|h|} = +\infty \right\}

to be the set of points where ff has infinite upper Dini derivative (informally, where ff "blows up" in difference quotients).

Question: Must EE be empty? Can EE be all of [0,1][0,1]? If so, give a clean reason why a generic continuous function satisfies E=[0,1]E = [0,1], i.e., is nowhere differentiable.

More precisely: show that the set

ND={fC([0,1]):f is nowhere differentiable on [0,1]}\mathcal{ND} = \{ f \in C([0,1]) : f \text{ is nowhere differentiable on } [0,1] \}

is residual (comeager) in C([0,1])C([0,1]) with the uniform norm. That is, ND\mathcal{ND} contains a dense GδG_\delta.

Hint: Think about what Baire category says about C([0,1])C([0,1]), and how to express "has a finite derivative at some point" as a countable union of closed sets.

Baire categorynowhere differentiableC([0,1])residual setmeager sets

Answer: Generic Continuous Function Is Nowhere Differentiable

Key Idea / Intuition

The space C([0,1])C([0,1]) is a complete metric space, so Baire's theorem says it cannot be written as a countable union of nowhere-dense closed sets. The "bad" functions — those that are differentiable at even one point — can be expressed as exactly such a countable union. So "most" continuous functions (in the Baire category sense) are nowhere differentiable. Differentiability is the exception, not the rule.


Formal Proof / Solution

Step 1: Write the "differentiable somewhere" set as a countable union

A function fC([0,1])f \in C([0,1]) has a finite right-derivative at some point xx if and only if there exist integers n,k1n, k \geq 1 such that fAn,kf \in A_{n,k}, where

An,k={fC([0,1]):x[0,11k] such that 0<h<1k, f(x+h)f(x)hn}.A_{n,k} = \left\{ f \in C([0,1]) : \exists\, x \in \left[0, 1 - \tfrac{1}{k}\right] \text{ such that } \forall\, 0 < h < \tfrac{1}{k},\ \frac{|f(x+h)-f(x)|}{h} \leq n \right\}.

Informally: An,kA_{n,k} is the set of functions that have a bounded difference quotient of size n\leq n for all small steps h<1/kh < 1/k at some point xx. Any function differentiable at some point belongs to n,kAn,k\bigcup_{n,k} A_{n,k}.

Step 2: Each An,kA_{n,k} is closed in C([0,1])C([0,1])

Suppose fmff_m \to f uniformly and each fmAn,kf_m \in A_{n,k}, witnessed at points xmx_m. By compactness, xmxx_m \to x along a subsequence. Then for any 0<h<1/k0 < h < 1/k:

f(x+h)f(x)h=limmfm(xm+h)fm(xm)hn\frac{|f(x+h)-f(x)|}{h} = \lim_{m\to\infty} \frac{|f_m(x_m+h)-f_m(x_m)|}{h} \leq n

(using uniform convergence to swap limit and evaluation). So fAn,kf \in A_{n,k}. Hence An,kA_{n,k} is closed.

Step 3: Each An,kA_{n,k} is nowhere dense

We show: every open ball in C([0,1])C([0,1]) contains a function outside An,kA_{n,k}.

Given any fC([0,1])f \in C([0,1]) and ε>0\varepsilon > 0, we construct gg with fg<ε\|f - g\|_\infty < \varepsilon and gAn,kg \notin A_{n,k}.

Take a piecewise-linear "sawtooth" perturbation ss with amplitude <ε< \varepsilon and slope ±M\pm M for MnM \gg n on intervals of width <1/k< 1/k. Set g=f+sg = f + s. Then gg is close to ff, but at every point xx, there exists a small h<1/kh < 1/k where the difference quotient of gg exceeds nn (the sawtooth spike dominates). So gAn,kg \notin A_{n,k}.

This shows An,kA_{n,k} has empty interior, i.e., is nowhere dense.

Step 4: Apply Baire Category

Since C([0,1])C([0,1]) is complete, the Baire Category Theorem says:

n,k=1An,k is meager (first category).\bigcup_{n,k=1}^\infty A_{n,k} \text{ is meager (first category)}.

Therefore its complement

ND=C([0,1])n,kAn,k\mathcal{ND} = C([0,1]) \setminus \bigcup_{n,k} A_{n,k}

is residual (comeager), a dense GδG_\delta. Every fNDf \in \mathcal{ND} is nowhere differentiable.

Conclusion

ND is residual in C([0,1]).\boxed{\mathcal{ND} \text{ is residual in } C([0,1]).}

The nowhere-differentiable functions are not a curiosity — they form the vast majority of all continuous functions in the Baire category sense. Weierstrass's explicit example (1872) was just the first proof that such functions exist; Baire category tells us they're typical.

Source: Rudin, Real and Complex Analysis; also mathematical folklore / Banach 1931

Type: analysisSource: Rudin, Real and Complex Analysis; also mathematical folklore / Banach 1931Edit on GitHub ↗