Non-constant $L^1$ function has a non-zero integral over some interval 
Prove that if $f\in L^1([0,1],\lambda)$ is not constant almost
  everywhere then there exists an interval so that
  $\int_I\!f\,\mathrm{d}\lambda\neq 0$. Here $\lambda$ is the Lebesgue
  measure.

Since this is obviously true for continuous functions, I've been trying to use the fact that continuous functions with compact support are dense in $L^1$, but I'm not sure how to set it up.
 A: Suppose you had an $f$ with $\int_I f d \lambda = 0$ for all. Let $f_+$ and $f_-$ be the positive and negative parts, i.e. $f = f_+ - f_-$. Now, notice the following:
1) They both induce measures defined by $\mu_+ (A) = \int_A f_+ d \lambda$, similarly for $\mu_{-}$
2) We can restate the given condition as saying that these measures are equivalent on the ring of intervals (i.e. the set of finite union of intervals)
3) Since $f \in L^1$, these are finite measures, in particular they are $\sigma$-finite. 
4) By Catheodory extension, these measures must be equal for the Borel sigma algebra.
If $f$ is not equally $0$ a.e., then wlog there exists an $A$ such that $f > 0$ on this set with $\lambda(A) > 0$. But, then $\mu_+(A) > 0 = \mu_-(A)$, which is a contradiction. 
A: Let us define two measure $\nu_1$ and $\nu_2$ on $\mathcal B$, the Borel $\sigma$-algebra of $[0,1]$. Define, for any $A\in \mathcal B$,
$$\nu_1(A)=\int_A f^+ d\lambda$$ 
and 
$$\nu_2(A)=\int_A f^- d\lambda$$ 
Since $f\in L^1([0,1],\lambda)$, we have that both $\nu_1$ and $\nu_2$ are finite measures.
Now suppose that $\int_I\!f\,d\lambda= 0$, for all intervals $I$. 
It means that, for all intervals $I$, we have
$$\nu_1(I)-\nu2(I)= \int_I f^+ d\lambda-\int_I f^- d\lambda=\int_I (f^+ -f^-) d\lambda= \int_I\!f\,d\lambda=0$$ So $\nu_1$ and $\nu_2$ coincide on the semi-algebra of the intervals in $[0,1]$. Since both $\nu_1$, $\nu_2$ are finite measures, they both have unique extentions to the $\sigma$-algebra generated by the semi-algebra, which is $\mathcal B$, and we have, for all $A\in \mathcal B$
$$\nu_1(A)=\nu_2(A)$$
Suppose $\lambda([f>0])>0$, then there is $B \in\mathcal B$ (for instance the the Borel measurable kernel of $[f>0]$), such that $f>0$ in $B$ and 
$$\nu_1(B)=\int_B f^+ d\lambda>0=\int_B f^- d\lambda = \nu_2(A)$$
It is a contradiction, so we have $\lambda([f>0])=0$
Now, suppose  $\lambda([f<0])>0$. In a similar way we produce a contradiction, and we conclude that  $\lambda([f<0])=0$. 
So we get $\lambda([f\neq 0])=0$. It means $f=0$ a.e..
A: Assume $f\in L^1[0,1], m(\{f\ne 0\}) > 0.$ The easy proof is with the Lebesgue differentiation theorem. If $F(x) =\int_0^x f = 0$ for all $x,$ then $F'(x) = f(x) = 0$ for a.e. x. That contradicts our assumption on $f,$ so some $\int_0^x f \ne 0.$
More elementary: WLOG, $f>0$ on a set of postive measure (a similar proof holds if $f<0$ on a set of postive measure). It suffices to show there is an open set $U$ such that $\int_U f>0.$ Why? Because $U$ is the pairwise disjoint union of open intervals $I_n.$ Hence we would have
$$\int_U f = \int_{\cup \,I_n} f = \sum \int_{I_n}f >0.$$
For that sum to be positive, at least one term in the sum is positive, and we're done.
Let $E = \{f>0\}.$ Then $\int_E f>0.$ There are open sets $U_1\supset U_ 2 \supset \cdots \supset E,$ with $m(E) = m(\cap U_k).$ Then $f\chi_{U_k} \to f\chi_E$ pointwise a.e. Because $|f\chi_{U_k}| \le |f|,$ the dominated convergence theorem shows
$$\lim_{k\to \infty} \int_{U_k}f = \int_E f > 0.$$
Thus $\int_{U_k}f > 0$ for large $k,$ and we're done.
