Volterra's Function

Differentiable everywhere with a bounded derivative — yet the derivative is not Riemann integrable. A sum of (x−a)2(b−x)2sin⁡1x−a(x-a)^2(b-x)^2\sin\frac{1}{x-a}-type bumps over a fat Cantor set builds this legendary counterexample.

φ(x)=(x−a)2(b−x)2sin⁡1x−a\varphi(x) = (x-a)^2(b-x)^2\sin\frac{1}{x-a}
f′ bounded,f′∉R[0,1]f'\ \text{bounded},\quad f' \notin \mathcal{R}[0,1]

Part of these learning paths

Examples & Exercises

On a complementary interval (a,b)(a, b), let φ(x)=(x−a)2(b−x)2sin⁡1x−a\varphi(x) = (x-a)^2(b-x)^2\sin\frac{1}{x-a} for a<x<ba < x < b and φ=0\varphi = 0 at the endpoints. Prove φ\varphi is differentiable everywhere with φ(a)=φ(b)=φ′(a)=φ′(b)=0\varphi(a) = \varphi(b) = \varphi'(a) = \varphi'(b) = 0: compute the derivative directly inside (a,b)(a, b), and use the difference quotient at the endpoints. (Warning: φ′\varphi' is discontinuous at the left endpoint aa — the proof reveals why.)

φ(x)=(x−a)2(b−x)2sin⁡1x−a\varphi(x) = (x-a)^2(b-x)^2 \sin\frac{1}{x-a}
φ′(x)=2(x−a)(b−x)((b−x)−(x−a))sin⁡1x−a−(b−x)2cos⁡1x−a(a<x<b)\varphi'(x) = 2(x-a)(b-x)\big((b-x)-(x-a)\big)\sin\frac{1}{x-a} - (b-x)^2\cos\frac{1}{x-a} \quad (a < x < b)
Stage N=4N = 4, zoomed on the first complementary interval (0.375,0.625)(0.375, 0.625): φ1\varphi_1 looks smooth, but the oscillatory term −(b−x)2cos⁡1x−a-(b-x)^2\cos\frac{1}{x-a} of its derivative keeps amplitude (b−a)2=0.0625(b-a)^2 = 0.0625 as x→0.375+x \to 0.375^+, refusing to die.
Show proof
  1. Write u=x−au = x - a, v=b−xv = b - x (so u+v=b−au + v = b - a and u,v>0u, v > 0); inside, φ=u2v2sin⁡1u\varphi = u^2 v^2 \sin\frac{1}{u}. The endpoint values follow by squeeze: ∣u2v2sin⁡1u∣≤u2v2→0\lvert u^2 v^2 \sin\frac{1}{u} \rvert \le u^2 v^2 \to 0 as x→a+x \to a^+ or x→b−x \to b^-. Outside the interval φ≡0\varphi \equiv 0, so φ\varphi is continuous on [0,1][0,1] with φ(a)=φ(b)=0\varphi(a) = \varphi(b) = 0.
  2. Inside, differentiate directly with the product and chain rules: ddx[u2v2]=2uv2−2u2v=2uv(v−u)\frac{d}{dx}[u^2 v^2] = 2uv^2 - 2u^2v = 2uv(v-u) (using dvdx=−1\frac{dv}{dx} = -1), and ddxsin⁡1u=−1u2cos⁡1u\frac{d}{dx}\sin\frac{1}{u} = -\frac{1}{u^2}\cos\frac{1}{u}, giving φ′(x)=2uv(v−u)sin⁡1u−v2cos⁡1u\varphi'(x) = 2uv(v-u)\sin\frac{1}{u} - v^2\cos\frac{1}{u} (the display formula above).
  3. At the endpoints use the difference quotient, not the limit of the formula above. For h>0h > 0, φ(a+h)−φ(a)h=h2(b−a−h)2sin⁡1h\frac{\varphi(a+h) - \varphi(a)}{h} = h^2(b-a-h)^2\sin\frac{1}{h}, squeezed to 00 by h2(b−a)2h^2(b-a)^2, so φ′(a)=0\varphi'(a) = 0. Likewise φ(b−h)−φ(b)−h=−h(b−h−a)2sin⁡1 b−h−a →0\frac{\varphi(b-h) - \varphi(b)}{-h} = -h(b-h-a)^2\sin\frac{1}{\,b-h-a\,} \to 0, so φ′(b)=0\varphi'(b) = 0.
  4. But φ′\varphi' is not continuous at aa: at xm=a+12πmx_m = a + \frac{1}{2\pi m} we have sin⁡1xm−a=0\sin\frac{1}{x_m - a} = 0 and cos⁡1xm−a=1\cos\frac{1}{x_m - a} = 1, so φ′(xm)=−(b−xm)2→−(b−a)2≠0=φ′(a)\varphi'(x_m) = -(b - x_m)^2 \to -(b-a)^2 \ne 0 = \varphi'(a). The oscillatory term −(b−x)2cos⁡1x−a-(b-x)^2\cos\frac{1}{x-a} keeps amplitude (b−a)2(b-a)^2 as x→a+x \to a^+ and never dies. (At the right endpoint bb, the factor (b−x)2→0(b-x)^2 \to 0 kills the oscillation, so φ′\varphi' is continuous there.) Hence each bump is differentiable everywhere with value and derivative 00 at the endpoints, but not C1C^1 — and exactly this failure is what makes f′f' discontinuous on the Cantor set in Problem 3.

