Pick a function and a rule, then move the slider to change the number of strips . The explorer adds up the strips and sets the total next to the exact value of the integral. Strips above the axis count as positive and strips below it count as negative, so the sum estimates signed area.
- Above the axis, counted as positive
- Below the axis, counted as negative
- Left sum
- 0.218750
- Exact integral
- 0.333333Equals 1/3
- Error
- −0.114583The sum is too small
- Simpson's rule
- 0.333333Error 0.000000
Things to try
- Start with on and . The left sum is and the right sum is , so the exact area lies between them. That holds for every , because is increasing there.
- Stay with and go from to . The left sum error goes from about to about , roughly half. The midpoint error goes from to , exactly a quarter.
- Compare the midpoint and trapezoid errors for , or . The trapezoid error is close to twice the midpoint error and has the opposite sign. For the ratio is exactly at every .
- With on or the half circle on , the left, right and trapezoid sums agree for every . The function is at both ends, so the first left rectangle and the last right rectangle add nothing.
- Pick on with the left rule and . The sum is even though the integral is . The negative strips between and outweigh the positive ones for , and , and the left sum turns positive at .
- Watch Simpson’s rule on the three polynomials. For , and it gives the exact value at every even .
- On the half circle Simpson’s rule loses to the midpoint rule at every even . The slope of grows without bound near , and the error estimates behind Simpson’s rule need a smooth function.
- For on , find the smallest that brings the midpoint error under . It is .
What you are seeing
The interval is cut into pieces of equal width with the points ,
The left, right and midpoint rules sample at one point of each piece and add the rectangles,
The trapezoid rule joins neighboring points of the graph with straight segments. It equals the average of the left and right sums,
When is even, Simpson’s rule fits a parabola through each three neighboring points,
A product with is negative, which is why the strips below the axis are shaded differently and subtract from the total. A trapezoid whose top edge crosses the axis is split there, and each part is shaded by its sign.
The exact value comes from an antiderivative, for example
The error shown is the sum minus the exact value, so a positive error means the sum is too big. Left and right sum errors shrink roughly like . Midpoint and trapezoid errors shrink like , and Simpson errors like for smooth functions.
These sums are built up in The Area Problem, Partitions and Riemann Sums and Integral Approximation Rules, and the formulas are on the calculus reference sheet. The videos are on the Calculus course page. For a first look at rectangle sums without calculus, see Area Approximation with Rectangles on the Precalculus course page.