Does $\int_{I} f d\lambda = 0$ imply that $f=0$ $\lambda$-almost everywhere?

116 Views Asked by At

Let $f:X\rightarrow R$ for $X \subset R^n$.

I want to prove that \begin{equation} \int_{I} f d\lambda = 0 \end{equation} for all intervals $I \subset R^n$ implies that $f=0$ $\lambda$-almost everywhere on $X$. I guess the proof would be similar to the one here.

Take the rectangle $A_r(x) = \prod_{i=1}^{n}[x_i-r/2,x_i+r/2]$ centered at $x$ with edge length $r$, so $|A_r(x)|=r^n$. By assumption \begin{equation} \frac{1}{r^n} \int_{A_r(x)} f d\lambda = 0 \end{equation} for all $r > 0$.

By Lebesgue differentiation theorem, \begin{equation} f(x) = \lim_{r \rightarrow 0} \frac{1}{r^n} \int_{A_r(x)} f d\lambda = 0 \end{equation} almost everywhere on $X$.

Is this reasoning correct?

Thanks in advance.