Let f(x)=∑k2−kφk(x)f(x) = \sum_k 2^{-k}\varphi_k(x), summed over all complementary intervals. Apply the Weierstrass M-test to ∑k2−kφk\sum_k 2^{-k}\varphi_k and ∑k2−kφk′\sum_k 2^{-k}\varphi'_k to prove ff is differentiable at every point of [0,1][0,1] with bounded f′f'. The key is the kk-uniform bounds ∣φk∣≤116\lvert\varphi_k\rvert \le \frac{1}{16} and ∣φk′∣≤32\lvert\varphi'_k\rvert \le \frac{3}{2} (using (bk−ak)≤1(b_k - a_k) \le 1).

∣φk(x)∣≤(bk−ak2)4≤116,∣φk′(x)∣≤2uv∣v−u∣+v2≤12+1=32\lvert\varphi_k(x)\rvert \le \left(\tfrac{b_k-a_k}{2}\right)^4 \le \tfrac{1}{16}, \qquad \lvert\varphi'_k(x)\rvert \le 2uv\lvert v-u\rvert + v^2 \le \tfrac12 + 1 = \tfrac32
f′=∑k2−kφk′everywhere,∣f′∣≤∑k2−k⋅32=32f' = \sum_k 2^{-k}\varphi'_k \quad\text{everywhere}, \qquad \lvert f' \rvert \le \sum_k 2^{-k}\cdot\tfrac32 = \tfrac32
Stage N=4N = 4: 15 complementary intervals, removed length 1532=0.46875\frac{15}{32} = 0.46875, remaining length 1732=0.53125\frac{17}{32} = 0.53125. On the sample grid sup⁡∣f′∣≈0.0307\sup\lvert f' \rvert \approx 0.0307 — comfortably inside the proved bound 3/23/2.
Show proof
  1. Each gk=2−kφkg_k = 2^{-k}\varphi_k is differentiable on [0,1][0,1] by Problem 1 (endpoints included, derivative 00). With u,v≥0u, v \ge 0 and u+v=bk−ak≤1u + v = b_k - a_k \le 1, AM-GM gives u2v2≤(u+v2)4≤116u^2 v^2 \le \left(\frac{u+v}{2}\right)^4 \le \frac{1}{16}, so ∣gk∣≤2−k/16\lvert g_k \rvert \le 2^{-k}/16. Since ∑2−k/16<∞\sum 2^{-k}/16 < \infty, the M-test makes ∑gk\sum g_k converge uniformly on [0,1][0,1] — the limit ff is continuous.
  2. The derivatives obey the same treatment: from ∣φk′∣≤2uv∣v−u∣+v2\lvert\varphi'_k\rvert \le 2uv\lvert v-u\rvert + v^2, using uv≤(u+v2)2≤14uv \le \left(\frac{u+v}{2}\right)^2 \le \frac{1}{4}, ∣v−u∣≤u+v≤1\lvert v - u \rvert \le u + v \le 1, and v2≤1v^2 \le 1, we get ∣φk′(x)∣≤12+1=32\lvert\varphi'_k(x)\rvert \le \frac{1}{2} + 1 = \frac{3}{2} — uniform in kk and xx. Hence ∣gk′∣≤2−k⋅32\lvert g'_k \rvert \le 2^{-k}\cdot\frac{3}{2}, and the M-test makes ∑gk′=∑2−kφk′\sum g'_k = \sum 2^{-k}\varphi'_k converge uniformly as well.
  3. Now the standard theorem: if a series of differentiable functions converges at one point and the series of derivatives converges uniformly, the sum is differentiable everywhere and its derivative is the sum of the derivatives. Hence ff is differentiable at every point of [0,1][0,1] with f′(x)=∑k2−kφk′(x)f'(x) = \sum_k 2^{-k}\varphi'_k(x), bounded by ∣f′(x)∣≤∑k2−k⋅32=32\lvert f'(x) \rvert \le \sum_k 2^{-k}\cdot\frac{3}{2} = \frac{3}{2}. Numerically: sup⁡∣f′∣≈0.0307\sup\lvert f' \rvert \approx 0.0307 on the stage-4 grid.
  4. Corollary: at any cc in the Cantor set CC, every φk\varphi_k and φk′\varphi'_k vanishes (as cc lies outside all complementary intervals), so f(c)=0f(c) = 0 and f′(c)=0f'(c) = 0. That is, f′f' is identically 00 on CC — yet, as Problem 3 shows, discontinuous at every point of CC.

