Tutorials › AP Calculus › Unequal-Width Riemann Sums

Riemann Sums and Definite Integrals · Tutorial 431 of 999

Unequal-Width Riemann Sums

Practice organizing unequal-width Riemann sums so every function value is paired with the correct subinterval width.

Beginner 9 min read

What You'll Learn

  • Find each subinterval’s width from consecutive partition points
  • Match a left, right, midpoint, or tagged sample value to its interval
  • Calculate and interpret signed rectangle contributions
  • Compute Riemann sums from function values and partition data
  • Identify and correct errors caused by assuming equal widths

Why Unequal Widths Need Care

A Riemann sum estimates accumulated signed area by adding the contributions of rectangles. When the subintervals all have the same width, one width can be used for every rectangle. But a partition need not divide an interval into equal pieces. If its widths vary, each rectangle must use the width of the particular subinterval on which its height is sampled.

The main task is therefore a careful match: for each subinterval, identify its width and the function value assigned to that interval. Pairing a height with the wrong width can change the result even if every function value and every width has been copied correctly.

Partition Widths and Riemann Sums

A partition of \([a,b]\) is an ordered list of points \(a=x_0<x_1<\cdots<x_n=b\). It divides the interval into \(n\) subintervals, \([x_{i-1},x_i]\). The width of the \(i\)th subinterval is the difference between its right and left endpoints.

$$ \Delta x_i=x_i-x_{i-1}. $$

For a function \(f\), choose one sample point \(c_i\) in each subinterval. The height assigned to that subinterval is \(f(c_i)\). Its signed rectangle contribution is that height multiplied by that subinterval’s width.

Definition: The Riemann sum for \(f\) on the partition \(a=x_0<x_1<\cdots<x_n=b\), using sample points \(c_i\in[x_{i-1},x_i]\), is
$$ \sum_{i=1}^{n} f(c_i)\,\Delta x_i = \sum_{i=1}^{n} f(c_i)(x_i-x_{i-1}). $$
The \(i\)th function value is paired with the width of the \(i\)th subinterval.

The sample point might be the left endpoint, the right endpoint, the midpoint, or another specified point in the subinterval. The sum uses the chosen sample point; it does not require all subintervals to have the same width.

If \(f(c_i)\) is positive, the contribution is positive. If \(f(c_i)\) is negative, the contribution is negative. Thus a Riemann sum represents signed rectangle contributions, not necessarily the sum of positive geometric areas.

A Reliable Calculation Process

With unequal widths, organize the calculation one subinterval at a time. Keeping the interval, width, sample point, function value, and product together prevents a value from drifting into a neighboring interval.

1
List the partition intervals.
Write \([x_0,x_1]\), \([x_1,x_2]\), and so on, in order.
2
Calculate each width separately.
For the interval \([x_{i-1},x_i]\), subtract its left endpoint from its right endpoint.
3
Identify the sample point and height.
Use the specified point for that interval, then evaluate \(f\) there if needed.
4
Multiply within each interval.
Compute \(f(c_i)\Delta x_i\) before adding the contributions.
5
Add the signed contributions.
Keep negative values negative and check the interval-to-width pairing.

Worked Example: A Left-Endpoint Sum

Worked Example: A Left-Endpoint Sum

A function is given on the partition \(0=x_0<x_1=1<x_2=3<x_3=5\), with \(f(0)=2\), \(f(1)=4\), and \(f(3)=1\). Calculate the left-endpoint Riemann sum.

For a left-endpoint sum, the sample point for each subinterval is its left endpoint. First calculate the widths:

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

The three intervals are \([0,1]\), \([1,3]\), and \([3,5]\). Their left-endpoint heights are \(f(0)=2\), \(f(1)=4\), and \(f(3)=1\), respectively. Multiply each height by the width of the same interval:

$$ \begin{aligned} \text{Sum} &=f(0)(1-0)+f(1)(3-1)+f(3)(5-3)\\ &=2(1)+4(2)+1(2)\\ &=2+8+2\\ &=12. \end{aligned} $$

The left-endpoint sum is \(12\). Checking the pairings gives contributions \(2\cdot1=2\), \(4\cdot2=8\), and \(1\cdot2=2\); adding them again gives \(2+8+2=12\).

Worked Example: A Right-Endpoint Sum

Worked Example: A Right-Endpoint Sum

Calculate the right-endpoint sum for \(f(x)=x+1\) on the partition \(0=x_0<x_1=2<x_2=5<x_3=6\).

The intervals are \([0,2]\), \([2,5]\), and \([5,6]\), so their widths are:

$$ \Delta x_1=2-0=2,\qquad \Delta x_2=5-2=3,\qquad \Delta x_3=6-5=1. $$

A right-endpoint sum uses \(2\), \(5\), and \(6\) as the sample points. Evaluate the function at each one:

