Volterra's Function

Differentiable everywhere with a bounded derivative, yet that derivative is not Riemann integrable. Bumps rise over a fat Cantor set.

The function itself joins up smoothly. The trouble is its derivative, oscillating hard on a thick set. Riemann sums cannot capture that oscillation.

For example, measure the slope of a smooth road with a πŸ“ ruler, but the reading jumps wherever the ruler touches. The road is fine; the measurement fails.

Ο†(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)=h2(bβˆ’aβˆ’h)2sin⁑1h\varphi(a+h) = h^2(b-a-h)^2\sin\frac{1}{h}, so Ο†(a+h)βˆ’Ο†(a)h=h(bβˆ’aβˆ’h)2sin⁑1h\frac{\varphi(a+h) - \varphi(a)}{h} = h(b-a-h)^2\sin\frac{1}{h}, squeezed to 00 by h(bβˆ’a)2h(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 and its derivative is the sum of the derivatives. Here the M-test uniform convergence in step 1 satisfies the 'one point convergence' hypothesis β€” βˆ‘gk\sum g_k converges uniformly on all of [0,1][0,1], hence in particular at a point (e.g. 00).

    For interior points, apply the theorem on every closed subinterval [0,1βˆ’Ξ΄][0, 1-\delta] and [Ξ΄,1][\delta, 1] inside (0,1)(0,1). For the endpoints 0,10, 1, apply the same M-test bound directly to difference quotients: the uniform bound on the tail βˆ‘k>K2βˆ’kΟ†kβ€²\sum_{k>K} 2^{-k}\varphi'_k also dominates the tail of the difference quotients, so the one-sided derivatives at the endpoints are fβ€²(0)=βˆ‘k2βˆ’kΟ†kβ€²(0)f'(0) = \sum_k 2^{-k}\varphi'_k(0) and fβ€²(1)=βˆ‘k2βˆ’kΟ†kβ€²(1)f'(1) = \sum_k 2^{-k}\varphi'_k(1).

    Hence ff is differentiable at every point of [0,1][0,1] (one-sided at the endpoints) 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.

11. Integration