Privacy note: We capture your IP address to provide customised and focused services. See our Privacy Policy.

AP Calculus AB: Deep Dive — Alpha School

Lesson 15: Riemann Sums and Approximation

Left, Right, Midpoint and Trapezoidal

A definite integral is the limit of Riemann sums: the area under a curve is the limit, as the rectangles get thinner, of the sum of their areas. With a finite number of rectangles, the sum is an approximation. Left endpoints use the height at the left of each subinterval; right endpoints use the right; midpoints use the middle; the trapezoidal rule uses the average of the left and right heights, which is the area of a trapezium. Each method has a direction of error that depends on whether the function is rising or falling.

Worked example: approximate the integral from 0 to 2 of x squared dx with 4 subintervals, using left endpoints. The width is 0.5, and the heights are 0, 0.25, 1 and 2.25, so the sum is 0.5 times 3.5, which is 1.75. The exact value is 8 over 3, about 2.67, so the left sum underestimates, as expected for a rising function. The right sum uses heights 0.25, 1, 2.25 and 4, giving 0.5 times 7.5, which is 3.75, an overestimate. The true value lies between them.

Worked example with a table: a function f has values 0, 2, 5, 9 at x equals 0, 1, 2, 3. Estimate the integral from 0 to 3 of f dx using the trapezoidal rule. The width is 1, so the estimate is one half times f(0) plus 2 f(1) plus 2 f(2) plus f(3), which is one half times 0 plus 4 plus 10 plus 9, or 11.5. The function is rising and concave up, since the increments 2, 3, 4 are growing, so the trapezoidal rule overestimates, because each trapezium sits above the curve. A left sum would give 0 plus 2 plus 5, which is 7, and a right sum would give 2 plus 5 plus 9, which is 16, so the true value lies between 7 and 16, and the trapezoidal estimate of 11.5 sits between them, closer to the top because the function is convex.

Riemann sums: rectangles under a curve

four rectangles, left endpoints, width Delta x

Left endpoints underestimate the area under a rising curve, because each rectangle stops short of the curve. More, thinner rectangles give a better estimate.

Which Approximation Is Best

For a rising function, the left sum underestimates and the right sum overestimates; for a falling function, the reverse holds. The midpoint sum is usually the most accurate of the three rectangle methods, because its errors partly cancel: on each subinterval the rectangle is too short on one side and too tall on the other. The trapezoidal rule is also usually better than the left or right sums, and its error is opposite in sign to the midpoint error for a function with consistent concavity. Knowing these directions lets you answer questions that ask whether an approximation is an overestimate or an underestimate without calculating.

Worked example: for the integral from 0 to 2 of x squared dx, the midpoint sum with 4 subintervals uses heights at 0.25, 0.75, 1.25 and 1.75, which are 0.0625, 0.5625, 1.5625 and 3.0625, giving 0.5 times 5.25, which is 2.625, very close to the exact 2.667. The trapezoidal sum gives 2.75, also close but on the other side. With more subintervals, all four methods converge to the exact value, and the error shrinks roughly with the square of the number of subintervals for the midpoint and trapezoidal rules.

Approximation in Free-Response Questions

Approximation questions often give a table of values of a function and ask for a trapezoidal or midpoint estimate of a definite integral, or for the average value of the function. The average value over an interval is the integral divided by the length of the interval, so a trapezoidal estimate of the integral gives an estimate of the average. Read the table carefully: the subinterval width is the gap between successive x-values, and the heights are the function values at the endpoints or midpoints as the method requires.

A table may also give the rate at which water flows into a tank, and ask for the total volume over an hour: that is a definite integral of the rate, estimated by a Riemann sum from the table. State the method you used, show the substitution, and give the units: an integral of a rate in litres per minute over minutes is a volume in litres. If the table has uneven spacing, the width changes from one subinterval to the next, and each rectangle must use its own width.

Key Terms

Riemann sum
An approximation to a definite integral as a sum of rectangle areas.
Left endpoint sum
A Riemann sum using the function value at the left of each subinterval.
Midpoint sum
A Riemann sum using the function value at the middle of each subinterval; usually the most accurate rectangle method.
Trapezoidal rule
An approximation using trapeziums, averaging the left and right endpoint sums.
Average value
The integral of a function over an interval, divided by the length of the interval.
Subinterval
One of the equal pieces into which an interval is divided for a Riemann sum.

Discussion Questions

  1. Why does a left sum underestimate the area under a rising function?
  2. Why is the midpoint sum usually more accurate than the left or right sums?
  3. How is the average value of a function connected to its definite integral?

Practice Questions

  1. Approximate the integral from 0 to 2 of x squared dx with 4 subintervals, left endpoints. What do you get?
  2. What is the exact value of that integral?
  3. For a rising function, does the right sum overestimate or underestimate?
  4. What is the midpoint estimate for that integral with 4 subintervals?
  5. How is the average value of f over an interval found?
Show answers
  1. 1.75, from 0.5 times 0 plus 0.25 plus 1 plus 2.25.
  2. 8 over 3, about 2.67.
  3. Overestimate, because each rectangle reaches up to the higher right-hand height.
  4. 2.625, from 0.5 times 0.0625 plus 0.5625 plus 1.5625 plus 3.0625.
  5. As the integral of f over the interval divided by the length of the interval.
Keep reading to complete this lesson