Tutorials › Real Analysis › Integral of a Simple Function

Lebesgue Integration · Tutorial 852 of 1000

Integral of a Simple Function

Use measurable level sets to calculate simple-function integrals, interpret infinite values correctly, and distinguish finite integrals from undefined signed integrals.

Advanced 9 min read

What You'll Learn

  • Evaluate a nonnegative simple function using a finite measurable partition
  • Translate overlapping indicator representations into disjoint level sets
  • Recognize when a nonnegative simple-function integral is infinite
  • Determine when a signed simple function has a finite or undefined integral
  • Avoid treating a zero coefficient times infinite measure as a contribution

Reading a Simple Function Through Its Level Sets

The previous tutorial defined the integral of a nonnegative simple function by summing its positive values, each weighted by the measure of the set where that value occurs. In practice, a simple function is often written using a partition of the space, or as a sum of indicator functions whose sets overlap. The central task is to identify the function’s actual values on disjoint measurable sets before applying the definition.

Throughout, let \((X,\mathcal{F},\mu)\) be a measure space. Recall that a simple function has finite range, and that the integral of a nonnegative simple function is a finite sum over its distinct positive values. Measures and integrals may be infinite. In particular, a positive value on a set of infinite measure contributes \(+\infty\), while a zero value contributes nothing, even when its level set has infinite measure.

Definition: A finite measurable partition of \(X\) is a finite collection of pairwise disjoint measurable sets whose union is \(X\). If a nonnegative simple function \(s\) is constant with value \(c_i\geq 0\) on each set \(C_i\) of such a partition, its partition formula is $$ \int_X s\,d\mu=\sum_{i=1}^{r}c_i\,\mu(C_i), $$ where a term with \(c_i=0\) is defined to be \(0\), including when \(\mu(C_i)=+\infty\).

This formula follows from the level-set definition, but it is useful to make the passage explicit. A partition cell is not necessarily a level set: different cells might carry the same value. Conversely, a level set may be the union of several cells. The formula works because the measure is additive across disjoint measurable sets, including when the resulting measure is infinite.

Theorem (Finite Partition Formula): Let \(s:X\to[0,\infty)\) be a measurable simple function, and let \(C_1,\ldots,C_r\) be a finite measurable partition of \(X\) on each member of which \(s\) is constant, with value \(c_i\). Then $$ \int_X s\,d\mu=\sum_{i=1}^{r}c_i\,\mu(C_i), $$ with zero-coefficient terms interpreted as \(0\).

Proof. Let \(V\) be the finite set of distinct positive values of \(s\). For each \(a\in V\), the level set \(\{x:s(x)=a\}\) is the union of exactly those partition cells \(C_i\) for which \(c_i=a\). The cells are pairwise disjoint, so finite additivity gives $$ \mu(\{x:s(x)=a\})=\sum_{\{i:c_i=a\}}\mu(C_i). $$ This equality is valid if one or more of the measures are infinite: a finite sum of nonnegative extended values is infinite precisely when at least one term is infinite. By the definition of the simple-function integral, $$ \int_X s\,d\mu =\sum_{a\in V}a\,\mu(\{x:s(x)=a\}) =\sum_{a\in V}a\sum_{\{i:c_i=a\}}\mu(C_i). $$ Every cell with \(c_i>0\) occurs in exactly one inner sum. Cells with \(c_i=0\) make no contribution to the integral. Regrouping the finite collection of terms therefore gives $$ \int_X s\,d\mu=\sum_{i=1}^{r}c_i\,\mu(C_i), $$ where zero-coefficient terms are omitted, or equivalently assigned the value \(0\). This proves the formula. \(\square\)

Worked Calculations from Partitions

Worked Example: A Step Function on a Bounded Interval

Give \([-2,4]\) Lebesgue measure, and define \(s\) to equal \(3\) on \([-2,0)\), to equal \(1/2\) on \([0,3]\), and to equal \(0\) on \((3,4]\). These three sets are measurable, disjoint, and cover the domain. Their measures are \(2\), \(3\), and \(1\), respectively. The finite partition formula gives

$$ \int_{[-2,4]}s\,d\lambda =3(2)+\frac12(3)+0(1) =6+\frac32 =\frac{15}{2}. $$

