Tutorials › Calculus I › Constant Functions from Riemann Sums

Riemann Sums and the Integral · Tutorial 954 of 1495

Constant Functions from Riemann Sums

Learn why every tagged sum of a constant function equals the constant times the interval length, and how that identity gives its definite integral directly from the definition.

Intermediate 9 min read

What You'll Learn

  • Write a tagged Riemann sum for a constant function on a partition.
  • Use the sum of the subinterval widths to simplify the tagged sum.
  • Explain why the sum is independent of the partition and tag choices.
  • Prove directly from the tagged-sum definition that a constant function is integrable.
  • Evaluate constant-function definite integrals on intervals with unequal subinterval widths.
  • Identify and correct common errors involving widths and tags.

Why Constant Functions Are a Useful Starting Point

A Riemann sum combines function values with the widths of subintervals. For a general function, the function values may vary from one tag to another. For a constant function, every sampled value is the same. This makes it possible to see exactly how the subinterval widths combine, even when the partition is uneven.

The resulting calculation is simple, but it captures the central mechanism in the definition of the definite integral: tagged sums over partitions with increasingly small mesh approach a single value. In this case, the sums already have that value for every partition and every permitted choice of tags.

Partitions, Tags, and Tagged Sums

Let \(a<b\). A partition \(P\) of \([a,b]\) is a finite increasing list of points

$$ a=x_0<x_1<\cdots<x_n=b. $$

The \(i\)th subinterval is \([x_{i-1},x_i]\), and its width is \(\Delta x_i=x_i-x_{i-1}\). A tag \(\xi_i\) for that subinterval is any point in \([x_{i-1},x_i]\). The tagged Riemann sum of a function \(f\) for this partition and these tags is

$$ S(f,P,\xi)=\sum_{i=1}^{n} f(\xi_i)\,\Delta x_i =\sum_{i=1}^{n} f(\xi_i)(x_i-x_{i-1}). $$

The mesh of the partition, written \(\|P\|\), is the largest subinterval width:

$$ \|P\|=\max_{1\le i\le n}(x_i-x_{i-1}). $$

In the tagged-sum definition of the Riemann integral, \(f\) is integrable on \([a,b]\) with integral \(I\) if, for every \(\varepsilon>0\), there is a \(\delta>0\) such that every partition \(P\) with \(\|P\|<\delta\), and every allowed choice of tags, satisfies \(|S(f,P,\xi)-I|<\varepsilon\).

Definition: A constant function with value \(c\in\mathbb{R}\) on \([a,b]\) is the function \(f:[a,b]\to\mathbb{R}\) given by \(f(x)=c\) for every \(x\in[a,b]\).

The Tagged Sum for a Constant Function

If \(f(x)=c\), then every tag satisfies \(f(\xi_i)=c\). Therefore the tagged sum becomes

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

The sum of the widths is \(b-a\). To see why, write out its terms: each interior partition point appears once with a positive sign and once with a negative sign, so those terms cancel. Only the right endpoint and left endpoint remain.

$$ \begin{aligned} \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. \end{aligned} $$

Consequently, the tagged sum has the same value for every partition and all choices of tags. This is an exact equality, not an approximation that becomes accurate only when the mesh is small.

Theorem: If \(f(x)=c\) for all \(x\in[a,b]\), where \(a<b\), then for every partition \(P\) and every choice of tags \(\xi_i\), $$ S(f,P,\xi)=c(b-a). $$

Worked Example: Unequal Widths and Different Tags

Worked Example: Unequal Widths and Different Tags

Let \(f(x)=4\) on \([0,3]\). Use the partition \(0<\frac12<2<3\), with tags \(\xi_1=\frac14\), \(\xi_2=\frac32\), and \(\xi_3=\frac52\). Compute the tagged sum.

The widths are

$$ \Delta x_1=\frac12-0=\frac12,\qquad \Delta x_2=2-\frac12=\frac32,\qquad \Delta x_3=3-2=1. $$

Since the function is constant, its value at each tag is \(4\). Thus

$$ \begin{aligned} S(f,P,\xi) &=4\left(\frac12\right)+4\left(\frac32\right)+4(1)\\ &=2+6+4\\ &=12. \end{aligned} $$

Check by adding the widths first: \(\frac12+\frac32+1=3\), so the sum is \(4\cdot3=12\). This agrees with the direct calculation.

Worked Example: A Negative Constant

Worked Example: A Negative Constant

Let \(f(x)=-3\) on \([-2,4]\). Take the partition \(-2<-1<2<4\), with tags \(-\frac32\), \(0\), and \(3\), respectively. Find the tagged sum.

The three widths are

$$ \Delta x_1=-1-(-2)=1,\qquad \Delta x_2=2-(-1)=3,\qquad \Delta x_3=4-2=2. $$

At each of these tags the function value is \(-3\). Therefore

