We define the area under an extended real function.
The positive part of an extended-real-valued function is the function mapping each element to the maximum of the function’s result and zero. The negative part of an extended-real-valued function is the function mapping each element to the maximum of the additive inverse of function's result and zero.
We decompose an extended-real-valued function as the difference of its positive part and its negative part. Both the positive and negative parts are non-negative extended-real-valued functions.
Consider a measure space. An integrable function is a measurable extended-real-valued function for which the non-negative integral of the posititve part and the non-negative integral of the negative part of the function are finite. The integral of an integrable function is the difference of the non-negative integral of the posititive part and and the non-negative integral of the negative part.
If one but not both of the parts of the function are finite, we say that the integral exists and again define it as before. In this way we avoid arithmetic between two infinities.
Suppose $A$ nonempty and $g: A \to \Rbar$.
We denote the positive part of $g$ by $g^+$
and the negative part of $g$ by $g^-$ so that
\[
g^+(x) = \max\set{g(x), 0}
\quad \text{ and } \quad
g^-(x) = \max\set{-g(x), 0} \quad \text{for all } x \in A
\]
Suppose $(X, \mathcal{A} , \mu )$ is a measure
space and $f: X \to \Rbar$ is measurable and
one of $\int f^+ d \mu $ or $\int f^- d
\mu $ is finite (if both are finite, $f$ is
integrable).
We denote the integral of $f$ with respect to
the measure $\mu $ by $\int f d\mu $ so that
\[
\int f d\mu = \int f^+ d\mu - \int f^- d\mu
\]