Tutorials › Topology (Undergraduate) › Generic Nowhere Differentiability in C([0,1])

The Baire Category Theorem · Tutorial 614 of 799

Generic Nowhere Differentiability in C([0,1])

Learn how dense open steep-secant conditions, combined with the Baire theorem, yield a residual family of continuous functions with no finite derivative anywhere.

Advanced 10 min read

What You'll Learn

  • Define uniform steep-secant conditions in the sup-norm space \(C([0,1])\)
  • Prove that each condition is open and dense
  • Apply the Baire category theorem to obtain a dense countable intersection
  • Show why the intersection rules out finite derivatives at interior points
  • Check that the same argument excludes one-sided derivatives at the endpoints
  • Distinguish secants anchored at a point from secants whose endpoints merely lie nearby

Steep Secants at Every Point

A finite derivative at a point forces the secant slopes anchored at that point to stay bounded when the other endpoint is sufficiently close. The key is to impose steep-secants conditions at every point, at arbitrarily small distances. Each condition will be open and dense in the space of continuous functions; the Baire category theorem then says that all the conditions hold simultaneously for a dense set of functions.

Let \(C([0,1])\) denote the continuous real-valued functions on \([0,1]\), with the supremum norm \(\|f\|_\infty=\sup_{x\in[0,1]}|f(x)|\). For \(m,n\in\mathbb{N}\), define

$$ U_{m,n}=\left\{f\in C([0,1]):\text{ for every }x\in[0,1]\text{ there is }y\in[0,1]\text{ with }0<|y-x|<\frac1n \text{ and }\frac{|f(y)-f(x)|}{|y-x|}>m\right\}. $$

The strict inequality in the secant condition matters: it ensures a margin that survives a sufficiently small uniform perturbation. The condition is also anchored: one endpoint of each secant is the point \(x\) being tested. It is this feature that lets us compare directly with the definition of a derivative.

Definition: A subset of a topological space is residual if its complement is meagre, meaning a countable union of nowhere-dense sets. A set is nowhere dense if its closure has empty interior. In the argument below, the residual set will be exhibited as a countable intersection of dense open sets.

Why Each Condition Is Open and Dense

Proposition: For every \(m,n\in\mathbb{N}\), the set \(U_{m,n}\) is open and dense in \(C([0,1])\) with the supremum-norm topology.

Proof. First suppose \(f\in U_{m,n}\). For each \(x\in[0,1]\), choose a witness \(y_x\) from the definition, and write \(d_x=|y_x-x|>0\). The function of \(z\) given by \(|f(y_x)-f(z)|/|y_x-z|\) is continuous wherever \(z\ne y_x\). Its value at \(z=x\) is strictly greater than \(m\). Thus there is a relative open neighborhood \(W_x\) of \(x\) in \([0,1]\), and a number \(\eta_x>0\), such that for every \(z\in W_x\), \[ |y_x-z|<1/n,\qquad |y_x-z|>d_x/2,\qquad \frac{|f(y_x)-f(z)|}{|y_x-z|}>m+\eta_x. \] The neighborhoods \(W_x\) cover the compact interval \([0,1]\), so finitely many suffice, say \(W_{x_1},\ldots,W_{x_r}\). If \(\|g-f\|_\infty<\delta\), then for each \(z\in W_{x_i}\) the quotient using the same witness \(y_{x_i}\) changes by at most \[ \frac{|g(y_{x_i})-f(y_{x_i})|+|g(z)-f(z)|}{|y_{x_i}-z|} <\frac{4\delta}{d_{x_i}}. \] Choose \(\delta>0\) so small that \(4\delta/d_{x_i}<\eta_{x_i}\) for every \(i\). Then every \(z\in[0,1]\) has a witness for \(g\) with distance less than \(1/n\) and quotient greater than \(m\). Hence \(g\in U_{m,n}\), proving openness.

For density, fix \(f\in C([0,1])\) and \(\varepsilon>0\). We first approximate \(f\) by a piecewise-linear function \(g\). By uniform continuity, choose a partition of \([0,1]\) fine enough that the values of \(f\) at any two points in the same partition interval differ by less than \(\varepsilon/2\). Interpolate linearly between the values of \(f\) at the partition points. On each interval, \(g(x)\) is a convex combination of the endpoint values of \(f\), so \(|g(x)-f(x)|<\varepsilon/2\). In particular, \(\|g-f\|_\infty<\varepsilon/2\). Let \(L\) be the largest absolute value of the finitely many slopes of \(g\).