$$ \begin{aligned} S(f,P,\xi) &=(-3)(1)+(-3)(3)+(-3)(2)\\ &=-3-9-6\\ &=-18. \end{aligned} $$

As a check, the widths total \(1+3+2=6\), and multiplying by the constant gives \((-3)(6)=-18\). The sign of the constant is preserved in the sum.

Deriving the Integral from Its Definition

The tagged-sum identity directly proves the integral formula. To verify the definition, let \(\varepsilon>0\) be arbitrary and set \(I=c(b-a)\). Choose any \(\delta>0\), for example \(\delta=1\). Whenever \(P\) has mesh \(\|P\|<\delta\), the identity above gives \(S(f,P,\xi)=I\) for every choice of tags. Hence

$$ |S(f,P,\xi)-I| =|c(b-a)-c(b-a)| =0 <\varepsilon. $$

This verifies the required condition for every positive \(\varepsilon\). In fact, the mesh restriction is not needed for a constant function: the equality holds even for partitions whose subintervals are large. We may therefore conclude directly from the definition that the function is Riemann integrable and its integral is \(c(b-a)\).

1
Evaluate each sampled value.
For every tag \(\xi_i\), the constant-function condition gives \(f(\xi_i)=c\).
2
Factor out the constant.
The tagged sum becomes \(c\sum_{i=1}^{n}(x_i-x_{i-1})\).
3
Use the total width.
The partition widths sum to \(b-a\), so every tagged sum equals \(c(b-a)\).
4
Check the definition.
The difference between any tagged sum and \(c(b-a)\) is zero, which is less than every \(\varepsilon>0\).
Conclusion: For a constant function \(f(x)=c\) on an interval \([a,b]\) with \(a<b\), $$ \int_a^b c\,dx=c(b-a). $$

Worked Example: Applying the Formula on Any Partition

Worked Example: Applying the Formula on Any Partition

Let \(f(x)=7\) on \([2,9]\), and consider any partition \(2=x_0<x_1<\cdots<x_n=9\), with any permitted tags \(\xi_i\). Simplify the tagged sum without specifying the partition points.

Every sampled value is \(f(\xi_i)=7\), so

$$ \begin{aligned} S(f,P,\xi) &=\sum_{i=1}^{n}7(x_i-x_{i-1})\\ &=7\big[(x_1-x_0)+(x_2-x_1)+\cdots+(x_n-x_{n-1})\big]\\ &=7(x_n-x_0)\\ &=7(9-2)\\ &=7\cdot7\\ &=49. \end{aligned} $$

Check: the interval length is \(9-2=7\), and the constant is \(7\), so the formula gives \(7\cdot7=49\). The computation holds for every partition and every choice of tags, not just for a particular subdivision.

A Common Mistake: Counting Subintervals Instead of Width

A frequent error is to multiply the constant by the number of subintervals while forgetting that each function value must also be multiplied by its subinterval width. For instance, on the partition \(0<1<3\), the function \(f(x)=4\) has two subintervals. The incorrect calculation \(4+4=8\) treats both widths as if they were \(1\).

The actual widths are \(1-0=1\) and \(3-1=2\). The correct tagged sum, for any tags, is

$$ 4(1)+4(2)=4+8=12. $$

Checking the total width gives \(1+2=3\), and \(4\cdot3=12\), confirming the result. The number of subintervals is not generally the length of the interval; the widths, which may differ, are what must be summed.

A related point is that tags are used to select function values, not to determine widths. Here each tag gives the value \(4\), but the contribution of a subinterval is still that value multiplied by the width of that subinterval.

Why the Exact Identity Matters

The constant function provides a clear example of how a tagged-sum limit works. For a varying function, changing tags can change individual sampled values, and the mesh condition is used to control the resulting sums. For a constant function, there is no variation in sampled values, and the width calculation settles the entire question at once.

The result also gives a basic reference point for later computations: on an interval of length \(b-a\), a constant value \(c\) contributes exactly \(c(b-a)\). The formula applies whether \(c\) is positive, negative, or zero, because the proof uses only the equality of all function values and the telescoping sum of the widths.

Check Your Understanding

Use the tagged-sum definition and the total-width identity to answer each question.

  1. For \(f(x)=5\) on \([1,4]\), what is every tagged Riemann sum, regardless of the partition and tags?
  2. Why do the widths \(x_i-x_{i-1}\) sum to \(b-a\) for any partition of \([a,b]\)?
  3. For \(f(x)=-2\) on \([0,6]\), compute the tagged sum for any partition and explain why the tag choices do not affect it.
  4. In a partition with three subintervals of widths \(\frac12\), \(\frac32\), and \(2\), what is the tagged sum for the constant function \(f(x)=3\)?
  5. What choice of \(\delta\) is sufficient to verify the tagged-sum definition for a constant function, and why?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon