Tutorials › Measure Theory › The Integral of a Nonnegative Simple Function

Integration of Nonnegative Functions · Tutorial 236 of 798

The Integral of a Nonnegative Simple Function

Learn to compute the integral of a nonnegative simple function from the measures of its level sets, including when some contributions vanish or are infinite.

Advanced 9 min read

What You'll Learn

  • Identify the measurable level sets of a nonnegative simple function.
  • Define its integral as a finite weighted sum of level-set measures.
  • Handle zero coefficients on sets of infinite measure.
  • Determine when the integral is zero or finite.
  • Distinguish a null level set from a level set of infinite measure.

From Values to a Weighted Sum

A simple function takes only finitely many values. Its integral can therefore be specified by recording, for each value, the measure of the set on which the function takes that value. Each value weights the measure of its level set: a value of zero contributes nothing, while a positive value on a set of infinite measure contributes infinity. This definition does not require the whole measure space to have finite measure.

Throughout, let \((X,\mathcal{M},\mu)\) be an arbitrary measure space: no assumption of finiteness, sigma-finiteness, or completeness is imposed. A nonnegative simple function here is a measurable function \(f:X\to[0,\infty)\) whose range is finite. Its values are finite real numbers, although its integral may be \(+\infty\). Equalities in the definition below are pointwise, not merely almost everywhere.

Definition: Let \(a_1,\ldots,a_k\) be the distinct values of a nonnegative simple function \(f\), and let \(E_j=\{x\in X:f(x)=a_j\}\) be the corresponding level sets. These sets are measurable, pairwise disjoint, and have union \(X\). The integral of \(f\) with respect to \(\mu\) is $$ \int f\,d\mu=\sum_{j=1}^{k}a_j\,\mu(E_j). $$ The sum is finite, but each term and the sum may take the value \(+\infty\). A term with \(a_j=0\) is defined to be \(0\), even when \(\mu(E_j)=\infty\); thus \(0\cdot\infty=0\) in this formula.

If \(0\) is not a value of \(f\), there is no zero-level term. Equivalently, one may include the set where \(f=0\), if it is nonempty, since its contribution is zero. More generally, a simple function can be written using finitely many disjoint measurable pieces on which it is constant, with value zero elsewhere. The formula then adds the value times the measure of each piece and assigns zero contribution to the remaining region. In examples below, the level sets are given explicitly.

The integral is an extended nonnegative number, not necessarily a finite real number. In particular, measurable and simple do not by themselves mean integrable: in this setting, “integrable” means that the integral is finite. The definition uses only finitely many weighted measures, so there is no series or limiting operation to justify.

Calculating the Integral

Worked Example: Three Levels on a Finite Interval

Take \(X=[0,3]\), let \(\mathcal{M}\) be the Lebesgue sigma-algebra restricted to \(X\), and let \(\mu\) be Lebesgue measure on \(X\). Define \(f\) by assigning value \(0\) on \([0,1)\), value \(2\) on \([1,5/2)\), and value \(5\) on \([5/2,3]\). These are disjoint measurable level sets and cover \(X\); in particular, the endpoint \(3\) belongs to the level set of value \(5\).

The measures of the three sets are \(1-0=1\), \(5/2-1=3/2\), and \(3-5/2=1/2\). The integral is therefore

$$ \int_X f\,dm =0\cdot 1+2\cdot\frac32+5\cdot\frac12 =0+3+\frac52 =\frac{11}{2}. $$

Check: the two positive levels contribute \(3\) and \(5/2\); adding them gives \(3+5/2=6/2+5/2=11/2\), the same result. The zero level contributes nothing, although its set has measure \(1\).

Worked Example: A Zero Level Set of Infinite Measure

Take \(X=\mathbb{R}\), \(\mathcal{M}=\mathcal{L}\), the Lebesgue sigma-algebra, and \(\mu=m\), Lebesgue measure. Let \(f=3\) on \((0,1)\), \(f=1\) on \([1,2)\), and \(f=0\) on \(\mathbb{R}\setminus(0,2)\). The level sets are disjoint and cover \(\mathbb{R}\). The zero level set has infinite measure because it contains the two unbounded intervals \((-\infty,0]\) and \([2,\infty)\).

The positive level-set measures are \(m((0,1))=1\) and \(m([1,2))=2-1=1\). Hence

$$ \int_{\mathbb{R}} f\,dm =3\cdot 1+1\cdot 1+0\cdot\infty =3+1+0 =4. $$

Check: only the intervals where \(f\) is positive contribute: their weighted contributions are \(3(1)=3\) and \(1(1)=1\), giving \(3+1=4\). The infinite measure of the zero level set does not make the integral infinite.

Worked Example: A Positive Level on an Infinite-Measure Set

Again take \((X,\mathcal{M},\mu)=(\mathbb{R},\mathcal{L},m)\). Define \(f(x)=4\) for \(x\in(0,\infty)\), \(f(0)=7\), and \(f(x)=0\) for \(x\in(-\infty,0)\). The level sets are \((0,\infty)\), \(\{0\}\), and \((-\infty,0)\), with respective values \(4\), \(7\), and \(0\). Their measures are \(\infty\), \(0\), and \(\infty\): the singleton has Lebesgue measure zero, and each open half-line has infinite measure.

