Tutorials › AP Calculus › Comparing Numerical Sum Methods on the Same Data

Riemann Sums and Definite Integrals · Tutorial 437 of 999

Comparing Numerical Sum Methods on the Same Data

Learn to calculate and compare four numerical sum methods on a common partition, and explain how their sample locations and the function’s shape influence the results.

Beginner 9 min read

What You'll Learn

  • Set up left, right, midpoint, and trapezoidal sums on the same partition
  • Identify which function values each method requires
  • Compare left and right sums for increasing or decreasing functions
  • Relate the trapezoidal sum to the left and right sums
  • Use function shape to interpret midpoint and trapezoidal estimates
  • Recognize when sampled data are insufficient for a particular method

Why Compare the Methods?

Each numerical sum method estimates accumulated change by dividing an interval into pieces and using selected function values to represent each piece. The methods can give different answers even when they use the same partition, because they sample the function at different locations.

A fair comparison therefore keeps the interval and subintervals fixed. Then differences in the estimates come from the choice of sample locations and, when the function is known, the way its shape behaves between those locations.

Key idea: Left, right, midpoint, and trapezoidal sums are not four names for the same calculation. They use different heights, so comparing them requires keeping track of which function values each method uses.

Four Methods on a Common Partition

Let \(x_0<x_1<\cdots<x_n\) be the partition points of an interval, and let \(\Delta x_i=x_i-x_{i-1}\) be the width of subinterval \(i\). Each width is positive. A sum is formed by multiplying each width by a chosen height and adding the products.

  • The left sum uses the function value at the left endpoint of each subinterval.
  • The right sum uses the value at the right endpoint.
  • The midpoint sum uses the value at the midpoint of each subinterval.
  • The trapezoidal sum uses the average of the two endpoint values on each subinterval.
$$ L=\sum_{i=1}^{n} f(x_{i-1})\,\Delta x_i,\qquad R=\sum_{i=1}^{n} f(x_i)\,\Delta x_i $$
$$ M=\sum_{i=1}^{n} f\!\left(\frac{x_{i-1}+x_i}{2}\right)\Delta x_i,\qquad T=\sum_{i=1}^{n}\frac{f(x_{i-1})+f(x_i)}{2}\,\Delta x_i $$

These formulas also clarify what information is needed. Left, right, and trapezoidal sums can be calculated from endpoint values. A midpoint sum requires the function value at every subinterval midpoint; endpoint data alone do not generally provide those values.

Worked Example: Comparing Four Sums for a Quadratic

Worked Example: Comparing Four Sums for a Quadratic

Estimate the accumulated area for \(f(x)=x^2\) on \([0,2]\), using the partition \(0,1,2\). Each subinterval has width \(\Delta x=1\). The endpoint values are \(f(0)=0\), \(f(1)=1\), and \(f(2)=4\). The midpoint values are \(f(0.5)=0.25\) and \(f(1.5)=2.25\).

Left sum: Use the left endpoint of each subinterval.

$$L=1\cdot f(0)+1\cdot f(1)=1\cdot 0+1\cdot 1=1.$$

Right sum: Use the right endpoint of each subinterval.

$$R=1\cdot f(1)+1\cdot f(2)=1\cdot 1+1\cdot 4=5.$$

Midpoint sum: Use the midpoint of each subinterval.

$$M=1\cdot f(0.5)+1\cdot f(1.5)=1\cdot 0.25+1\cdot 2.25=2.5.$$

Trapezoidal sum: Average the endpoint values on each subinterval.

$$T=1\cdot\frac{f(0)+f(1)}{2}+1\cdot\frac{f(1)+f(2)}{2}=\frac{0+1}{2}+\frac{1+4}{2}=0.5+2.5=3.$$

Thus the estimates are \(L=1\), \(M=2.5\), \(T=3\), and \(R=5\). The function is increasing, so the left sum is below the right sum. It is also concave up, which explains why its midpoint estimate is below the true accumulated area while its trapezoidal estimate is above it.

