A.E. Equal Positive Measurable Functions have Equal Integrals

Theorem
Let $\left({X, \Sigma, \mu}\right)$ be a measure space.

Let $f, g: X \to \overline{\R}_{\ge 0}$ be positive $\mu$-measurable functions.

Suppose that $f = g$ almost everywhere.

Then:


 * $\displaystyle \int f \, \mathrm d \mu = \int g \, \mathrm d \mu$

Corollary
Let $f: X \to \overline{\R}$ be a $\mu$-integrable function, and $g: X \to \overline{\R}$ be measurable.

Suppose that $f = g$ almost everywhere.

Then $g$ is also $\mu$-integrable, and:


 * $\displaystyle \int f \, \mathrm d \mu = \int g \, \mathrm d \mu$

Proof
Let $N$ be the set defined by:


 * $N = \left\{{x \in X: f \left({x}\right) \ne g \left({x}\right)}\right\}$

By hypothesis, $N$ is a $\mu$-null set.

If $N = \varnothing$, then $f = g$, trivially implying the result.

If $N \ne \varnothing$, then by Set with Relative Complement forms Partition:


 * $X = N \cup \left({X \setminus N}\right)$

Now:

which establishes the result.