The Derivative Does Not Always Recover the Function
The Fundamental Theorem of Calculus connects differentiation and integration, but its two directions require care. An indefinite Lebesgue integral of an integrable function is absolutely continuous, and its derivative recovers the integrand almost everywhere. Conversely, absolute continuity allows a function to be recovered everywhere from the integral of its almost-everywhere derivative. The Cantor function shows why continuity alone cannot replace absolute continuity: it is nonconstant and continuous, yet its derivative is zero almost everywhere.
Throughout, functions in this tutorial are real-valued on \([0,1]\), and all integrals and null sets are with respect to Lebesgue measure \(m\) on the finite, complete measure space \(([0,1],\mathcal{L},m)\). A property holding \(m\)-almost everywhere may fail on a set of measure zero. An equality of functions asserted everywhere is stronger than one asserted almost everywhere; this distinction is essential here.
The integral representation theorem for absolutely continuous functions, established in the earlier material on absolute continuity, states that \(F\) is absolutely continuous on \([0,1]\) if and only if there is an \(f\in L^1(m)\) such that $$ F(x)=F(0)+\int_0^x f(t)\,dm(t)\qquad\text{for every }x\in[0,1]. $$ In that representation, \(F'(x)=f(x)\) for \(m\)-almost every \(x\). Conversely, if \(F\) is absolutely continuous, its derivative exists almost everywhere, is integrable, and represents \(F\) in this formula. The representation is an equality at every \(x\), even though the derivative equality is only almost everywhere.
What the Cantor Function Tests
Let \(K\) be the middle-thirds Cantor set and let \(C:[0,1]\to[0,1]\) be the Cantor function constructed in the earlier material. Its relevant properties are that it is continuous, \(C(0)=0\), \(C(1)=1\), it is constant on every component interval of \([0,1]\setminus K\), and \(C'=0\) at almost every point. Indeed, \(m(K)=0\): after \(n\) deletion stages the remaining set is covered by \(2^n\) closed intervals, each of length \(3^{-n}\), so its total covering length is \(2^n3^{-n}=(2/3)^n\), which tends to zero. Since \(C\) is constant locally off \(K\), its derivative is zero there. The exceptional set \(K\) is null.
The function rises from \(0\) to \(1\), despite having derivative zero almost everywhere. Its increase is not detected by integrating its almost-everywhere derivative. The reason is not a failure of the Lebesgue integral: the derivative is the integrable function zero almost everywhere, whose integral is indeed zero. What fails is the hypothesis that would identify increments of the function with integrals of its derivative.
Proof. By the integral representation theorem, \(F(x)=F(0)+\int_0^x F'(t)\,dm(t)\) for every \(x\in[0,1]\). Since \(F'=0\) almost everywhere, its integral over every interval \([0,x]\) is zero: changing an integrable function on a null set does not change its Lebesgue integral. Thus \(F(x)=F(0)\) for every \(x\), which proves that \(F\) is constant. \(\square\)
Applying the proposition to \(C\) would force \(C\) to be constant if \(C\) were absolutely continuous. Since \(C(0)=0\) and \(C(1)=1\), it is not constant. Therefore \(C\) is not absolutely continuous. Equivalently, the integral representation theorem cannot apply to \(C\), even though \(C\) is continuous and has derivative zero almost everywhere.
Worked Example: An Absolutely Continuous Primitive
On \(([0,1],\mathcal{L},m)\), let \(f(t)=2t-1\), and define \(F(x)=\int_0^x f(t)\,dm(t)\). Compute \(F\), check its derivative, and verify the integral representation at \(x=3/4\).
The function \(f\) is continuous on the finite interval \([0,1]\), so it is integrable. Evaluating the integral gives $$ F(x)=\int_0^x(2t-1)\,dt=[t^2-t]_0^x=x^2-x. $$ As an indefinite Lebesgue integral of an integrable function, \(F\) is absolutely continuous. Direct differentiation gives \(F'(x)=2x-1=f(x)\) for every \(x\in[0,1]\) (with the usual one-sided interpretation at endpoints).
At \(x=3/4\), the value of the formula for \(F\) is $$ F(3/4)=(3/4)^2-3/4=9/16-12/16=-3/16. $$ Computing from the integral gives the same result: $$ \int_0^{3/4}(2t-1)\,dt=[t^2-t]_0^{3/4}=9/16-12/16=-3/16. $$ Check: differentiating \(x^2-x\) returns \(2x-1\), the integrand, and \(F(0)=0\) matches the lower limit in the defining integral.
Worked Example: The Cantor Function Has the Wrong Integral Representation
For \(C\), the Cantor function on \([0,1]\), compare its endpoint increment with the integral of its almost-everywhere derivative.
At almost every \(t\), \(C'(t)=0\). Thus \(C'\), defined arbitrarily on the null set where the derivative does not exist, agrees almost everywhere with the zero function. It is integrable, and $$ \int_0^1 C'(t)\,dm(t)=\int_0^1 0\,dm(t)=0. $$ But the endpoint increment is $$ C(1)-C(0)=1-0=1. $$ The two values differ: \(1\ne0\). In particular, the formula \(C(x)=C(0)+\int_0^x C'(t)\,dm(t)\) cannot hold for every \(x\). At \(x=1\), its right-hand side is \(0+0=0\), whereas its left-hand side is \(1\). This is consistent with the integral representation theorem because \(C\) is not absolutely continuous.
Check: the calculation uses the strict distinction between the derivative being zero almost everywhere and the function itself being zero everywhere. The former holds for \(C'\); the latter does not hold for \(C\).
Same Derivative Almost Everywhere, Different Function
The issue is not confined to the special value zero. Adding the Cantor function to an ordinary primitive produces a continuous function whose derivative almost everywhere is the same as that primitive’s derivative, but whose values do not agree with the integral of that derivative.
Worked Example: A Singular Perturbation of the Identity
Define \(G(x)=x+C(x)\) on \([0,1]\). Determine \(G'\) almost everywhere, then compare \(G(1/3)\) with the integral of that derivative from \(0\) to \(1/3\).
Outside \(K\), the function \(C\) is locally constant, so \(C'(x)=0\). Since \(m(K)=0\), it follows that \(G'(x)=1+C'(x)=1\) for almost every \(x\). In particular, this almost-everywhere derivative is integrable. The Cantor function has \(C(1/3)=1/2\), as given by its ternary-to-binary construction: the ternary point \(1/3=0.1_3\) maps to the binary value \(0.1_2=1/2\). Also \(G(0)=0+C(0)=0\). Therefore $$ G(1/3)=1/3+1/2=2/6+3/6=5/6, \qquad \int_0^{1/3}G'(t)\,dm(t)=\int_0^{1/3}1\,dm(t)=1/3. $$ Since \(5/6\ne1/3\), the integral of the almost-everywhere derivative does not recover \(G(1/3)-G(0)\). The comparison is exact: the integral is \(2/6\), while the increment is \(5/6-0=5/6\). Thus \(G\) is not absolutely continuous, even though it is continuous and has an integrable derivative almost everywhere.
Check: \(G(1)-G(0)=(1+C(1))-(0+C(0))=2\), whereas \(\int_0^1G'(t)\,dm(t)=\int_0^1 1\,dm(t)=1\). The endpoint calculation confirms the same failure on the whole interval.
The Common Mistake and the Correct Implication
A common mistake is to write “\(F'=f\) almost everywhere, so \(F(x)-F(0)=\int_0^x f\)” without checking absolute continuity. For \(C\), that calculation would give $$ C(1)-C(0)=\int_0^1 C'(t)\,dm(t)=0. $$ The left side is \(1\), so this is a false conclusion. The correction is to check the hypotheses of the integral representation theorem: absolute continuity is required. The theorem does not say that continuity plus an integrable almost-everywhere derivative is enough.
The valid implications distinguish the two roles of the theorem. If \(f\in L^1(m)\), then the function \(F(x)=F(0)+\int_0^x f(t)\,dm(t)\) is absolutely continuous, and \(F'=f\) almost everywhere. Conversely, if \(F\) is absolutely continuous, then its derivative is integrable and the integral of that derivative gives every increment of \(F\). The Cantor function satisfies neither representation conclusion because it is not absolutely continuous. Its derivative records its behavior off a null exceptional set, but that information alone does not record all of its total change.
| Function on \([0,1]\) | Derivative almost everywhere | Increment from 0 to 1 | Integral of the derivative |
|---|---|---|---|
| \(F(x)=\int_0^x(2t-1)\,dm(t)\) | \(2x-1\) | \(F(1)-F(0)=0\) | \(\int_0^1(2t-1)\,dm(t)=0\) |
| \(C(x)\) | \(0\) | \(C(1)-C(0)=1\) | \(\int_0^1 0\,dm(t)=0\) |
| \(G(x)=x+C(x)\) | \(1\) | \(G(1)-G(0)=2\) | \(\int_0^1 1\,dm(t)=1\) |
The first row is an absolutely continuous primitive, so its increment agrees with the integral. The other rows illustrate why the almost-everywhere derivative, even when integrable, does not by itself determine the increment of a continuous function. Absolute continuity is the additional condition that rules out this singular behavior.
Check Your Understanding
For each question, distinguish conclusions that hold everywhere from those that hold only almost everywhere.
- Why does \(C'=0\) almost everywhere not imply \(C=0\) everywhere?
- Which hypothesis of the integral representation theorem fails for the Cantor function, and how do its endpoint values show this?
- For \(G(x)=x+C(x)\), compute \(G'(x)\) almost everywhere and compare \(G(1)-G(0)\) with \(\int_0^1G'(t)\,dm(t)\).
- State the conclusion of the integral representation theorem when \(F\) is absolutely continuous and \(F'=f\) almost everywhere.
- In the first worked example, why does the integral representation hold at every \(x\), although the derivative recovery theorem gives \(F'=f\) only almost everywhere in general?