I have two similar problem in measure space.
let $f$ be an integrable function on a measure space $X,M,\mu$ such that $\int_{E} f \, d\mu = 0$for all sets $E \in M$.
let $f$ be an integrable function on a measure space $R,L,\lambda$ (that is lebesgue space and measure) such that $\int_{a}^b f \, d\lambda = 0$ for all $-\infty.
I wanna prove that $f=0$ $a.e.$ both case
I got an intution that I can using that fact: $\lambda\left\{x\mid f(x)\geq \frac 1n\right\}\leq n\int f \, d\lambda=0,$ But, I can't apply that precisely. Could you give some hints?