Tutorials › Measure Theory › Computing Simple-Function Integrals by Level Sets

Integration of Nonnegative Functions · Tutorial 238 of 798

Computing Simple-Function Integrals by Level Sets

Use successive level thresholds to rewrite simple functions and calculate their Lebesgue integrals without losing track of nested sets or infinite values.

Advanced 9 min read

What You'll Learn

  • Identify the distinct positive values of a nonnegative simple function and order them as thresholds.
  • Express the function as a finite sum of indicators of nested positive level sets.
  • Derive the integral formula using successive differences between thresholds.
  • Compute examples by level sets and verify them using disjoint level regions.
  • Determine when a simple-function integral is infinite.
  • Avoid confusing exact-value sets with positive superlevel sets.

From Values to Nested Level Sets

A simple function is often presented by listing the disjoint regions on which it takes each value. That description is useful, but there is another one: at each positive threshold, record the set where the function reaches or exceeds that threshold. These positive level sets are nested. The gaps between successive values then give the coefficients needed to reconstruct the function from those sets. This viewpoint can make an integral calculation shorter, especially when the level sets are already known.

Throughout, \((X,\mathcal{M},\mu)\) is an arbitrary measure space; no finiteness, completeness, or sigma-finiteness assumption is imposed. A nonnegative simple function here means an \(\mathcal{M}\)-measurable function \(\varphi:X\to[0,\infty)\) taking only finitely many finite values. Its integral is the extended nonnegative number obtained from a disjoint representation: if \(\varphi=\sum_{r=1}^k a_r\chi_{A_r}\), where the \(A_r\) are disjoint measurable sets and \(a_r\ge0\), then \(\int\varphi\,d\mu=\sum_{r=1}^k a_r\mu(A_r)\). A term with coefficient zero contributes zero, even if its set has infinite measure.

Definition: For \(t>0\), the positive superlevel set of \(\varphi\) at threshold \(t\) is \(\{x\in X:\varphi(x)\ge t\}\). For a nonnegative simple function, each such set is measurable. As \(t\) increases, these sets can only shrink.

List the distinct positive values of \(\varphi\) in increasing order, say \(0<a_1<a_2<\cdots<a_k\), and put \(a_0=0\). The associated level sets are \(E_j=\{\varphi\ge a_j\}\). They satisfy \(E_1\supseteq E_2\supseteq\cdots\supseteq E_k\). The key point is that the coefficient of \(E_j\) is not the value \(a_j\), but the increment \(a_j-a_{j-1}\).

The Level-Set Decomposition

Lemma (Level-set representation): With the thresholds and sets above, the following equality holds at every \(x\in X\): $$ \varphi(x)=\sum_{j=1}^{k}(a_j-a_{j-1})\chi_{E_j}(x). $$ If \(\varphi\) is identically zero, the list of positive values is empty and the sum is the empty sum, equal to zero.

Proof. If \(\varphi(x)=0\), then \(x\notin E_j\) for every \(j\), so the right-hand side is zero. Otherwise, \(\varphi(x)=a_r\) for exactly one index \(r\in\{1,\ldots,k\}\). For \(j\le r\), \(a_j\le a_r\), so \(x\in E_j\); for \(j>r\), \(a_j>a_r\), so \(x\notin E_j\). Thus the right-hand side at \(x\) is \(\sum_{j=1}^{r}(a_j-a_{j-1})=a_r-a_0=a_r=\varphi(x)\), by telescoping. This proves the equality at every point. \(\square\)

This is a representation by nested sets, not by disjoint sets. A point where \(\varphi(x)=a_r\) belongs to the first \(r\) level sets, so its contributions add to \(a_r\). The next result turns that pointwise identity into an integral calculation.

Theorem (Simple-function integral by level sets): For the same nonnegative simple function on \((X,\mathcal{M},\mu)\), $$ \int\varphi\,d\mu=\sum_{j=1}^{k}(a_j-a_{j-1})\,\mu(E_j), \qquad E_j=\{\varphi\ge a_j\}. $$ The equality is in \([0,\infty]\); if any \(E_j\) with positive coefficient has infinite measure, the integral is infinite.

Proof. Let \(A_r=\{\varphi=a_r\}\) for \(1\le r\le k\). These sets are disjoint and measurable, and together with \(A_0=\{\varphi=0\}\) they partition \(X\). By the definition of the simple-function integral, \(\int\varphi\,d\mu=\sum_{r=1}^k a_r\mu(A_r)\). For each \(j\), \(E_j=\bigcup_{r=j}^k A_r\), a finite disjoint union. Finite additivity gives \(\mu(E_j)=\sum_{r=j}^k\mu(A_r)\), with infinite values allowed. Therefore \[ \sum_{j=1}^k(a_j-a_{j-1})\mu(E_j) =\sum_{j=1}^k(a_j-a_{j-1})\sum_{r=j}^k\mu(A_r) =\sum_{r=1}^k\left(\sum_{j=1}^r(a_j-a_{j-1})\right)\mu(A_r) =\sum_{r=1}^k a_r\mu(A_r). \] The rearrangement involves only finitely many nonnegative terms, so it remains valid when some terms are infinite. The last expression is the defining integral, proving the formula. Each coefficient \(a_j-a_{j-1}\) is strictly positive; hence an infinite \(\mu(E_j)\) makes the corresponding term, and therefore the sum, infinite. \(\square\)

Computing with the Formula

Worked Example: Overlapping Indicators

On \(\mathbb{R}\) with Lebesgue measure \(m\), let \(\varphi=2\chi_{[0,3)}+5\chi_{[1,2)}\). Compute \(\int\varphi\,dm\) using positive level sets, then check by splitting into disjoint regions.