The cell where \(s=0\) contributes zero; it is included here only to display the whole partition. The answer is determined by the lengths of the level sets, not by the length of the entire domain multiplied by one of the function’s values.

A common representation of a simple function is a sum of weighted indicators. If the sets overlap, the coefficients add at points in the overlap. Thus the coefficients in that expression need not be the distinct values of the function, and the original sets need not be its level sets. A finite partition can be formed by intersecting each set or its complement with the others, then the partition formula applies.

Worked Example: Overlapping Indicator Functions

On \([0,2]\) with Lebesgue measure, let $$ s=2\mathbf{1}_{[0,3/2]}+3\mathbf{1}_{[1,2]}. $$ The two sets overlap on \([1,3/2]\). The function equals \(2\) on \([0,1)\), equals \(5\) on \([1,3/2]\), and equals \(3\) on \((3/2,2]\). These disjoint level sets have measures \(1\), \(1/2\), and \(1/2\), respectively. Therefore

$$ \int_{[0,2]}s\,d\lambda =2(1)+5\left(\frac12\right)+3\left(\frac12\right) =2+\frac52+\frac32 =6. $$

The same value is obtained by adding the weighted measures of the original sets: $$ 2\lambda([0,3/2])+3\lambda([1,2]) =2\left(\frac32\right)+3(1) =6. $$ The agreement here reflects that the function adds both coefficients on the overlap. It is not correct to regard the value on that overlap as either \(2\) or \(3\); it is \(2+3=5\).

When Is the Integral Finite?

A simple function has only finitely many positive values, but this does not guarantee a finite integral. The measure of a level set can be infinite. The following criterion isolates exactly where finiteness enters.

Theorem (Finiteness Criterion for a Nonnegative Simple Function): Let \(s\) be a nonnegative measurable simple function with distinct positive values \(a_1,\ldots,a_m\), and let \(E_j=\{x:s(x)=a_j\}\). Then $$ \int_X s\,d\mu<\infty \quad\text{if and only if}\quad \mu(E_j)<\infty\ \text{for every }j. $$

Proof. By the definition of the integral of a simple function, $$ \int_X s\,d\mu=\sum_{j=1}^{m}a_j\mu(E_j). $$ Every \(a_j\) is strictly positive. If \(\mu(E_j)=+\infty\) for some \(j\), then \(a_j\mu(E_j)=+\infty\), so the finite sum is infinite. Conversely, if every \(\mu(E_j)\) is finite, each product \(a_j\mu(E_j)\) is finite, and a finite sum of finite nonnegative numbers is finite. If \(s\) has no positive values, then \(s=0\) everywhere and its integral is \(0\), so the criterion also holds in that case. \(\square\)

The same reasoning clarifies the signed case. For a real-valued simple function \(f\), its positive and negative parts \(f^+\) and \(f^-\) are nonnegative simple functions. The signed integral is determined by the integrals of these two parts, as defined in the previous tutorial. If both are finite, the signed integral is a finite real number. If exactly one is infinite, the extended integral has the corresponding sign. If both are infinite, the difference is undefined.

Worked Example: A Simple Function with Infinite Integral

Equip \(\mathbb{N}\) with counting measure, and define \(s(n)=4\) when \(n\) is even and \(s(n)=0\) when \(n\) is odd. The positive level set is the infinite set of even positive integers, which has infinite counting measure. Hence

$$ \int_{\mathbb{N}}s\,d\mu =4\,\mu(\{2,4,6,\ldots\}) =4(+\infty) =+\infty. $$

The function has just two values, but its integral is not finite. Finite range controls the number of terms in the defining sum; it does not control the measures of the level sets.

Worked Example: An Undefined Signed Integral

On \(\mathbb{R}\) with Lebesgue measure, let \(f=\mathbf{1}_{[0,\infty)}-\mathbf{1}_{(-\infty,0)}\). The value is \(1\) on \([0,\infty)\), \(-1\) on \((-\infty,0)\), and \(0\) nowhere else. The positive and negative parts are $$ f^+=\mathbf{1}_{[0,\infty)}, \qquad f^-=\mathbf{1}_{(-\infty,0)}. $$ Both half-lines have infinite Lebesgue measure, so $$ \int_{\mathbb{R}}f^+\,d\lambda=+\infty \quad\text{and}\quad \int_{\mathbb{R}}f^-\,d\lambda=+\infty. $$ Thus the signed integral would require subtracting \(+\infty\) from \(+\infty\), and is undefined. Although the function is simple, its positive and negative contributions do not produce a defined integral.

