AP Calculus AB and BC
Riemann Sum Slider: Drag n, Watch the Error Vanish
A Riemann sum estimates area under a curve by slicing the interval into n rectangles and summing their areas; the definite integral is the value that sum approaches as n grows. Drag n from 1 to 200 and the rectangle tops collapse onto the curve as the error falls toward zero. Midpoint and trapezoid converge fastest.
Full bar is the worst single-rectangle error for this function; empty means the sum is within 0.0001 of the exact integral.
This slider turns the definition of the definite integral into something you can watch happen. Cut the interval into equal strips, cap each strip with a rectangle, and add their areas: that total is a Riemann sum, an estimate of the area under the curve (Topics 6.2 and 6.3). When is a rate of change, that area is the change it accumulates (CHA-4.A.1). Drag upward and every strip narrows, its top has less room to miss the curve, and the running total creeps toward one fixed number.
That fixed number is the definite integral. As the strip widths shrink toward , the Riemann sums approach exactly, and this limit is the definition of the integral (LIM-5.C.1). The error readout is the distance between your current sum and that exact value, so dragging from toward is a hands-on version of taking the limit.
The left, right, and midpoint buttons change one thing only: the sample point , meaning where each strip reads its single height (the left edge, the right edge, or the center). The trapezoidal button instead reads both edges of each strip and slants the top between them, which is the same as averaging the left and right sums. Keep fixed and click through all four to see which tops overshoot the curve and which fall short.
Predict which side you land on before you compute
You can name which side of the true value an estimate falls on with no arithmetic, and this recognition is worth quick points on multiple choice (Topic 6.2, LIM-5.A.4). Monotonicity settles the one-sided sums: for an increasing the left sum sits under the curve and the right sum sits above, and a decreasing flips both. Concavity settles the other two: on a concave-up graph the midpoint sum reads low and the trapezoidal sum reads high, trapping the exact integral between them, and concave down flips both.
How to read it
The panel shows the graph of on with the current strips shaded under it, the value of the Riemann sum, the exact integral, and the error between them. The slider along the bottom sets , the number of subintervals, from up to . The four buttons pick left, right, midpoint, or trapezoidal, and the strips redraw the instant you change either control.
- Drag from to on any method and watch the error fall toward while the strips fuse into the shaded region under the curve.
- Pick an increasing stretch and compare left versus right at the same : the left tops tuck under the curve, the right tops poke above, and the true value sits bracketed between the two sums.
- Put midpoint and trapezoidal head to head against left and right at the same : the centered and slanted tops post a smaller error right away.
- Push to and note how many decimal places of the sum now match the exact value.
Freeze the slider at with on and check the left rule by hand. Here , the left endpoints are , and their heights are . The heights sum to , and multiplying by gives . The exact area is the definite integral:
The left estimate of undershoots that true value by about . Switch methods at the same and each one reads the height differently, so each lands somewhere else:
| Rule | Reads height at | Estimate at | Side of |
|---|---|---|---|
| Left | left endpoints | under | |
| Right | right endpoints | over | |
| Midpoint | midpoints | under (close) | |
| Trapezoidal | edge average | over (close) |
The other three rules keep the same but read the strip heights elsewhere. Right: the right endpoints have heights , which sum to , and . Midpoint: the midpoints have heights , which sum to , and . Trapezoidal: average the left and right totals, .
Watch how fast the error falls, not just that it falls
Double on a left or right sum and the error roughly halves; double it on a midpoint or trapezoidal sum and the error drops to roughly a quarter. That gap is the whole reason free-response questions that hand you a table of values ask for a trapezoidal estimate: with only a few data points, a slanted top wrings far more accuracy out of the same strips. The exam never asks you to compute a Riemann sum error bound, but the slider makes the pattern impossible to miss.
Frequently asked questions
Does the left or right Riemann sum overestimate?
It depends on whether the function is increasing or decreasing, not on the words left or right. On an increasing interval the right sum overestimates and the left sum underestimates; on a decreasing interval it is reversed. The slider makes it obvious: pick an increasing stretch and every right rectangle pokes above the curve while every left rectangle tucks below it.
Which Riemann sum is the most accurate?
For the same the midpoint and trapezoidal sums are almost always closer than the left or right sums, because a centered or slanted top follows a sloping curve better than a top pinned to one edge. Drag up with each method selected and the error readout confirms it: left and right trail behind while midpoint and trapezoidal race to the exact value. One exception is a straight-line , where the midpoint and trapezoidal sums are exact at every .
What happens to a Riemann sum as n approaches infinity?
As the subinterval widths shrink to zero and the Riemann sum approaches one number, the definite integral . That limit is the formal definition of the definite integral (Topic 6.3, LIM-5.C.1). On the slider you see it as the error collapsing toward zero as you drag toward , though for a curved graph no finite ever drives the error to exactly zero.