When an integral has no formula, or the function is known only from a table, we estimate the area by strips. The trapezium rule joins neighbouring points by straight lines. The mid-ordinate rule uses rectangles whose heights are taken at the middle of each strip. For a curve that bends upwards, the trapezium rule is too big and the mid-ordinate rule too small. Halving the strip width cuts both errors to about a quarter.
about 30 min1 simulation2 practice questions
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
use the trapezium and mid-ordinate rules, from a formula or a table;
decide from the shape of the curve whether an estimate is too big or too small;
bound the error and choose the number of strips for a given accuracy.
A table and no formula
A car's speed is read every 10s. How far did it travel? Distance is the area under the speed-time graph, but we have only the readings. Even with a formula, many integrals, such as ∫01e−x2dx, have no antiderivative in simple functions. We need a rule that uses only values of the function.
The trapezium rule
Split [a,b] into n strips of width h=nb−a, with ordinates y0,y1,…,yn. Join the tops by straight lines. Each strip is a trapezium of area 2h(yk−1+yk). Adding them gives
Tn=2h[y0+yn
+2(y1+⋯+yn−1)].
The two end ordinates count once, and every inner ordinate twice. Some books call it the trapezoidal rule, and AP Calculus calls it a trapezoidal sum.
The mid-ordinate rule
Take each strip as a rectangle, with its height measured at the middle of the strip:
Mn=h[f(m1)+⋯+f(mn)],
where mk is the midpoint of the kth strip. AP Calculus calls this a midpoint Riemann sum.
A worked example
Estimate ∫12xdx with 4 strips, so h=0.25. The exact value is ln2≈0.693147.
The ordinates.1, 0.8, 0.6667, 0.5714, 0.5.
Trapezium.T4=0.125[1+0.5+2(2.0381)]≈0.697024.
Mid-ordinates. At 1.125, 1.375, 1.625, 1.875, the values add to 2.7649, so M4≈0.691220.
Compare.T4 is about 0.0039 too big and M4 about 0.0019 too small.
Too big or too small?
Two panels with the same upward-bending curve over four strips. On the left, the trapezium rule: straight chords join the tops of the ordinates, and each chord lies above the curve. On the right, the mid-ordinate rule: rectangles whose tops are at the height of the curve at the middle of each strip, each with a dashed tangent at that point lying below the curve.
If the curve bends upwards on [a,b], that is f′′>0 (the curve is convex), every chord lies above the curve. So the trapezium rule is too big. The tangent at a midpoint lies below the curve, and the mid-ordinate rectangle has the same area as the trapezium under that tangent. So the mid-ordinate rule is too small. If the curve bends downwards, both statements turn round. A sketch of the curve tells you which way each estimate is wrong.
How large is the error?
For a function with a continuous second derivative,
∫abfdx−Tn=−12(b−a)h2f′′(ξ),
∫abfdx−Mn=24(b−a)h2f′′(η),
for some ξ and η in [a,b]. Three facts follow.
Both errors are proportional to h2. Halving h divides each error by about 4.
The mid-ordinate error is about half the trapezium error, with the opposite sign.
If ∣f′′(x)∣≤K on [a,b], then ∣ET∣≤12(b−a)h2K.
So we can choose n in advance. For ∫12xdx, f′′(x)=x32≤2. For an error below 10−4 we need 6h2<10−4, so h<0.0245 and n≥41.
Practise with new numbers
Try it in Python
The program applies both rules to ∫12xdx with 2, 4, 8 and 16 strips, and prints how much each error shrinks.
Common mistakes
Counting strips and ordinates as one.n strips need n+1 ordinates.
Doubling the end ordinates. Only the inner ordinates count twice.
Using ends in the mid-ordinate rule. The heights are taken at the middles of the strips.
The wrong direction. For f′′>0, the trapezium rule is too big, not too small.
Remember these
Tn=2h[ends+2×inner].
Mn=h× (sum of the mid-ordinates).
Convex curve: T too big, M too small.
Errors in proportion to h2: halve h, quarter the error.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Estimate ∫02x3dx by the trapezium rule with 2 strips. Is it too big or too small?
A curve bends downwards on [a,b]. Which rule gives an estimate that is too big?
With n strips the trapezium error is 0.02. Roughly what is it with 2n strips?
Why is the trapezium rule exact for a straight line?
A table has 9 ordinates. How many strips does the trapezium rule use?