Tutorials › Real Analysis › Integrability of Constant Functions

Riemann Integration · Tutorial 471 of 1000

Integrability of Constant Functions

See why every partition gives the same lower and upper sum for a constant function, and use that fact to find its Riemann integral.

Advanced 9 min read

What You'll Learn

  • Define a constant function on the entire closed interval, including its endpoints
  • Calculate the infimum and supremum on every partition interval
  • Prove that constant functions have matching upper and lower sums
  • Apply the Darboux Criterion without needing to refine a partition
  • Evaluate the integral of a positive, negative, or zero constant
  • Recognize why changing an endpoint value means the function is no longer globally constant

When Every Partition Gives the Same Answer

Upper and lower sums usually depend on the partition: changing the partition can change the infima and suprema used to calculate them. For a constant function, however, each of those infima and suprema is the same value. Consequently, the upper and lower sums agree for every partition, no matter how coarse it is. This gives a direct application of the Darboux Criterion and an exact formula for the integral.

The word “constant” here applies to the whole closed interval. In particular, the value at each endpoint must be the same as the value at every interior point. This matters because the suprema and infima in upper and lower sums are taken over closed partition intervals, which include their endpoints.

Definition: Let \(a<b\), and let \(c\in\mathbb{R}\). The constant function with value \(c\) on \([a,b]\) is the function \(f:[a,b]\to\mathbb{R}\) defined by \(f(x)=c\) for every \(x\in[a,b]\).

The constant \(c\) can be positive, negative, or zero. The definition requires no continuity argument: it specifies every value of the function directly. In particular, it does not permit a different value at either endpoint.

Exact Upper and Lower Sums

Let \(P=\{x_0,\ldots,x_n\}\) be any partition of \([a,b]\), where \(a=x_0<x_1<\cdots<x_n=b\). On each interval \([x_{i-1},x_i]\), every value of \(f\) is exactly \(c\). Thus the infimum and supremum on that interval coincide. The resulting sums can be calculated without choosing or refining the partition.

Theorem (Exact Sums for a Constant Function): If \(f(x)=c\) for every \(x\in[a,b]\), then for every partition \(P\) of \([a,b]\), $$ L(f,P)=U(f,P)=c(b-a). $$

Proof. Fix a partition \(P=\{x_0,\ldots,x_n\}\). For every index \(i\) with \(1\leq i\leq n\), the set of values of \(f\) on \([x_{i-1},x_i]\) is the singleton set \(\{c\}\). Its infimum and supremum are both \(c\). Therefore

$$ L(f,P)=\sum_{i=1}^{n}c(x_i-x_{i-1}), \qquad U(f,P)=\sum_{i=1}^{n}c(x_i-x_{i-1}). $$

Factor out \(c\). The interval lengths telescope:

$$ \sum_{i=1}^{n}(x_i-x_{i-1}) =(x_1-x_0)+(x_2-x_1)+\cdots+(x_n-x_{n-1}) =x_n-x_0=b-a. $$

It follows that both sums equal \(c(b-a)\), as claimed. \(\square\)

This calculation also explains why the sign of \(c\) causes no difficulty. Each interval length is positive, and the same value \(c\), whether positive, negative, or zero, appears in every term. No inequality involving multiplication by \(c\) is needed: we have an equality term by term.

Worked Example: A Positive Constant on an Uneven Partition

Let \(f(x)=7\) on \([-2,5]\), and take the uneven partition \(P=\{-2,-1,2,5\}\). The three interval lengths are \(1\), \(3\), and \(3\). On every one of these closed intervals, the infimum and supremum of \(f\) are both \(7\). Hence

$$ L(f,P)=7(1)+7(3)+7(3)=7+21+21=49, $$

and

$$ U(f,P)=7(1)+7(3)+7(3)=49. $$

The total interval length is \(5-(-2)=7\), so the theorem gives \(c(b-a)=7\cdot7=49\). The uneven spacing of the partition points does not affect the answer; only the total length enters the formula.

The Darboux Criterion Gives Integrability

The Darboux Criterion, established earlier in this course, says that a bounded function on \([a,b]\) is Riemann integrable if and only if, for every \(\varepsilon>0\), there is a partition \(P\) for which \(U(f,P)-L(f,P)<\varepsilon\). A constant function is bounded: for example, \(|f(x)|=|c|\) at every point. The exact-sums theorem gives an even stronger conclusion than the criterion asks for: the Darboux gap is zero for every partition.

Theorem (Integrability and Integral of a Constant Function): If \(f(x)=c\) for every \(x\in[a,b]\), where \(a<b\), then \(f\) is Riemann integrable and $$ \int_a^b f(x)\,dx=c(b-a). $$

