$f$ integrable, $g$ measurable, $f = g$ almost everywhere implies $g$ integrable If $f\in L(X,\mathcal{x},\mu)$, that is:


*

*$f\colon X\to R$ is measurable;

*$\int f^+\,d\mu<+\infty$ and $\int f^-\,d\mu<+\infty$;

*$\int f\,d\mu=\int f^+\,d\mu-\int f^-\,d\mu$.
If $g\colon X\to R$ is measurable and $f=g$ $\mu$-almost everywhere,
I need to show that $\int g^+\,d\mu<+\infty$.
Any thoughts?
Note: The integral of a non-negative measurable function $h$ is defined as
$$\int h\,d\mu=\text{sup}\left\{\int\phi\,d\mu: 0\le\phi\le h\right\},$$
where $\phi$ is a simple measurable function.
 A: Hint: let $E=\{x:f(x)=g(x),x\in X\}$.  Then, 
$$\int g d\mu = \int_E gd\mu+\int_{E^c}g d\mu$$
Show that the second integral must be zero, and you're set.
Alternate hint: try to show that $\int f=\int g$ iff $\int \vert f-g\vert =0$.
A: I'd like to thank folks for their help. Comments made me search a bit further and I came up with what I think is an appropriate solution based on my current position in Bartle's text. Looking back in chapter four of Bartle, we have already proved the following lemmas:
Lemma 1: If $f$ belongs to $M^+(X,\mathcal{X})$ (which means $f:X\to[0,+\infty]$ is measurable) and $\lambda$ is defined on $\mathcal{X}$ by $\lambda(E)=\int_Ef\,d\mu$, then $\lambda$ is a measure.
My thought: Because of the countable additivity of a measure, if $A\cap B=0$, then $\lambda(A\cup B)=\lambda(A)+\lambda(B)$. This will allow me to write $\int_{A\cup B}f\,d\mu=\int_A f\,d\mu+\int_B f\,d\mu$.
Lemma 2: Suppose that $f$ belongs to $M^+$. Then $f(x)=0$ $\mu$-almost everywhere on $X$ if and only if $\int f\,d\mu=0$.
My thought: This lemma leads to the following corollary.
Corollary 2.1: Suppose that $f$ belongs to $M^+$, and define $\lambda$ on $\mathcal{X}$ by $\lambda(E)=\int_E f\,d\mu$. Then the measure $\lambda$ is absolutely continuous with respect to $\mu$ in the sense that if $E\subset X$ and $\mu(E)=0$, then $\lambda(E)=0$.
My thought: Thus, if $f\in M^+$ and $E$ has measure zero, $\int_E f\,d\mu=0$.
Back to my problem.
$f:X\to R$ is measurable and $\int f^+\,d\mu<+\infty$ and $\int f^-\,d\mu<+\infty$.
$g:X\to R$ is measurable.
$f=g$ $\mu$-almost everywhere. 
Let $N=\{x\in X: f(x)\ne g(x)\}$. Because $f=g$ $\mu$-almost everywhere, we have  $\mu(N)=0$. By corollary 2.1, this means that if I have a function $h\in M^+$, then $\int_N h\,d\mu=0$. Thus, because $f^+\in M^+$ and $g^+\in M^+$, we may write:
$$\begin{align*}
\int g^+\,d\mu
&=\int_X g^+\,d\mu\\
&=\int_{X\backslash N}g^+\,d\mu+\int_{N}g^+\,d\mu\\
&=\int_{X\backslash N}g^+\,d\mu+0\\
&=\int_{X\backslash N}f^+\,d\mu+\int_{N}f^+\,d\mu\\
&=\int_X f^+\,d\mu\\
&=\int f^+\,d\mu\\
&<+\infty
\end{align*}$$
In similar fashion, we can show that $\int g^-\,d\mu<+\infty$.
Thus, $g$ is integrable.
A: I expand on icuray1's answer. The only difference is that I will integrate positive funtions. Their integral is always defined, provided that we allow it to take the value $+\infty$.
$E=\{x:f(x)=g(x),x\in X\}$.
Then $\int |g|d\mu= \int_E |g|d\mu +\int_{E^c} |g|d\mu = \int_E |f|d\mu < +\infty$.
We just proved that $g$ is integrable. A fortiori, $g^+$ is integrable.