Prove f′f' is discontinuous at every cc in the Cantor set CC: each neighborhood of cc contains a whole complementary interval (ak,bk)(a_k, b_k) (CC has empty interior), on which f′=2−kφk′f' = 2^{-k}\varphi'_k oscillates near aka_k with amplitude ≈2−k(bk−ak)2\approx 2^{-k}(b_k-a_k)^2, while f′(c)=0f'(c) = 0. Then conclude via Lebesgue's criterion (cited as a theorem below — proof at idea level; see the measure/lebesgue scenes) that f′f' is not Riemann integrable.

(Lebesgue, cited): g bounded on [a,b]\text{(Lebesgue, cited): } g \text{ bounded on } [a,b]
g∈R[a,b]  ⟺  g is continuous a.e.g \in \mathcal{R}[a,b] \iff g \text{ is continuous a.e.}
xm=ak+1πmx_m = a_k + \tfrac{1}{\pi m}
f′(xm)=2−k(bk−xm)2(−1)m+1→±2−k(bk−ak)2f'(x_m) = 2^{-k}(b_k-x_m)^2(-1)^{m+1} \to \pm 2^{-k}(b_k-a_k)^2
Stage N=4N = 4, zoomed on the first interval (0.375,0.625)(0.375, 0.625): as x→0.375+x \to 0.375^+, the peak-to-peak swing of f′f' stays ≈0.0625\approx 0.0625 while f′(c)=0f'(c) = 0 at every point of the Cantor set — so f′f' is discontinuous at every point of CC.
Show proof
  1. Lemma: every neighborhood of c∈Cc \in C contains a whole complementary interval. Let InI_n be the stage-nn surviving closed interval containing cc; then ∣In∣→0\lvert I_n \rvert \to 0, and at stage nn the middle chunk removed from In−1I_{n-1} is a complementary interval Jn=(ak,bk)J_n = (a_k, b_k) of length 4−n4^{-n}. For nn with ∣In−1∣<δ\lvert I_{n-1} \rvert < \delta, all of Jn⊂In−1J_n \subset I_{n-1} lies within δ\delta of cc. So CC has empty interior (every open interval eventually has its middle removed).
  2. On such an interval (a,b)=(ak,bk)(a, b) = (a_k, b_k), f′=2−kφk′f' = 2^{-k}\varphi'_k (every other term is 00). With xm=a+1πmx_m = a + \frac{1}{\pi m}, we have sin⁡1xm−a=sin⁡(πm)=0\sin\frac{1}{x_m - a} = \sin(\pi m) = 0 and cos⁡1xm−a=(−1)m\cos\frac{1}{x_m - a} = (-1)^m, so φk′(xm)=−(b−xm)2(−1)m\varphi'_k(x_m) = -(b-x_m)^2(-1)^m and f′(xm)=2−k(b−xm)2(−1)m+1→±2−k(b−a)2f'(x_m) = 2^{-k}(b-x_m)^2(-1)^{m+1} \to \pm 2^{-k}(b-a)^2 (sign alternating with the parity of mm).
  3. But Problem 2's corollary gives f′(c)=0f'(c) = 0. Since xm→ax_m \to a and aa is arbitrarily close to cc, there are points arbitrarily close to cc where f′f' takes values both above +2−k(b−a)2/2+2^{-k}(b-a)^2/2 and below −2−k(b−a)2/2-2^{-k}(b-a)^2/2 — it cannot converge to f′(c)=0f'(c) = 0. Hence f′f' is discontinuous at cc, and c∈Cc \in C was arbitrary: f′f' is discontinuous at every point of CC. Numerically: on the first interval (0.375,0.625)(0.375, 0.625), a dense grid near x→0.375+x \to 0.375^+ shows max⁡f′−min⁡f′≈0.0625=2⋅12⋅(0.25)2\max f' - \min f' \approx 0.0625 = 2\cdot\frac12\cdot(0.25)^2.
  4. Finally we cite Lebesgue's criterion as a theorem (its proof is measure theory, so we keep it at idea level — see the measure/lebesgue scenes): a bounded function on [a,b][a,b] is Riemann integrable iff it is continuous almost everywhere, i.e. its discontinuity set has Lebesgue measure 00. Here f′f' is bounded (Problem 2), its discontinuity set contains CC, and CC is closed with measure 1/21/2 (the complement's total length is lim⁡N→∞1−2−N2=12\lim_{N\to\infty}\frac{1-2^{-N}}{2} = \frac12). A discontinuity set of positive measure means f′f' is not Riemann integrable. The punchline: a function can be differentiable everywhere with bounded derivative, yet its derivative need not be Riemann integrable.

10. Integration