The level-set formula gives

$$ \int_{\mathbb{R}} f\,dm =4\cdot\infty+7\cdot 0+0\cdot\infty =\infty+0+0 =\infty. $$

Check: the positive value \(4\) occurs on a set of infinite measure, so its term alone is \(+\infty\). The value \(7\) at the single point \(0\) contributes \(7\cdot0=0\); it does not change the total. The zero level on the negative half-line also contributes zero.

When Is the Integral Zero or Finite?

The finite weighted-sum definition gives two useful criteria for a nonnegative simple function on any measure space. They include cases in which some level sets are null and cases in which other level sets have infinite measure.

Proposition: Let \(f:X\to[0,\infty)\) be simple on a measure space \((X,\mathcal{M},\mu)\), and write \(E_a=\{x:f(x)=a\}\) for each value \(a\) in its finite range. Then:
  • \(\int f\,d\mu=0\) if and only if \(\mu(E_a)=0\) for every positive value \(a\) of \(f\).
  • \(\int f\,d\mu<\infty\) if and only if \(\mu(E_a)<\infty\) for every positive value \(a\) of \(f\).

Proof. Let \(P\) be the finite set of positive values taken by \(f\). By the definition, the zero-value level set contributes zero, so $$ \int f\,d\mu=\sum_{a\in P}a\,\mu(E_a). $$ If \(P\) is empty, then \(f=0\) everywhere and the sum is the empty sum, equal to zero. Both stated criteria hold: there are no positive level sets to check.

Suppose \(P\) is nonempty. For each \(a\in P\), \(a\) is a strictly positive finite real number. Thus \(a\,\mu(E_a)=0\) exactly when \(\mu(E_a)=0\), and \(a\,\mu(E_a)\) is finite exactly when \(\mu(E_a)\) is finite. Every term in the finite sum is nonnegative. Such a sum equals zero exactly when every term equals zero, proving the first criterion. A finite sum of nonnegative extended numbers is finite exactly when every term is finite: if all terms are finite, their finite sum is finite; if any term is infinite, the sum is infinite. This proves the second criterion. \(\square\)

These criteria concern the positive-value level sets; the measure of the zero-value level set is irrelevant to both. For example, in the preceding example on \(\mathbb{R}\), the positive-value level set \((0,\infty)\) has infinite measure, so the integral is infinite. By contrast, a zero-value level set may itself have infinite measure without affecting whether the integral is zero or finite.

Common Mistakes and a Careful Checklist

A frequent error is to treat \(0\cdot\infty\) as an undefined product and conclude that the level-set formula cannot be used when a zero level set has infinite measure. In this definition, a zero coefficient contributes \(0\) by convention. For the function in the second worked example, writing “\(0\cdot\infty\) is undefined, so the integral is undefined” is wrong. The correction is to use the stated zero-term convention: \(0\cdot\infty=0\) as a contribution, and the integral is \(3+1+0=4\).

Another error is to add the values of a simple function without weighting them by the measures of their level sets. In the first worked example, adding the distinct values \(0+2+5=7\) does not compute the integral. The correct calculation uses both the values and the sizes of their sets: \(0\cdot1+2\cdot(3/2)+5\cdot(1/2)=11/2\).

For a reliable calculation, list the distinct function values, specify the corresponding measurable level sets, check that those sets are disjoint and cover the domain, and compute each measure before forming the finite sum. Then handle zero coefficients and infinite measures term by term. A positive coefficient times an infinite measure gives an infinite contribution; a zero coefficient contributes zero, and a positive coefficient times a null measure also contributes zero.

The definition applies on arbitrary measure spaces, including those that are not finite or sigma-finite. In the examples, Lebesgue measure was used, but the calculation always follows the same rule: the level-set measures are taken with respect to the measure \(\mu\) specified on the given space, and the resulting integral may be any value in \([0,\infty]\).

Check Your Understanding

For each question, identify the positive level sets and use their measures in the finite weighted sum.

  1. On \([0,2]\) with Lebesgue measure, let \(f=1\) on \([0,1)\) and \(f=4\) on \([1,2]\). Compute \(\int f\,dm\).
  2. On \(\mathbb{R}\) with Lebesgue measure, let \(f=0\) on \((-\infty,0]\) and \(f=2\) on \((0,\infty)\). Is the integral finite?
  3. For a simple \(f\) with positive values \(a_1,a_2\) on disjoint level sets \(E_1,E_2\), where \(\mu(E_1)=0\) and \(\mu(E_2)=5\), express its integral in terms of \(a_1,a_2\).
  4. Can a simple function have integral zero if its zero-level set has infinite measure? Explain using the level-set formula.
  5. State the condition on the positive-value level sets that is equivalent to the integral of a nonnegative simple function being finite.