Let $(X,\mu)$ be a measure space. Suppose that $f,g\in L^{1}(X,\mu)$ satisfy $$\int_{A}f \ \text{d}\mu=\int_{A}g \ \text{d}\mu\qquad(*)$$ for every measurable subset $A\subset X$. Can we conclude that $f=g$ almost everywhere? If it is true, how do I prove it? If it is not true, is there an easy counterexample?
Here is what I know:
- I know that the conclusion is not true if $(*)$ only holds for $A:=X$, for example, $\int_{0}^{1}\frac{1}{2} \ \text{d}t=\int_{0}^{1}t \ \text{d}t$.
- My intuition says that is is true. If $f-g\geq0$ and $\int_{X} f \ \text{d}\mu=\int_{X} g \ \text{d}\mu$, then $f=g$ almost everywhere. So I was thinking that we could use the set $A:=\{x\in X:f(x)\geq g(x)\}$. Then $f-g\geq0$ on $A$. But I don't know if $A$ is measurable and if this will even work.
Any suggestions are greatly appreciated!
Yes, your approach is correct. To elaborate, let $h=f-g$. Without loss of generality we can assume that $h$ takes value in $\mathbb{R}\cup\{\infty\}$. Consider the sets $A_n=h^{-1}\Big(\big[\frac{1}{n},\infty\big]\Big)$ and $B_n=h^{-1}\Big(\big[-\infty,-\frac{1}{n}\big]\Big)$ for $n\in\mathbb{N}$. These sets are inverse image of measurable sets, and hence measurable. Now $0=\int_{A_n}h\,d\mu\geq\frac{1}{n}\mu(A_n)$, and hence $\mu(A_n)=0$. Similarly we can show $\mu(B_n)=0$. Hence $\mu(\bigcup_n (A_n \cup B_n))=0$. But $\bigcup_n A_n\cup B_n=h^{-1}\big(\{0\}^c\big)$. Therefore $\mu\Big((h^{-1}\big(\{0\}^c\big)\Big)=0$ and $h$ is zero almost everywhere.