We have that $g$ is a measurable and bounded function on $[a,b]$. I have $\int_a^cg=0$ for every $c\in[a,b]$. I want to show $g=0$ on $[a,b]$ except possibly on a subset of measure zero.
Proof.
By way of contradiction, suppose $A=\lbrace x\in [a,b]|g(x)\not=0 \rbrace$ has positve measure. Then $0=\int_a^{\sup A}g=\int_a^{\inf A}g+\int_{\inf A}^{\sup A}g=\int_{\inf A}^{\sup A}g$, but I think the last integral can be 0, so there's no contradiction.
Since $A$ has positive measure and $g\not=0$ on $A$, I would like to argue that there is a number $d$ for which $\int_{\inf A}^dg$ is strictly positive or negative, but I don't even know if that is true.
Thus, since $g > \varepsilon >0$ in $A$, we conclude $$\varepsilon |A| \leq \int_{A} g = \int_{A-B} g + \int_{A\cap B} g \leq \int_{A-B} g + \int_{B} g < \varepsilon |A|$$
Contradition!
– Kelson Vieira Nov 07 '12 at 01:00