If the integral of f is 0 on every subinterval, show that the integral of |f| is 0 I'm trying to prove the following result:
If $f : [0,1] \to \mathbb{R}$ is integrable and the integral of $f$ is $0$ on every subinterval $I$ of $[0,1]$, then the integral of $\int_0^1|f|$ is $0$.
I have no idea how to proceed. Can you please suggest a method of attack or provide a proof?
Thank you.
 A: In the following reasoning I have assumed that $f$ is continuous, the general case is put in the last paragraph, but it uses some Lebesgue integral theory.
Assume that $\displaystyle\int_{0}^{1}|f|>\epsilon_{0}>0$, then bisect $[0,1]$ and pick an interval $[a_{1},b_{1}]$ such that $\displaystyle\int_{a_{1}}^{b_{1}}|f|>\epsilon_{0}$, and bisect again to $[a_{1},b_{1}]$ to pick an interval such that...
Consider $\displaystyle\bigcap_{n}[a_{n},b_{n}]$, pick a $c$ of the intersection. If $f(c)<0$, choose a neighbourhood of $c$ such that $f$ has the negative sign around that neighbourhood, then by picking an interval $[a_{N},b_{N}]$ which is contained in the neighbourhood, you are now ready to get a contradiction.  
For general case, here's a guess. We know that $f$ is continuous a.e. For such a continuous point $\alpha$, if $f(\alpha)>0$, then $f$ is positive around a neighbourhood of $a$, then the integral of $f$ around that neighbourhood must strictly greater than zero, but the assumption says that the integral must be zero, so $f=0$ for all continuous points. Now $\displaystyle\int|f|=0$ in the Lebesgue sense, but $|f|$ is Riemann integrable, then the Lebesgue integral and Riemann integral coincide.
A: Assume without loss of generality that $f$ is Borel (if not, replace it by a Borel function which equals $f$ almost everywhere). Consider the collection $\mathcal{C}$ of all Borel sets $B$ such that $\int_B f\,dm = 0$.  By using the monotone class or $\pi$-$\lambda$ theorem, show that $\mathcal{C}$ is a $\sigma$-algebra containing all the closed intervals.  Now choose $B = \{f \ge 0\}$ and $B = \{f \le 0\}$.  
A: It's a long time since I considered Riemann integration but isn't the following all that is required?
On intervals where $f$ is either negative everywhere or positive everywhere the Riemann integral of |f| is clearly just the modulus of that of f i.e. $0$. 
So consider any set of subintervals in the case that every subinterval contains both a non-negative value of f and a non-positive value for f. Then the upper sum for |f| is at most the sum of the moduli of the upper sum for f  and the lower sum for f. 
Since f has Riemann integral $0$ the lower bound of the upper sums is $0$ and the upper bound of the lower sums is $0$. So the lower bound of the upper sum for |f| is $0$, as required.