Check: The trapezoidal estimate is the average of the left and right estimates: \((1+5)/2=3\), matching the calculation.

A Relationship Between the Left, Right, and Trapezoidal Sums

On each subinterval, the trapezoidal method uses the average of the left and right endpoint heights. Summing that fact gives a useful relationship: for any partition, including one with unequal widths, the trapezoidal sum is the average of the left and right sums.

Theorem: For a fixed partition, \(T=(L+R)/2\). This statement does not require the function to be increasing, decreasing, or concave; it follows directly from the definitions of the three sums.

To see why, write the two endpoint sums using the same subinterval widths. Adding them pairs the left and right heights for each subinterval. Dividing by two gives the trapezoidal contribution on that subinterval.

$$ \begin{aligned} \frac{L+R}{2} &=\frac{1}{2}\left(\sum_{i=1}^{n} f(x_{i-1})\Delta x_i+ \sum_{i=1}^{n} f(x_i)\Delta x_i\right)\\ &=\sum_{i=1}^{n}\frac{f(x_{i-1})+f(x_i)}{2}\Delta x_i\\ &=T. \end{aligned} $$

Because an average of two numbers lies between them, \(T\) is between \(L\) and \(R\), or equal to both if they are equal. This does not mean that the midpoint sum must lie between the left and right sums; midpoint heights are not formed by averaging endpoint heights.

Worked Example: All Four Methods for a Linear Function

Worked Example: All Four Methods for a Linear Function

Use \(f(x)=2x+1\) on \([0,4]\), with partition points \(0,1,2,3,4\). Each width is \(1\). The endpoint values are \(1,3,5,7,9\), and the midpoint values at \(0.5,1.5,2.5,3.5\) are \(2,4,6,8\).

Left sum:

$$L=1(1+3+5+7)=1(16)=16.$$

Right sum:

$$R=1(3+5+7+9)=1(24)=24.$$

Midpoint sum:

$$M=1(2+4+6+8)=1(20)=20.$$

Trapezoidal sum: The four subinterval contributions are \((1+3)/2=2\), \((3+5)/2=4\), \((5+7)/2=6\), and \((7+9)/2=8\).

$$T=2+4+6+8=20.$$

The estimates are \(16,24,20,20\) for the left, right, midpoint, and trapezoidal methods, respectively. For this linear function, the midpoint and trapezoidal values agree. The trapezoidal value also checks as \((16+24)/2=20\).

How Function Shape Affects the Comparison

If \(f\) is increasing across every subinterval, its value at each left endpoint is no greater than its value at the corresponding right endpoint. Since the widths are positive, multiplying by the widths and adding gives \(L\le R\). If \(f\) is decreasing, the inequalities reverse, so \(R\le L\). These comparisons concern the endpoint sums; they do not by themselves locate the midpoint sum.

Concavity helps interpret midpoint and trapezoidal estimates relative to the true accumulated area. For a function that is concave up throughout the interval, the midpoint method tends to underestimate and the trapezoidal method to overestimate. For a function that is concave down, the direction reverses. These conclusions depend on the stated concavity holding across the interval, not just at a few sample points.

Worked Example: A Concave-Down Function

Worked Example: A Concave-Down Function

Compare the four methods for \(f(x)=-x^2+4x\) on \([0,4]\), using partition points \(0,2,4\). Each subinterval has width \(2\). The endpoint values are \(f(0)=0\), \(f(2)=4\), and \(f(4)=0\). The midpoint values are \(f(1)=3\) and \(f(3)=3\).

Left sum: The left heights are \(0\) and \(4\).

$$L=2(0)+2(4)=0+8=8.$$

Right sum: The right heights are \(4\) and \(0\).

$$R=2(4)+2(0)=8+0=8.$$

Midpoint sum:

