Midpoint and Trapezoidal Rules
The Midpoint Rule
Take the height of each rectangle at the midpoint of its subinterval rather than at an end.
It is a Riemann sum like any other, so the definition of the definite integral already covers it.
The Trapezoidal Rule
A rectangle has a flat top, and the curve above it doesn't. Joining the two endpoint heights by a straight segment follows the curve far more closely, and turns each subinterval's region into a trapezoid.
A trapezoid lying on its side, with parallel sides and a distance apart, has area
Now add the of them. Every interior height belongs to two trapezoids, once as a right end and once as a left end. It therefore appears with a coefficient of , while the two outer heights keep a coefficient of :
The coefficients are . Counting them is the usual place to drop a point: there are heights for subintervals.
So the two rules bracket the answer: is below and is above it. Whether each rule comes out too big or too small depends on the concavity of the curve.
Error and concavity
A single subinterval shows why. Take the same integral with , so each rule covers all of with one shape.
In the first figure, the top of is the chord from to . The graph of a concave-up function lies below its chords, so the trapezoid covers the whole region and a little more. Its area is , more than .
In the second, is one rectangle of height , so its area is . It crosses the curve at . It leaves out part of the region on the left and covers empty space on the right. The picture alone doesn't show which of the two is larger.
The third figure tilts the rectangle's top about the point until it lies along the tangent line there, . The triangle added on the left is the same size as the triangle removed on the right, so the area does not change. The new parallel sides are and , and . A tangent line to a concave-up curve lies below the curve, so this trapezoid lies inside the region, and is too small.
The same argument applies to every subinterval of and , for any .
Our example is the first case. is concave up on , and the midpoint estimate came in low, the trapezoid estimate high. A concave-down curve flips both pictures: chord below, tangent above.
The two errors are related as well. The midpoint estimate missed by about , the trapezoid estimate by about . So the midpoint error is roughly half the size and on the other side of the answer. For a smooth function whose concavity doesn't change on , this holds approximately, and more closely as grows. That makes the cruder-looking rule the better one.
Four estimates, one integral
Whether increases or decreases tells which endpoint sum is too big, as the Riemann sums lesson showed. Its concavity tells which of the midpoint and trapezoid estimates is. The table collects the four cases.
| Too small | Too big | |
|---|---|---|
| increasing | ||
| decreasing | ||
| concave up | ||
| concave down |
The sign of plays no part. The left sum of an increasing function is too small whether the function is positive or negative, and the same holds for every other row.
When changes concavity inside , the trapezoids are too big on one part of the interval and too small on another. Without more information about , can't be classified as an overestimate or an underestimate, and neither can . The same is true of and when changes direction.
Unequal widths
The Trapezoidal Rule's tidy pattern comes from every subinterval having the same width, so the common factor can be pulled out front. An AP question supplying a table of measured values usually spaces them unevenly, and then the rule doesn't apply.
Compute each trapezoid's area on its own width and add them up. The rule was only a shortcut for doing exactly that.
The same goes for the whole construction. The definition of the integral used equal widths for convenience. For an integrable function the limit is the same for every choice of sample points and every partition, provided the widest subinterval shrinks to zero. The trapezoid sum isn't built as a Riemann sum, since its heights are averages rather than values of at chosen points. But it's the average of two Riemann sums, , so it has the same limit. In the limit, then, left, right, midpoint, and trapezoid all give the same number, although at any fixed they differ, as and do here.