TITLE: Let $m$ be Lebesgue measure and $a \in R$. Suppose that $f : R \to R$ is integrable, and $\int_a^xf(y) \, dy = 0$ for all $x$. Then $f = 0$ a.e.
QUESTION [5 upvotes]: This is a corollary to a proof in Bass, but I don't understand why it follows from the proof he gives. I follow everything up until the last statement. Why is it that proving that the integral is $0$ for all Borel measurable sets guarantees it is true for all Lebesgue measurable sets? Am I missing something vital about the relationship between Lebesgue measurable sets and Borel measurable sets?
Statement: Let $m$ be Lebesgue measure and $a \in\mathbb R$. Suppose that $f : \mathbb R \to\mathbb R$ is integrable, and $\int_a^xf(y) \, dy = 0$ for all $x$. Then $f = 0$ a.e.
Proof: We prove the conclusion first for intervals, then for unions of intervals, then for open sets, then for Borel measurable sets. For any interval $(c,d)$, we have
$$\int_c^df = \int_a^d f - \int^c_a f = 0.$$
By linearity, if $G$ is the finite union of disjoint open intervals, then $\int_G f = 0$. Now, if $G$ is open, then $G$ is the countable union of disjoint, open intervals, $G = \bigcup^n_{i=1}I_i$. We have
$$\int_G f = \int \lim_{n\to\infty} f \cdot \chi_{\bigcup^n_{i=1} I_i}$$
and since $f_n$ is integrable for all $n$, and $|f_n| \le f$ for all $n$, by the dominated convergence theorem,
$$\int_G f = \lim_{n\to\infty} \int_{\bigcup^n_{i=1}I_i} f =0.$$
Now, if $G_n$ is a decreasing sequence of open sets converging to $H$, since $|f \cdot \chi_{G_n}| \le f \cdot \chi_{G_1}$ for all $n$, we again have by the DCT that $\int_H f = 0 = \lim_{n\to\infty} \int_{G_n}f = 0$.
Finally, if $G$ is a Borel measurable set, then we know that there exists a sequence $G_n$ of decreasing, open sets, that converge to some set $H$, where $H \setminus G$ is a null set. Thus,
$$\int_G f = \int_H f = 0.$$
We have found that for every Borel measurable set $G$, $\int_G f =0$. Since $f$ is real valued and measurable, $f = 0$ a.e.

REPLY [3 votes]: You need the characterization of measurable sets:

Let $G \subset \Bbb{R}^k$ a bounded set. Then the following are equivalent:

$G$ is Lebesgue measurable.

There exist $B, N \subset \Bbb{R}^k$ such that $G = B \cup N$, $B$ is Borel, $N$ has zero Lebesgue measure.



Now, to conclude your exercize call $G= \{ x : f(x) >0\}$ and write $G=\bigcup_n (G \cap [-n,n])$ as a union of bounded measurable sets. Use the characterization to write $G \cap [-n,n] = B_n \cup N_n$. Finally
$$\int_{G \cap [-n,n]} f = \int_{B_n} f = 0$$
So $f=0$ a.e. in $G \cap [-n,n]$. Since $n$ is arbitrary, you have $f=0$ a.e. in $G$.
Do the same thing with $H=\{ x : f(x) <0\}$ and you are done.