From Values to Level Sets
A simple function has only finitely many values, so its Lebesgue integral is determined by the measures of the sets on which those values occur. For signed functions, the order of the calculation matters: positive and negative contributions must be kept separate until their integrals are known. In particular, an expression that informally subtracts two infinite quantities does not define an integral.
Throughout, let \((X,\mathcal{M},\mu)\) be an arbitrary measure space; it need not be finite, sigma-finite, or complete. Functions in this tutorial are measurable and real-valued, with only finitely many values. A statement about values or level sets is pointwise, and all measures and integrals are with respect to \(\mu\), unless Lebesgue measure \(m\) on \(\mathbb{R}\) is specified.
For a signed simple function, define \(f^+=\max(f,0)\) and \(f^-=\max(-f,0)\). Both are nonnegative simple functions, and \(f=f^+-f^-\) pointwise. The signed Lebesgue integral is defined as \(\int f\,d\mu=\int f^+\,d\mu-\int f^-\,d\mu\) if at least one of these two nonnegative integrals is finite. If both are infinite, the difference is undefined. The function is integrable, meaning \(\int |f|\,d\mu<\infty\), exactly when both parts have finite integrals.
The Level-Set Formula
Proof. On \(E_j\), the function \(f^+\) has constant value \(c_j\) when \(c_j>0\), and value \(0\) when \(c_j\le0\). Thus the disjoint level-set representation of \(f^+\) has coefficient \(c_j\) on each \(E_j\) with \(c_j>0\) and coefficient zero on the other level sets. The definition of the integral of a nonnegative simple function gives the first sum. On \(E_j\), \(f^-\) has value \(-c_j\) when \(c_j<0\), and value \(0\) otherwise, so the same definition gives the second sum. Substituting these values into the definition of the signed integral proves the stated formula whenever subtraction is defined. If both sums are infinite, the definition excludes the expression \(\infty-\infty\). \(\square\)
This calculation starts from the actual values of \(f\) on a disjoint partition. If a function is instead written using indicator functions of overlapping sets, those sets must first be partitioned according to their membership pattern. On each piece, evaluate the function itself; do not treat overlapping sets as though they were disjoint.
Worked Example: Disjoint Levels on the Real Line
With Lebesgue measure \(m\) on \(\mathbb{R}\), let \(f=4\chi_{[0,1)}-3\chi_{[1,2)}+2\chi_{[3,5)}\). Compute its integral and check it using its positive and negative parts.
The three indicated intervals are disjoint. The function has value \(4\) on \([0,1)\), value \(-3\) on \([1,2)\), value \(2\) on \([3,5)\), and value \(0\) elsewhere. Their measures are respectively \(1-0=1\), \(2-1=1\), and \(5-3=2\). The level-set formula gives
For the check, \(f^+\) equals \(4\) on a set of measure \(1\) and \(2\) on a set of measure \(2\), so \(\int f^+\,dm=4\cdot1+2\cdot2=8\). Also \(f^-\) equals \(3\) on a set of measure \(1\), so \(\int f^-\,dm=3\cdot1=3\). Therefore \(\int f\,dm=8-3=5\), agreeing with the level-by-level calculation. In addition, \(\int|f|\,dm=8+3=11<\infty\), so \(f\) is integrable.
Worked Example: Resolving Overlapping Indicator Sets
With Lebesgue measure \(m\) on \(\mathbb{R}\), let \(A=[0,2]\), \(B=[1,3]\), and \(f=2\chi_A-\chi_B\). Find the exact integral by partitioning into level sets.
The sets overlap on \([1,2]\). The pieces and the values of \(f\) are as follows: on \(A\setminus B=[0,1)\), only \(\chi_A\) is \(1\), so \(f=2\); on \(A\cap B=[1,2]\), both indicators are \(1\), so \(f=2-1=1\); on \(B\setminus A=(2,3]\), only \(\chi_B\) is \(1\), so \(f=0-1=-1\); outside \(A\cup B\), \(f=0\). The three nonzero level sets each have measure \(1\): \(1-0=1\), \(2-1=1\), and \(3-2=1\). Consequently,
Check the values directly: at \(x=\tfrac12\), \(f(x)=2\); at \(x=\tfrac32\), \(f(x)=2-1=1\); at \(x=\tfrac52\), \(f(x)=0-1=-1\). The positive contribution is \(2\cdot1+1\cdot1=3\), and the negative contribution is \(1\cdot1=1\), giving \(3-1=2\). The endpoints have been included in the stated pieces; changing finitely many endpoints would not change these Lebesgue integrals.
When Is the Integral Finite?
Proof. List the distinct nonzero values of \(f\) as \(c_1,\ldots,c_r\), and write \(E_i=\{f=c_i\}\). If there are no nonzero values, then \(f=0\) everywhere, \(\int|f|\,d\mu=0\), and the condition on nonzero level sets holds vacuously. Otherwise, set \(a=\min_{1\le i\le r}|c_i|\); because this is the minimum of finitely many positive numbers, \(a>0\). Pointwise, \(|f|\ge a\) on \(\bigcup_{i=1}^rE_i=\{f\ne0\}\), and \(|f|=0\) outside this union.
Suppose first that \(f\) is integrable. For each \(i\), the inequality \(a\chi_{E_i}\le |f|\) holds pointwise. Monotonicity of the nonnegative Lebesgue integral gives \(a\mu(E_i)\le\int|f|\,d\mu<\infty\). Since \(a>0\), this implies \(\mu(E_i)<\infty\). Conversely, suppose every \(E_i\) has finite measure. Since \(|f|=|c_i|\) on \(E_i\) and is zero off the union of these finitely many sets, its simple-function integral is \(\int|f|\,d\mu=\sum_{i=1}^r|c_i|\mu(E_i)\), a finite sum of finite numbers. Hence \(f\) is integrable. The level-set formula then expresses its integral as a difference of finite sums. \(\square\)
The criterion has an immediate consequence: if a finite-valued simple function is nonzero on a set of infinite measure, it cannot be integrable. Its integral may still exist as \(+\infty\) or \(-\infty\), provided the contributions of the opposite sign have finite integral. If both signs contribute infinite integrals, the signed integral is undefined.
Worked Example: Infinite-Measure Support
With Lebesgue measure \(m\) on \(\mathbb{R}\), let \(f=2\chi_{[0,\infty)}-3\chi_{[0,1]}\). Determine the signed integral and decide whether \(f\) is integrable.
On \([0,1]\), both indicators are \(1\), so \(f=2-3=-1\). On \((1,\infty)\), the first indicator is \(1\) and the second is \(0\), so \(f=2\). On \((-\infty,0)\), both are \(0\), so \(f=0\). Thus the negative level set has measure \(1-0=1\), while the positive level set has measure \(m((1,\infty))=\infty\). The positive and negative integrals are
Only one part has infinite integral, so the signed integral is defined and equals \(\infty-1=+\infty\). The nonzero set is \([0,\infty)\), which has infinite measure, so the theorem also shows that \(f\) is not integrable. Check the level-set formula directly: the positive level contributes \(+\infty\), the negative level contributes \(-1\), and the zero level contributes \(0\), giving \(+\infty\), not a finite real number.
For comparison, if \(g=\chi_{[0,\infty)}-\chi_{(-\infty,0)}\), then \(g=1\) on \([0,\infty)\) and \(g=-1\) on \((-\infty,0)\). Both sets have infinite measure, so \(\int g^+\,dm=\infty\) and \(\int g^-\,dm=\infty\). The expression \(\infty-\infty\) is undefined: the signed Lebesgue integral of \(g\) does not exist, even as an extended value.
A Common Error: Cancelling Infinite Contributions
A tempting but invalid calculation is to write a signed simple function as a positive indicator on one infinite-measure set minus the same indicator on another infinite-measure set, then claim the integral is zero because the two terms “cancel.” For \(g\) above, this would amount to writing \(\int g\,dm=\infty-\infty=0\). The correction is that the signed integral is defined by \(\int g^+\,dm-\int g^-\,dm\) only when at least one term is finite. Here both are infinite, so no subtraction is defined. Pointwise cancellation between different locations in the space does not make either nonnegative integral finite.
A second common error occurs with overlapping sets: treating the coefficients in \(2\chi_A-\chi_B\) as if \(A\) and \(B\) were disjoint. On \(A\cap B\), the value is \(2-1=1\), not \(2\) and not \(-1\). The reliable procedure is to divide the space into the intersection, the two set differences, and the complement, then evaluate the function on each piece. This uses the defining level-set calculation and does not require an unguarded subtraction of integrals.
In practice, the level-set method provides both an exact answer and a test of whether that answer is finite. First determine every distinct value and its measurable level set; next calculate positive and negative contributions separately; finally check whether the resulting subtraction is defined. For finite-valued functions, the integrability theorem reduces the finiteness question to the measures of the finitely many nonzero level sets.
Check Your Understanding
For each problem, identify the nonzero level sets before evaluating the integral.
- On a measure space, \(f=3\chi_A-2\chi_B\), where \(A\) and \(B\) are disjoint measurable sets with \(\mu(A)=4\) and \(\mu(B)=5\). Compute \(\int f\,d\mu\) and \(\int|f|\,d\mu\).
- With Lebesgue measure on \(\mathbb{R}\), partition \(A=[0,4]\) and \(B=[2,5]\) into their intersection, set differences, and complement. What values does \(2\chi_A-\chi_B\) take on the nonzero level sets?
- Prove that a finite-valued measurable function which is nonzero on an infinite-measure set cannot be integrable.
- For \(h=\chi_{[0,\infty)}\) on \(\mathbb{R}\) with Lebesgue measure, determine whether the signed integral is defined, whether it is finite, and whether \(h\) is integrable.
- Give a signed simple function whose positive and negative parts both have infinite integral. Explain why its signed integral is undefined rather than zero.