$\int_E f\, du= \int_E g\, du$ for all measurable $E$ implies $f=g$ a.e. and measurability of $E^+$ and $E^-$ Hello I'm having trouble showing the following:
Let $u$ be a positive measure. If $\int_E f\, du= \int_E g\, du$ for all measurable $E$ then $f=g$ a.e.
I was trying to argue by contradiction: if $f\neq g$ a.e. then there must exist some set $E=\{x: f(x)\neq g(x)\}$ such that $u(E) \gt 0$. Then let $E^+=\{x: f(x)\gt g(x)\}$ and $E^-=\{x: f(x)\lt g(x)\}$. Now, if $E^+$ or $E^-$ is measurable and have positive measure then $\int_{E^+} f\, du \gt \int_{E^+} g\, du$ or $\int_{E^-} f\, du \lt \int_{E^-} g\, du$, contradiction.
As you can see, the argument hinges on $E^+$ or $E^-$ being measurable. This is the part I'm having trouble with.
 A: hint:


*

*The difference of two measurable functions is measurable

*$(0,\infty)\subset\mathbb{R}$ is Borel, so for a measurable function $F$, the set on which it takes positive values is a measurable set. 

*The collection of measurable sets form a $\sigma$ algebra, and in particular intersection of two measurable sets is measurable. 

A: Hint We have that $f$ and $g$ map into $\mathbb{R}$ from some unknown measure space, say $(X,\mathcal{M})$.  Let $h(x)=f(x)-g(x)$.  Then $E^+\subset h^{-1}(0,\infty)$ and $E^- \subset h^{-1}(-\infty,0)$.  Then recall that the sum of two measurable functions is measurable (addition is continuous), and $h$ being $\mathcal{M}$-measurable is equivalent to $f^{-1}(a,\infty)\in\mathcal{M}$ for every $a\in \mathbb{R}$ and it is also equivalent to $f^{-1}(-\infty, a)\in\mathcal{M}$ for every $a\in \mathbb{R}$. (Since these sets generate the Borel sigma algebra over $\mathbb{R}$)
Then conclude $h^{-1}(0,\infty)$ and $h^{-1}(-\infty,0)$ are measurable, and integrate over them.  
Hope that helps,