Finite Signed Simple-Function Integrals

For a signed simple function, finite measure of every nonzero level set is sufficient for a finite integral. In that situation one may write a finite weighted sum using the signed values themselves. This formula is safe because every term is finite; it must not be used to cancel infinite positive and negative contributions.

Theorem (Finite Formula for a Signed Simple Function): Let \(f:X\to\mathbb{R}\) be a measurable simple function with distinct nonzero values \(b_1,\ldots,b_q\) and level sets \(F_j=\{x:f(x)=b_j\}\). If \(\mu(F_j)<\infty\) for every \(j\), then \(f\) has a finite Lebesgue integral and $$ \int_X f\,d\mu=\sum_{j=1}^{q}b_j\mu(F_j). $$

Proof. The positive part \(f^+\) has positive level values among the positive \(b_j\), with level sets \(F_j\); its integral is therefore a finite sum of finite terms. The negative part \(f^-\) has positive level values \(-b_j\) for the negative \(b_j\), again on the corresponding sets \(F_j\), so its integral is also finite. By the definition of the signed integral, $$ \int_X f\,d\mu =\int_X f^+\,d\mu-\int_X f^-\,d\mu =\sum_{\{j:b_j>0\}}b_j\mu(F_j) -\sum_{\{j:b_j<0\}}(-b_j)\mu(F_j). $$ For each negative \(b_j\), subtracting \((-b_j)\mu(F_j)\) is the same as adding \(b_j\mu(F_j)\). Combining the two finite sums gives $$ \int_X f\,d\mu=\sum_{j=1}^{q}b_j\mu(F_j). $$ All terms are finite, so this rearrangement involves no subtraction of infinite quantities. \(\square\)

Worked Example: A Finite Signed Integral

On \([0,5]\) with Lebesgue measure, let \(f\) equal \(4\) on \([0,1)\), \(-2\) on \([2,4]\), and \(0\) elsewhere. The nonzero level sets have measures \(1\) and \(2\), both finite. The signed formula gives

$$ \int_{[0,5]}f\,d\lambda =4(1)+(-2)(2) =4-4 =0. $$

Here the cancellation is legitimate: the positive and negative integrals are \(4\) and \(4\), respectively, both finite. This differs from the preceding example, where each part had infinite integral.

How to Use the Formulas Safely

To calculate an integral from an indicator expression, first determine the value of the function on each region where the indicators are constant. This step produces a finite measurable partition. Then identify the distinct nonzero values, measure their level sets, and apply the appropriate formula. If any positive level set of a nonnegative simple function has infinite measure, its integral is infinite. For signed functions, check the positive and negative parts separately before combining them.

A particularly important edge case is a zero value on a set of infinite measure. The term is \(0\), not an indeterminate product. The integral sums only positive levels for a nonnegative simple function, and only nonzero levels for the finite signed formula. By contrast, a positive value times infinite measure contributes infinity. These distinctions are part of the definition, not optional conventions.

The partition formula turns the definition into a practical calculation method, while the finiteness criteria identify when a calculation yields a finite number. The next tutorial develops further properties of the simple-function integral.

Key takeaway: Compute a simple-function integral using disjoint measurable level sets. A nonnegative simple function has finite integral exactly when every positive level set has finite measure; for signed functions, never combine two infinite positive and negative integrals.

Check Your Understanding

Use the partition formula and finiteness criteria to check your understanding.

  1. Why may a finite partition cell be different from a level set of the function?
  2. If two indicator sets overlap, what value does their weighted sum take on the overlap?
  3. Can a nonnegative simple function have infinite integral despite taking only finitely many values? Explain.
  4. What condition on the nonzero level sets guarantees that a signed simple function has a finite integral?
  5. Why is it valid to subtract the positive and negative integrals in the finite signed example, but not in the example on the real line?