The two intervals overlap, so first determine the actual values of \(\varphi\). It is \(2\) on \([0,1)\) and \([2,3)\), \(7\) on \([1,2)\), and \(0\) elsewhere. Its distinct positive values are \(a_1=2\) and \(a_2=7\), with \(a_0=0\). The level sets are \(E_1=\{\varphi\ge2\}=[0,3)\) and \(E_2=\{\varphi\ge7\}=[1,2)\). Their measures are \(m(E_1)=3\) and \(m(E_2)=1\). Thus $$ \int\varphi\,dm=(2-0)\cdot3+(7-2)\cdot1=6+5=11. $$ Check: the disjoint regions give \(2\cdot1+7\cdot1+2\cdot1=2+7+2=11\). Both calculations give the same integral.

Worked Example: Three Nested Level Sets

On \(\mathbb{R}\) with Lebesgue measure, take \(E_1=[0,5)\), \(E_2=[1,4)\), and \(E_3=[2,3)\), so \(E_1\supset E_2\supset E_3\). Define \(\varphi=\chi_{E_1}+\chi_{E_2}+\chi_{E_3}\). Compute its integral from its level sets and verify the result.

On \(E_1\setminus E_2=[0,1)\cup[4,5)\), the value is \(1\). On \(E_2\setminus E_3=[1,2)\cup[3,4)\), the value is \(2\). On \(E_3=[2,3)\), the value is \(3\); off \(E_1\), it is zero. Therefore the distinct positive values are \(1,2,3\), and their positive level sets are exactly \(E_1,E_2,E_3\). Their measures are \(5,3,1\), respectively. With successive increments \(1-0=1\), \(2-1=1\), and \(3-2=1\), $$ \int\varphi\,dm=1\cdot5+1\cdot3+1\cdot1=9. $$ Check: the disjoint regions have measures \(2,2,1\) and values \(1,2,3\). Their integral is \(1\cdot2+2\cdot2+3\cdot1=2+4+3=9\), as before.

Worked Example: A Positive Level Set of Infinite Measure

On \(\mathbb{R}\) with Lebesgue measure, let \(\varphi=\chi_{[0,\infty)}+3\chi_{[0,1)}\). Compute its integral, paying attention to which level set has infinite measure.

The function is \(4\) on \([0,1)\), \(1\) on \([1,\infty)\), and \(0\) on \((-\infty,0)\). Its positive values are \(a_1=1\) and \(a_2=4\). Thus \(E_1=[0,\infty)\) and \(E_2=[0,1)\). We have \(m(E_1)=\infty\) and \(m(E_2)=1\), so $$ \int\varphi\,dm=(1-0)\cdot\infty+(4-1)\cdot1=\infty+3=\infty. $$ Check: the disjoint regions give \(4\cdot m([0,1))+1\cdot m([1,\infty))=4\cdot1+1\cdot\infty=\infty\). Also, \(m([1,N))=N-1\) for each \(N>1\), and these measures grow without bound, confirming that \([1,\infty)\) has infinite Lebesgue measure. The finite contribution from \([0,1)\) cannot make the total finite.

What the Level Sets Do—and Do Not—Measure

The level-set formula is especially useful when the nested sets are easier to describe or measure than the separate regions where the function takes exact values. It also makes the role of infinite measure explicit: a positive increment multiplying an infinite level-set measure forces an infinite integral. By contrast, the measure of the whole space alone does not decide the integral. A simple function can vanish outside a set of finite measure even when \(X\) has infinite measure.

For example, on \(\mathbb{R}\) with Lebesgue measure, \(\psi=2\chi_{[0,1)}\) has \(E_1=[0,1)\), whose measure is \(1\), so its integral is \(2\). The ambient space has infinite measure, but no positive level set of \(\psi\) does. In general, the finite sum in the theorem is finite exactly when every positive level set has finite measure; all its increments are positive. This criterion concerns the level sets of the function, not whether the measure space itself is finite or sigma-finite.

A frequent error is to use the increment \(a_j-a_{j-1}\) with the exact-value set \(\{\varphi=a_j\}\), rather than with the superlevel set \(\{\varphi\ge a_j\}\). In the first worked example, that incorrect calculation would give \(2\cdot m(\{\varphi=2\})+5\cdot m(\{\varphi=7\})=2\cdot2+5\cdot1=9\). It misses the extra contribution of the higher value on the threshold-\(2\) set. The correct formula uses \(E_1=[0,3)\) and \(E_2=[1,2)\), giving \(2\cdot3+5\cdot1=11\). The higher-value region belongs to both superlevel sets, exactly as needed for the nested contributions to add to the function's value.

Takeaway: Order the distinct positive values, take the corresponding sets \(\{\varphi\ge a_j\}\), and multiply each set's measure by the gap from the preceding value. The sets are nested, and the gaps—not the full thresholds—reconstruct the function.

Check Your Understanding

For each question, identify the distinct positive values and use the associated sets with the non-strict threshold \(\varphi\ge a_j\).

  1. On \(\mathbb{R}\) with Lebesgue measure, let \(\varphi=3\chi_{[0,4)}+2\chi_{[1,2)}\). Find its positive level sets and compute its integral by the level-set formula.
  2. If the positive values of a simple function are \(2\) and \(6\), write the level-set decomposition using \(E_1=\{\varphi\ge2\}\) and \(E_2=\{\varphi\ge6\}\).
  3. Give a condition on the measures of the positive level sets that makes the integral of a nonnegative simple function finite.
  4. Explain why the formula uses \(\{\varphi\ge a_j\}\), rather than \(\{\varphi=a_j\}\), together with the increment \(a_j-a_{j-1}\).