$$M=2(3)+2(3)=6+6=12.$$

Trapezoidal sum: The average endpoint heights are \((0+4)/2=2\) and \((4+0)/2=2\).

$$T=2(2)+2(2)=4+4=8.$$

The values are \(L=8\), \(R=8\), \(M=12\), and \(T=8\). The function is concave down, consistent with the midpoint estimate being high and the trapezoidal estimate being low relative to the true accumulated area. The trapezoidal relationship checks: \((L+R)/2=(8+8)/2=8\).

Comparing Methods When Only Data Are Given

For a table of sampled data, first check which locations have recorded values. Endpoint data are enough for the left, right, and trapezoidal sums on a given partition. A midpoint sum needs observations at the subinterval midpoints. If those observations are missing, the midpoint sum cannot be calculated from the table alone without making an additional assumption about values between recorded points.

Worked Example: Comparing Methods from Sampled Data

Suppose a rate, measured in liters per minute, is recorded at times \(t=0,1,2\) minutes as \(2,4,3\) liters per minute. Additional readings at the subinterval midpoints are \(3\) at \(t=0.5\) and \(4\) at \(t=1.5\). Use the partition \(0,1,2\), whose widths are both \(1\) minute.

Left estimate: Use the rates at \(t=0\) and \(t=1\).

$$L=(2)(1)+(4)(1)=2+4=6\text{ liters}.$$

Right estimate: Use the rates at \(t=1\) and \(t=2\).

$$R=(4)(1)+(3)(1)=4+3=7\text{ liters}.$$

Midpoint estimate: Use the midpoint readings at \(t=0.5\) and \(t=1.5\).

$$M=(3)(1)+(4)(1)=3+4=7\text{ liters}.$$

Trapezoidal estimate: Average the endpoint rates on each subinterval.

$$T=\frac{2+4}{2}(1)+\frac{4+3}{2}(1)=3+3.5=6.5\text{ liters}.$$

Multiplying liters per minute by minutes gives liters, so each result has the correct units. The trapezoidal value checks against the endpoint sums: \((6+7)/2=6.5\) liters. Here the midpoint estimate happens to equal the right estimate; that numerical agreement does not make the methods equivalent.

A Common Pitfall: Inventing Midpoint Values

A frequent mistake is to calculate a midpoint height by averaging the endpoint heights, then call the result a midpoint-method height. That average is the trapezoidal height for the subinterval. It equals the actual midpoint function value only in special cases, such as when the function is linear on that subinterval.

For example, on \([0,1]\), the function \(f(x)=x^2\) has endpoint values \(f(0)=0\) and \(f(1)=1\). Incorrectly averaging them gives a supposed midpoint height of \((0+1)/2=0.5\). But the actual midpoint value is \(f(0.5)=(0.5)^2=0.25\). For the two-subinterval example on \([0,2]\), replacing both actual midpoint values \(0.25\) and \(2.25\) by endpoint averages \(0.5\) and \(2.5\) produces \(3\), not the correct midpoint sum \(2.5\). The correction is to evaluate the function at each midpoint, or to say explicitly that a value is being estimated under an additional assumption.

What to Keep in Mind

Use the same partition when comparing methods. Check the required sample locations before calculating, and interpret the results in light of monotonicity and concavity when that information is available. The trapezoidal sum is always the average of the left and right sums on that partition; the midpoint sum has no such general averaging identity.

Check Your Understanding

Answer these questions using the definitions and comparisons above.

  1. On a fixed partition, which function values are needed for a midpoint sum?
  2. If a function is increasing on every subinterval, how do its left and right sums compare?
  3. Why is the trapezoidal sum always between the left and right sums, or equal to one of them?
  4. For a concave-up function, how do the midpoint and trapezoidal estimates compare with the true accumulated area?
  5. A data table gives values only at partition endpoints. What additional information is needed to calculate a midpoint sum without making an assumption?

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