$$ f(2)=2+1=3,\qquad f(5)=5+1=6,\qquad f(6)=6+1=7. $$

Now multiply each right-endpoint height by its own interval width:

$$ \begin{aligned} \text{Sum} &=f(2)(2-0)+f(5)(5-2)+f(6)(6-5)\\ &=3(2)+6(3)+7(1)\\ &=6+18+7\\ &=31. \end{aligned} $$

The right-endpoint sum is \(31\). The width-height products are \(6\), \(18\), and \(7\); their total, \(6+18+7\), checks the result.

Worked Example: A Sum with Specified Sample Points

Worked Example: A Sum with Specified Sample Points

A table gives \(f(0.5)=3\), \(f(2)=2\), and \(f(5)=4\). Find the Riemann sum on the partition \(0=x_0<x_1=1<x_2=4<x_3=6\), using sample points \(0.5\), \(2\), and \(5\), in that order.

Match each sample point with its interval: \(0.5\in[0,1]\), \(2\in[1,4]\), and \(5\in[4,6]\). The widths are:

$$ \Delta x_1=1-0=1,\qquad \Delta x_2=4-1=3,\qquad \Delta x_3=6-4=2. $$

The corresponding heights are \(3\), \(2\), and \(4\). Thus:

$$ \begin{aligned} \text{Sum} &=f(0.5)(1)+f(2)(3)+f(5)(2)\\ &=3(1)+2(3)+4(2)\\ &=3+6+8\\ &=17. \end{aligned} $$

The sum is \(17\). Checking interval by interval: \([0,1]\) contributes \(3\), \([1,4]\) contributes \(6\), and \([4,6]\) contributes \(8\); \(3+6+8=17\). Each sample point lies in the interval whose width it multiplies.

Why Each Width Must Match Its Height

For one subinterval \([x_{i-1},x_i]\), a rectangle with height \(f(c_i)\) and width \(x_i-x_{i-1}\) has signed area \(f(c_i)(x_i-x_{i-1})\). Adding the contributions of all the subintervals gives the Riemann sum. This explains why the product must use the height and width from the same interval: together they describe that interval’s rectangle.

More explicitly, on the \(i\)th interval, the rectangle spans horizontally from \(x_{i-1}\) to \(x_i\), giving width \(x_i-x_{i-1}\), while its chosen height is \(f(c_i)\). Its contribution is therefore exactly \(f(c_i)(x_i-x_{i-1})\). Summing these contributions for \(i=1,\ldots,n\) produces the stated sum.

$$ \sum_{i=1}^{n}\text{(height on interval }i\text{)} \cdot \text{(width of interval }i\text{)} = \sum_{i=1}^{n}f(c_i)(x_i-x_{i-1}). $$

If the function values represent a quantity per unit of \(x\), multiplying by a width in \(x\) gives a quantity accumulated over that interval. The pairing matters for the same reason: a rate on one interval must be multiplied by that interval’s width, not another interval’s width.

Common Mistake: Reusing One Width

A frequent error is to assume the widths are equal simply because there are several rectangles. In the second worked example, the widths were \(2\), \(3\), and \(1\), not a common \(\Delta x\). Using \(2\) for every width would produce this incorrect calculation:

$$ 3(2)+6(2)+7(2)=6+12+14=32. $$

The correction is to use the actual width on each interval: \(2\) for \([0,2]\), \(3\) for \([2,5]\), and \(1\) for \([5,6]\). Therefore the correct calculation is:

$$ 3(2)+6(3)+7(1)=6+18+7=31. $$

Another version of the same mistake is to use all the right heights but attach them to the wrong widths. A useful check is to write each term with its interval visible, such as \(f(5)(5-2)\), before evaluating it. That makes it harder to mistake the width of one interval for another.

Key Checks Before Adding

  • Are the partition points in increasing order?
  • Was every width computed as right endpoint minus left endpoint?
  • Does each sample point belong to the interval whose width it uses?
  • Was the specified sampling rule followed?
  • Were negative heights kept negative in the products?

Unequal-width sums use the same rectangle idea as other Riemann sums. The essential adjustment is to calculate each \(\Delta x_i\) separately and keep it attached to the function value from its own subinterval.

Check Your Understanding

For each question, track the interval, sample point, height, and width together.

  1. For the partition \(0<2<5\), what are the two subinterval widths?
  2. On the partition \(0<1<4\), a left-endpoint sum uses \(f(0)=3\) and \(f(1)=-2\). Calculate the sum.
  3. On the partition \(1<3<6\), a right-endpoint sum has \(f(3)=4\) and \(f(6)=1\). Calculate the sum.
  4. Why is it incorrect to use one common width when the partition intervals have different lengths?
  5. For a Riemann sum, what does a negative function value do to that interval’s contribution?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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