Choose \(a\) and \(N\in\mathbb{N}\) so that \(0<a<\varepsilon/2\) and \(aN>L+m\). Define \(p\) by setting \(p(j/N)=0\) when \(j\) is even and \(p(j/N)=a\) when \(j\) is odd, for integers \(j=0,\ldots,N\), and interpolating linearly between consecutive grid points. Then \(0\le p(x)\le a\), and on each grid interval its slope is either \(aN\) or \(-aN\). The function \(g+p\) is linear on every interval of the common partition formed by the breakpoints of \(g\) and \(p\). On each such interval its slope has absolute value at least \(aN-L>m\). Given any \(x\in[0,1]\), choose an adjacent common-partition interval of positive length and a point \(y\) in that interval, different from \(x\), sufficiently close to \(x\) that \(|y-x|<1/n\). At an endpoint of \([0,1]\), choose the interval on the available side. The secant quotient of \(g+p\) between \(x\) and \(y\) is the absolute value of that interval's slope, so it exceeds \(m\). Thus \(g+p\in U_{m,n}\). Finally, \[ \|g+p-f\|_\infty\le \|g-f\|_\infty+\|p\|_\infty<\varepsilon/2+a<\varepsilon. \] Every supremum-norm neighborhood of \(f\) therefore meets \(U_{m,n}\), proving density. \(\square\)

The Residual Nowhere-Differentiable Set

Theorem: In \(C([0,1])\) with the supremum-norm topology, the set \[ R=\bigcap_{m\in\mathbb{N}}\ \bigcap_{n\in\mathbb{N}} U_{m,n} \] is dense and residual. Every \(f\in R\) is nowhere differentiable, with one-sided derivatives excluded at \(0\) and \(1\) as well.

Proof. The space \(C([0,1])\) with the supremum norm is complete; this is the standard completeness result for the sup-norm space of continuous functions. The complete-metric Baire theorem states that a countable intersection of dense open subsets of a complete metric space is dense. The proposition shows that every \(U_{m,n}\) is open and dense, and \(\mathbb{N}\times\mathbb{N}\) is countable. Applying that theorem, \(R\) is dense. Its complement is the countable union of the closed sets \(C([0,1])\setminus U_{m,n}\). Each such closed set has empty interior because \(U_{m,n}\) is dense, so each is nowhere dense. Consequently \(R\) is residual.

Now suppose \(f\in R\) has a finite derivative at some \(x\in[0,1]\). At an interior point this is the ordinary two-sided derivative; at \(0\) or \(1\) it means the corresponding right-hand or left-hand derivative. Write its value as \(L\). By the definition of a finite derivative, there is \(\delta>0\) such that whenever \(y\in[0,1]\) and \(0<|y-x|<\delta\), \[ \frac{|f(y)-f(x)|}{|y-x|}<|L|+1. \] Choose \(m\in\mathbb{N}\) with \(m>|L|+1\), and then choose \(n\in\mathbb{N}\) with \(1/n<\delta\). Since \(f\in U_{m,n}\), there is a \(y\in[0,1]\) with \(0<|y-x|<1/n<\delta\) and quotient greater than \(m\). This contradicts the displayed bound. No such finite derivative exists. The argument uses only \(y\in[0,1]\), so it applies unchanged at either endpoint with the appropriate one-sided derivative. \(\square\)

The theorem says more than that there are examples of continuous nowhere-differentiable functions: such functions occur in a residual set, and that set is dense in the supremum-norm topology. Residuality is a category statement about the function space, not a claim that every continuous function is nowhere differentiable. What makes the proof work is the simultaneous control at every point and at every prescribed small distance scale.

Worked Example: Testing a Linear Function

Let \(f(x)=2x+1\) on \([0,1]\). For distinct \(x,y\in[0,1]\), compute its secant quotient: \[ \frac{|f(y)-f(x)|}{|y-x|} =\frac{|(2y+1)-(2x+1)|}{|y-x|} =\frac{2|y-x|}{|y-x|}=2. \] Thus \(f\notin U_{3,4}\), since no secant quotient can be greater than \(3\). On the other hand, \(f\in U_{1,4}\). If \(x\le 7/8\), choose \(y=x+1/8\); if \(x>7/8\), choose \(y=x-1/8\). In both cases \(y\in[0,1]\), \(0<|y-x|=1/8<1/4\), and the quotient is \(2>1\).

Check: substituting either chosen \(y\) into \(f(y)-f(x)=2(y-x)\) again gives quotient \(2\), so the membership and non-membership claims use the strict thresholds in the definition.

Worked Example: A Small Perturbation with Steep Secants

Let \(g(x)=2x\), and let \(p\) be the piecewise-linear function on the grid \(j/100\), \(j=0,\ldots,100\), whose values alternate between \(0\) at even \(j\) and \(1/10\) at odd \(j\). Set \(h=g+p\). On every grid interval, the slope of \(p\) is either \[ \frac{1/10-0}{1/100}=10 \quad\text{or}\quad \frac{0-1/10}{1/100}=-10. \] Therefore the slopes of \(h\) are \(2+10=12\) and \(2-10=-8\); their absolute values are \(12\) and \(8\), both greater than \(7\).

For any \(x\in[0,1]\), choose a grid interval adjacent to \(x\) and a distinct \(y\) in that interval with \(|y-x|<1/100\). If \(x\) is a grid point, take an interval on a side that lies in \([0,1]\); if \(x\) is not a grid point, use an interval containing it. The secant quotient is then either \(12\) or \(8\), so it exceeds \(7\). Since \(1/100<1/5\), this proves \(h\in U_{7,5}\). Also \(0\le p(x)\le1/10\), hence \(\|h-g\|_\infty\le1/10\).

Check: each grid interval has width \(1/100\), and the endpoint values of \(p\) differ by exactly \(1/10\), giving the computed slope magnitude \(10\). Adding the slope \(2\) of \(g\) gives the two stated slopes of \(h\).

Worked Example: Excluding a One-Sided Derivative at an Endpoint

Suppose \(f\in R\) and, for illustration, suppose the left-hand derivative at \(1\) exists with value \(L=3\). The derivative definition supplies a \(\delta>0\) such that \[ \frac{|f(y)-f(1)|}{|y-1|}<|3|+1=4 \] whenever \(y\in[0,1]\) and \(0<|y-1|<\delta\). Choose \(m=5\), so \(5>4\), and choose \(n\in\mathbb{N}\) large enough that \(1/n<\delta\). Membership in \(U_{5,n}\), applied at \(x=1\), supplies \(y\in[0,1]\) with \(0<|y-1|<1/n<\delta\) and quotient greater than \(5\). The same quotient would therefore be both less than \(4\) and greater than \(5\), which is impossible.

The choice \(L=3\) only makes the contradiction concrete. For any finite endpoint derivative \(L\), choosing an integer \(m>|L|+1\) gives the same contradiction. At \(0\), use the right-hand derivative and apply \(U_{m,n}\) at \(x=0\).

A Common Pitfall: Secants Need the Right Anchor

Unbounded secant slopes somewhere in every neighborhood of a point do not, by themselves, rule out differentiability at that point. For a concrete example, define \(q(0)=0\) and \(q(t)=t^2\sin(1/t^2)\) for \(t>0\). Then \[ \left|\frac{q(t)-q(0)}{t}\right| =\left|t\sin(1/t^2)\right|\le t\longrightarrow0 \quad\text{as }t\downarrow0, \] so \(q\) has right-hand derivative \(0\) at \(0\).

For \(t>0\), differentiation gives \(q'(t)=2t\sin(1/t^2)-(2/t)\cos(1/t^2)\). At \(t_k=1/\sqrt{2\pi k}\), where \(k\in\mathbb{N}\), this is \(q'(t_k)=-2/t_k=-2\sqrt{2\pi k}\), whose absolute value grows without bound as \(k\) increases. By the definition of the derivative at each \(t_k>0\), secant quotients with one endpoint \(t_k\) can be made arbitrarily close to \(q'(t_k)\). As \(t_k\to0\), arbitrarily large secant slopes therefore occur inside every neighborhood of \(0\), despite differentiability at \(0\).

The incorrect inference is that nearby pairs with steep secants contradict differentiability at \(0\). They need not have \(0\) as an endpoint. The sets \(U_{m,n}\) avoid this mistake: for each \(x\), they require a steep secant whose endpoint is exactly \(x\). That is precisely the quotient controlled by differentiability at \(x\).

Check Your Understanding

Use the strict distance and slope inequalities in the definition of \(U_{m,n}\) when answering.

  1. For \(f(x)=5x-2\), determine whether \(f\in U_{4,3}\) and whether \(f\in U_{6,3}\). Justify each answer from the secant quotient.
  2. Why does the proof of openness need a finite subcover of \([0,1]\), rather than just a separate perturbation bound for each point?
  3. Explain where completeness is used in proving that \(R\) is dense.
  4. At \(x=0\), write the derivative bound that contradicts membership in \(U_{m,n}\) if the right-hand derivative is finite.
  5. Why do steep secants between arbitrary nearby pairs not suffice to rule out differentiability at a specified point?