I'm stuck at the finish line on a pair of Exercises from Tao's Introduction to Measure Theory:
Exercise 1.6.12 (Rising Sun Inequality). Let $f : \mathbb{R} \to \mathbb{R}$ be an absolutely integrable function, and let $f^* : \mathbb{R} \to \mathbb{R}$ be the one-sided signed Hardy-Littlewood maximal function $$ f^*(x) := \sup_{h>0}\frac{1}{h}\int_{[x,x+h]}f(t)\,dt. $$ Establish the rising sun inequality $$ \lambda m(\{x\in\mathbb{R} : f^*(x) > \lambda\}) \leq \int_{\{x \in\mathbb{R} : f^*(x) > \lambda\}}f(t)\,dt $$ for all real $\lambda$ (note here that we permit $\lambda$ to be zero or negative) [...]
Exercise 1.6.13. Show that the left- and right-hand sides of Exercise 1.6.12 are in fact equal when $\lambda > 0$. (Hint: One may first wish to try this in the case when $f$ has compact support [...])
I've proven Exercise 1.6.12, and for 1.6.13, following the hint I proved equality for the case when $f$ has compact support.
My issue is on generalizing 1.6.13 to all absolutely integrable $f$. Here's my thinking so far. If $f$ is absolutely integrable, we can define functions $f_n = f1_{[-n,n]}$ for $n \in \mathbb{N}$ and apply the compact-support case to the $f_n$. Namely, letting $A_n := \{x \in \mathbb{R} : f_n^*(x) > \lambda\}$ and $A := \{x \in \mathbb{R} : f^*(x) > \lambda\}$ we know that $$ \lambda m(A_n) = \int_{A_n}f_n(t)\,dt $$ for each $n$. I was hoping we could let $n \to \infty$ on both sides and be done, but it's not quite so simple, since the relationship between the sets $A_n$ and $A$ is a bit subtle. One can verify that $A = \lim_{n\to\infty} A_n$ in the sense that $1_{A_n} \to 1_A$ pointwise, but each $A_n$ is not necessarily a subset of $A$ nor is it necessarily a subset of $A_{n+1}$. (The issue occurs at the points in $A_n$ which are less than $-n$.)
Since $f$ is absolutely integrable we do have $\int_{A_n}f_n(t)\,dt \to \int_{A}f(t)\,dt$ by the dominated convergence theorem, but I can't (yet) justify that $m(A_n) \to m(A)$. At best I can use Fatou's Lemma to say that $m(A) \leq \lim_{n\to\infty} m(A_n)$, but that just yields the rising sun inequality again, which I already know. Is there something I'm missing, or should I find another method to generalize 1.6.13 from the compact-support case?
$\def\R{\mathbb{R}}\def\d{\mathrm{d}}\def\le{\leqslant}$The missing piece here is the (absolute) integrability of $f$.
For any $n$, $f_n \le |f| \implies f_n^* \le {|f|}^*$, thus for any $\lambda > 0$,$$ \{f_n^* > \lambda\} \subseteq \{{|f|}^* > \lambda\} \implies |\chi_{\{f_n^* > \lambda\}}| = \chi_{\{f_n^* > \lambda\}} \le \chi_{\{{|f|}^* > \lambda\}}. $$ Note that $\chi_{\{{|f|}^* > \lambda\}} \in L^1(\R)$ by the rising sun inequality, hence the dominated convergence theorem shows that$$ m(\{f_n^* > \lambda\}) \to m(\{f^* > \lambda\})\ (n \to \infty). $$