$f$ has a zero integral on every measurable set. Prove $f$ is zero almost everywhere

I am trying to solve the following exercise:

Let $f$ be integrable. Assume that $\int_A f d\mu = 0$ for every measurable set $A$. Prove that $f = 0$ a.e. [$\mu$].

I have the following proof but it seems to me too simple to be true. What is wrong with it?

For any $a>0$, define $W_a:=\{w|f(w)\geq a\}$. Now we have: $$\int_{W_a} fd\mu = 0 \geq \int_{W_a} ad\mu=a\mu(W_a)$$ and therefore $\mu(W_a)=0$. Same holds for the negative $a$'s. This completes my proof.

• You might want to add why it suffices to show $\mu(W_a) = 0$ for $a>0$ and $\mu(f \leq a)=0$ for $a<0$. – saz Feb 7 '16 at 19:58

Indeed, your proof shows that $\{f > 0\}$ has measure zero. Similarly, you show $\{f < 0\}$ has measure zero, and hence $f=0$ a.s. Yes it really is this easy.
It remains to show that the set $\{w\mid f(w)\ne0\}$ has measure $0$. Consider the nonzero rational $a$'s to complete the proof.