# Prove a function vanishes almost everywhere

Let $f$ be a Borel measurable function on the real line.Show that if $\int^{b}_{a} f(x) dx=0$ for all rationals a,b such that $\infty<a<b<\infty$ then $f(x)=0$ almost everywhere.

I want to use proof by contradiction. Firstly assume that $m\left\{x|f(x)\neq 0\right\}\neq 0$,since this function can be both nonnegative valued and negative valued ,I don't know how to choose proper rational numbers $a,b$ to derive the contradiction.

• To prove, you can look at what kind of structure the sets over which $f$ integrates to 0 form. I.e. do they form a $\sigma$-algebra, and if so what does that mean? – Oles Wohnzimmer Jul 22 '16 at 10:49
• Probably should assume $f$ is locally integrable. – zhw. Jul 22 '16 at 14:46
• @OlesWohnzimmer After proving that the collection of sets you pointed above is a $\sigma$-algebra,then we can use Lebesgue differentiation theorem.Is that what you mean or is there other method to approach it? – mike Jul 24 '16 at 1:21
• After proving that it is a $\sigma$-algebra, can you think of any other $\sigma$-algebra generated by rational intervals? – Oles Wohnzimmer Jul 24 '16 at 8:10
• @OlesWohnzimmer This $\sigma$-algebra is consists of all the Borel sets. By what theorem,we can get the desired result from this fact? – mike Jul 25 '16 at 3:52