# Measure Theory/Derivatives of Integrals
## Lebesgue's Differentiation Theorem

We return to that problem which sent us along this sequence of thoughts, which is the proof that if f is integrable then
    $\lim _{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f-f(x)|\ dt=0$
almost everywhere on ${\mathbb {R}}$.
This is sometimes referred to as "Lebesgue's Differentiation Theorem".
To begin the proof we let $A\subseteq {\mathbb {R}}$ be the set of points at which this equality fails. Therefore we intend to show that its measure is zero.
Let $\delta \in {\mathbb {R}}^{+}$ and we will attempt to approximate A in such a way that we are able to show $\lambda (A)$ is small.
Let $g:{\mathbb {R}}\to {\mathbb {R}}$ be any continuous function with $\int |f-g|<\delta$.
Let $x\in A$ and by definition $\lim _{t\to 0^{+}}{\frac {1}{2t}}\int _{(x-t,x+t)}|f-f(x)|\ dt\neq 0$.
Not only is this limit not zero, but because the integrand is nonnegative, then the limit must be positive.
Moreover, we may consider the limsup, since this is guaranteed to exist and be positive. This limsup may exist only in the sense of being infinity, but if we still regard that as a kind of existence then we will still have that it exists in this way.
* Exercise 1. Limsup Is Equivalent
* Let $a(h)$ be any nonnegative function $a:{\mathbb {R}}\to {\mathbb {R}}^{\geq 0}$. Prove that $\lim _{h\to 0}a(h)=0$ if and only if ${\overline {\lim }}_{h\to 0}a(h)=0$.

### Bounding the Limsup

For the chosen $x\in A$ there exists some $\varepsilon \in {\mathbb {R}}^{+}$ such that
    ${\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f-f(x)|\ dt>\varepsilon$
But then
    ${\begin{aligned}\varepsilon &<{\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f-f(x)|\ dt\\&\leq {\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}(|f-g|+|g-g(x)|+|g(x)-f(x)|)\ dt\end{aligned}}$
* Exercise 2. Complete the Inequalities
* Explain why ${\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|g-g(x)|\ dt=0$. Hint: Recall what we already discussed in a previous lesson about continuous functions.
* Explain why ${\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f(x)-g(x)|\ dt=|f(x)-g(x)|$.
* Then use the above to infer that ${\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f-f(x)|\leq (f-g)^{*}(x)+|f-g|(x)$.
* Exercise 3. Find Bounds on the Domain Subsets
* Use this result above to conclude that either $(f-g)^{*}(x)>{\frac {\varepsilon }{2}}$ or $|f(x)-g(x)|>{\frac {\varepsilon }{2}}$.
* Apply Markov's inequality to the set
* $\{x\in {\mathbb {R}}:{\frac {\varepsilon }{2}}<|f(x)-g(x)|\}$
* and apply Hardy-Littlewood to
* $\{x\in {\mathbb {R}}:{\frac {\varepsilon }{2}}<(f-g)^{*}(x)\}$
* to infer that
* $\lambda \left(\left\{x\in {\mathbb {R}}:\varepsilon <{\overline {\lim }}_{h\to 0^{+}}{\frac {1}{2h}}\int _{(x-h,x+h)}|f-f(x)|\ dt\right\}\right)\leq {\frac {C}{\varepsilon }}\int |f-g|$
* for some appropriate constant C.
* Then prove that the left-hand side is small. (Recall $\delta$.)
* Finally, prove the final result using the continuity of measure. (You will need to replace $\varepsilon$ by a countable sequence like $1/n$.)

## Derivative of the Integral

We finally put a bow on the entire section, by proving the following. We may call it the fundamental theorem of calculus, for length-measure integration.
Theorem: Let $f:{\mathbb {R}}\to {\mathbb {R}}$ be an integrable function and let $F(x)=\int _{(a,x)}f$ be its area function. Then $F'(x)=f(x)$ a.e.
* Exercise 4. Prove the Derivative of the Integral Theorem
* Prove the theorem above. It should be as direct as: Set up the limit of the difference quotient, and use the above to evaluate the limit.