Last time, we considered the (long and hard) Lebesgue density theorem, which says, given any Lebesgue locally integrable function $f: \R^n \to \R$, then for almost all $p$, the density $\delta(p,f)$ of $f$ at $p$ exists and equals to the value $f(p)$.
Using this theorem, we proved that for a locally integrable function $f: \R \to \R$, and $a \in \R$, a primitive $F(x) = \int_a^x f(t) dt$ is differentiable almost everywhere, and $F'(p) = f(p)$ a.e. (at least at those points $p$, where $f(p) = \delta(p, f)$)
Unfortunately, the converse is false, namely, if you give me a continuous function $G$, such that $G' = f$ a.e., then I cannot conclude that $G$ is a primitive of $f$. The famous example is 'devil's staircase', which is a continuous function on $[0,1]$, that is constant on the complement of the Cantor set. (Discussion: how do you construct this function? )
So, how to fix this? How to rule this case out? We have the notion of 'absolutely continuous' function, it is even better than uniform continuous function (continuity on a compact set is equal to uniform continuity).
Definition : we say $f: [a,b] \to \R$ is absolutely continuous, if for any $\epsilon>0$, there is a $\delta>0$, such that for any countable disjoint open intervals $(a_i, b_i)$ in $[a,b]$ with total length $<\delta$, we have $ \sum_{i=1}^\infty |f(b_i) - f(a_i)| < \epsilon. $
There are equivalent conditions, where we replace 'countable' by 'finite', and replace $|f(b_i) - f(a_i)|$ by $m(f([a_i, b_i]))$.
Absolutely continuous function sends null set to null set.
$\sqrt{x} \sin(1/x)$ on $[0,1]$ is not absolutely continuous. Indeed, consider $(a_n, b_n) = (1/(2\pi n), 1/(2\pi (n+1/4))$, then $\sum_{n=1}^\infty |f(b_n) - f(a_n)| = \sum_{n=1}^\infty \sqrt{2\pi (n+1/4)} = \infty$, hence for any $\delta>0$, there exists $N>0$, such that $1/2\pi N < \delta$, and the sum $\sum_{n=N}^\infty |f(b_n) - f(a_n)| = \infty$.
Theorem: if $f: [a,b] \to \R$ is integrable, then (a) $F(x) = \int_a^x f(t) dt$ is absolutely continuous. and (b) If $G$ is an absolutely continuous function with $G' = f$ a.e., then there is a constant $c$, such that $G = F + c$.
Proof: We may write $f = f_+ - f_-$, the difference of two non-negative functions. And define the primitives of $f_\pm$ as $F_\pm$, then $F = F_+ - F_-$. If $F_\pm$ were absolutely continuous, then so will $F$ be. Hence suffice to prove (a) for the non-negative $f$.
How to show $F$ is absolutely continuous? Given $\epsilon>0$, we need to find $\delta$, such that for disjoint open intervals in the domain with total measure less than $\delta$, the sum of the measure of the images is less than $\epsilon$.
If $f$ were bounded, say $f < M$, then given $\epsilon>0$, we can just take $\delta = \epsilon / M$.
If $f$ is not bounded, then we can split $f$ to be a bounded part and an unbounded part. For any $n>0$, we can define $f = f_n + g_n$, where $f_n = \max (f, n)$. Then, as $n \to \infty$, $g_n \to 0$ a.e., and by DCT, $\int g_n \to 0$. Pick $N$ large enough, such that $\int g_N < \epsilon /2$. Then, let $\delta = (\epsilon/2) / N$. Then, for any countable disjoint open intervals $\{(a_i, b_i)\}$ with length $< \delta$, we have $$ \sum_i \int_{a_i}^{b_i} f(t) dt \leq \sum_i \int_{a_i}^{b_i} f_N(t) dt + \sum_i \int_{a_i}^{b_i} g_N(t) dt \leq N \delta + \int_a^b g_N \leq \epsilon/2 + \epsilon/2 = \epsilon $$ Done for (a).
(b) Suppose $G$ is some absolutely continuous function on $[a,b]$ with $G' = f$ a.e., Then $G'(x) - F'(x) = 0$ .e. Suffice to prove that if $H:[a,b] \to \R$ is absolutely continuous, and $H' = 0$ a.e., then $H = c$. In fact, suffice to prove that $H(a) = H(b)$, then consider $H$ restricted to $[a', b'] \In [a,b]$,
How to use the condition $H'=0$ a.e.? Let $Z\In [a,b]$ be a nullset, such that if $x \in A = [a,b] \RM Z$, we have $H'(x)=0$. By definition, it means that $\lim_{h \to 0} [H(x+h) - H(x)] / h = 0$. Then, we claim, for any $x \in A$, for any $\epsilon$, there exists $\delta$, such that if $x \in [a, b ]$ with $0<b - a< \delta$, we have $|H(b_i) - H(a_i)| / (b_i - a_i) < \epsilon / 2(b-a)$ (why?). Thus, we have a Vitali covering of $A$ by closed interval. Thus, there is a countable collection of disjoint intervals $[a_i, b_i]$, such that $$ \sum_i |H(b_i) - H(a_i)| \leq \epsilon / 2(b-a) \sum_i (b_i-a_i) \leq \epsilon /2 $$ Since $H$ is absolutely continuous, thus for $\epsilon/2$, there is a $\delta>0$, such that $\sum_{i=1}^n |b_i - a_i| < \delta$ implies $\sum_i |H(b_i) - H(a_i)|<\epsilon/2$. Let $N$ be large enough, such that $m ( [a,b] - \sqcup_{i=1}^N [a_i,b_i]) < \delta$. And relabel these $N$ intervals, so that $a \leq a_1 < b_1 < a_2 < b_2 \cdots < a_N < b_N \leq b$, then we have $$ |H(b) - H(a)| \leq \sum_{n=1}^N |H(b_n) - H(a_n)| + \sum_{n=1}^{N-1} |H(b_{n+1}) - H(a_n)| + |H(b) - H(b_N)| + |H(a_1) - H(a)| \leq \epsilon/2 + \epsilon/2 = \epsilon $$ Since $\epsilon$ is arbitrary, we do get $H(a)=H(b)$.
I will leave Pugh section 10 for presentation project.