Proof. The function is bounded, and the exact-sums theorem gives \(U(f,P)-L(f,P)=0\) for every partition \(P\). Since \(0<\varepsilon\) for every \(\varepsilon>0\), any partition satisfies \(U(f,P)-L(f,P)<\varepsilon\). The Darboux Criterion therefore implies that \(f\) is Riemann integrable.

For every partition, both sums equal \(c(b-a)\). Taking the supremum of the lower sums and the infimum of the upper sums therefore gives the same value \(c(b-a)\). Equivalently, the common Darboux integral is \(c(b-a)\), which proves the formula. \(\square\)

There is no need to make the mesh small in this proof. For more complicated functions, refining a partition can be important because it may reduce the gap between the upper and lower sums. Here the gap is already zero, even for a partition consisting of just the two endpoints.

Worked Example: A Negative Constant

Let \(g(x)=-3\) on \([1,4]\), and choose \(P=\{1,\frac32,4\}\). The interval lengths are \(\frac12\) and \(\frac52\). On both intervals the infimum and supremum are \(-3\), so

$$ L(g,P)=(-3)\frac12+(-3)\frac52 =-\frac32-\frac{15}{2} =-\frac{18}{2}=-9, $$

and the same calculation gives \(U(g,P)=-9\). The integral formula independently gives

$$ \int_1^4 g(x)\,dx=(-3)(4-1)=(-3)(3)=-9. $$

A negative constant produces a negative integral on an interval of positive length. This is consistent with the bounds for the integral established earlier: since \(g(x)=-3\) everywhere, both the lower and upper pointwise bounds are \(-3\), and both give the bound \(-3(4-1)=-9\).

Worked Example: The Zero Function

Let \(h(x)=0\) on \([-4,2]\), and use the partition \(P=\{-4,-3,1,2\}\). Its interval lengths are \(1\), \(4\), and \(1\). Every infimum and supremum is zero, so

$$ L(h,P)=0(1)+0(4)+0(1)=0, \qquad U(h,P)=0(1)+0(4)+0(1)=0. $$

The integral formula gives \(0(2-(-4))=0\), in agreement with both sums. This example also shows why the integral formula is not an assertion that the integral must be positive: its value depends on the constant and on the interval length.

Using the Formula Carefully

The expression \(c(b-a)\) has two factors with distinct roles. The constant \(c\) gives the function’s height, and \(b-a\) gives the interval’s length. For \(c>0\), the area is positive; for \(c<0\), the integral is negative; and for \(c=0\), it is zero. These signs follow directly from the formula because \(b-a>0\).

A common mistake is to think that a function is constant because it has the same value at every interior point, while overlooking a different value at an endpoint. Under the definition here, that function is not constant on the closed interval. For instance, let \(q(0)=2\) and \(q(x)=0\) for \(0<x\leq1\). On a partition interval containing \(0\), the infimum and supremum need not both be zero: the endpoint value \(q(0)=2\) is included. Thus the exact-sums proof for a constant function does not apply to \(q\).

This distinction does not mean that changing one endpoint value necessarily destroys integrability. The earlier Theorem (Finite Point Changes Do Not Affect the Integral) addresses that different situation. The point here is narrower: to use the definition of a constant function and the exact-sums theorem, the function must equal \(c\) at every point of \([a,b]\), endpoints included.

The formula also depends on using an interval of positive length, as stipulated by \(a<b\). All partition intervals then have positive length, and their lengths sum to \(b-a\). When applying the result, first identify the actual interval and the single value taken everywhere on it; then substitute those two quantities into \(c(b-a)\). There is no need to estimate extrema or search for a helpful partition.

1
Check the domain and values.
Confirm that the function takes one fixed value \(c\) at every point of the closed interval \([a,b]\).
2
Find the interval length.
Compute \(b-a\), which is positive because \(a<b\).
3
Multiply.
The integral is \(c(b-a)\); the same value is both the upper and lower sum for every partition.

The main benefit of the result is not merely a quick integral calculation. It is a model case for the Darboux approach: identify the oscillation of a function on each partition interval, and determine whether the total upper-lower gap can be made small. For a constant function there is no oscillation at all, so every interval contributes exactly the same amount to both sums.

Check Your Understanding

Use the definition on the closed interval and the exact-sums theorem to answer the following questions.

  1. For a constant function \(f(x)=c\), what are the infimum and supremum of \(f\) on any partition interval?
  2. Why do the interval lengths in the sum add to \(b-a\), regardless of the partition?
  3. What is the integral of the constant function with value \(-5\) on \([2,6]\)?
  4. Does a constant function require a fine partition to satisfy the Darboux Criterion? Explain.
  5. If a function has value \(c\) at every interior point but a different value at an endpoint, is it a constant function on the closed interval as defined here?