The trapezium rule: numerical integration and area estimates
The trapezium rule estimates a definite integral by replacing a curve with straight line segments. The area below each segment is a trapezium, so the method is a form of numerical integration.
For equal strips of width
the rule is
where . The first and last ordinates occur once; every interior ordinate occurs twice.
Before you begin
Section titled “Before you begin”You should be able to:
- evaluate a function accurately with a calculator;
- interpret a definite integral as signed area;
- find the area of a trapezium;
- distinguish the number of strips from the number of ordinates.
If exact integration is available, it is usually preferable. The trapezium rule is needed when an antiderivative is unavailable, awkward, or when the function is known only through measured data.
From one trapezium to the formula
Section titled “From one trapezium to the formula”For one strip from to , let the parallel vertical sides have lengths and and let the horizontal width be . Its area is
For four strips, adding the four trapezia gives
This explains the coefficient pattern
It is safer to understand this pattern than to memorise an unexplained formula.
A reliable method
Section titled “A reliable method”- Calculate the strip width .
- List all values of , including both endpoints.
- Calculate the ordinates , keeping extra digits.
- Apply the coefficient pattern .
- Multiply the completed bracket by .
- Round only the final answer, as instructed.
Worked example 1: a function over four strips
Section titled “Worked example 1: a function over four strips”Use four strips to estimate
There are strips, so
Four strips require five ordinates:
Substitute carefully:
The exact value is , so this estimate is slightly too large. The reason is geometric, not accidental: curves upwards, and the joining chords lie above the curve.
Self-check 1
Section titled “Self-check 1”Use three strips to estimate
Give the answer to three decimal places.
Answer
Here , and the ordinates are
Therefore
Three strips require four ordinates.
Using values from a table
Section titled “Using values from a table”Numerical integration is particularly valuable for experimental data because there may be no formula to integrate. First check that the values are equally spaced.
Worked example 2: tabulated values
Section titled “Worked example 2: tabulated values”The table gives values of . Use the trapezium rule with four strips to estimate the area from to .
The common spacing is . Hence
Using the rounded table values limits the precision of the estimate. It would be misleading to claim many reliable decimal places.
Worked example 3: find a missing ordinate
Section titled “Worked example 3: find a missing ordinate”The ordinates , , , and are equally spaced by units. The trapezium rule gives an estimated area of . Find .
There are four ordinates, so there are three strips. Apply the coefficients :
Thus
so
Do not interpret four ordinates as four strips. The intervals between consecutive ordinates are the strips.
Unequal strip widths
Section titled “Unequal strip widths”The compact formula assumes one common width . If the values are not equally spaced, calculate each trapezium separately:
Worked example 4: unequal intervals
Section titled “Worked example 4: unequal intervals”Estimate the integral represented by this table.
The widths are , , and , so a single value of cannot be used:
Overestimates and underestimates
Section titled “Overestimates and underestimates”The rule replaces each piece of curve by a chord joining its endpoints.
- If , the graph is convex, or curves upwards. Chords lie above the graph, so the rule gives an overestimate.
- If , the graph is concave, or curves downwards. Chords lie below the graph, so the rule gives an underestimate.
- If is linear, the chords are the graph itself and the rule is exact.
- If concavity changes within the interval, errors from different strips can have different signs. A single global conclusion may not be possible from alone.
This discussion concerns the signed integral. If the graph crosses the axis, negative ordinates produce negative trapezium contributions. To estimate geometric area, split the interval at each crossing and make each contribution positive.
Worked example 5: predict the direction of error
Section titled “Worked example 5: predict the direction of error”Without finding the exact integral, decide whether the trapezium rule overestimates or underestimates
For ,
The graph curves upwards throughout , so every chord lies above the curve. The trapezium rule gives an
Notice that a decreasing function can still curve upwards. Increasing or decreasing behaviour does not determine the direction of trapezium rule error.
Self-check 2
Section titled “Self-check 2”State whether the trapezium rule gives an overestimate, an underestimate, or an exact value in each case.
Answers
- Exact. The graph is a straight line, so every trapezium matches the region exactly.
- Underestimate. On this interval, , so the graph curves downwards.
- Underestimate. Since , the graph curves downwards.
Improving accuracy
Section titled “Improving accuracy”For a smooth curve, using more equal strips makes each chord follow the curve more closely. Since
increasing decreases . The trapezium rule converges to the exact integral as tends to zero under the usual smoothness conditions.
For sufficiently smooth , the total error is proportional to in leading order. Consequently, halving usually reduces the error by a factor of about . This is a guide, not a justification for inventing precision when the original data are rounded or noisy.
Worked example 6: compare refinements
Section titled “Worked example 6: compare refinements”Estimate with two strips and four strips.
With two strips, :
With four strips, Example 1 gave
The exact value is , so the absolute errors are
and
Halving the width has divided the error by exactly in this quadratic example.
Common misconceptions
Section titled “Common misconceptions”Confusing strips and ordinates
Section titled “Confusing strips and ordinates”strips require ordinates. The endpoints are both included.
Doubling the endpoints
Section titled “Doubling the endpoints”Only interior ordinates have coefficient . The endpoint coefficients are .
Forgetting the factor
Section titled “Forgetting the factor h/2h/2h/2”The bracket is a weighted sum of heights, not an area. Multiplication by supplies the horizontal scale.
Rounding each ordinate too early
Section titled “Rounding each ordinate too early”Store full calculator values and round once at the end. If a question supplies a rounded table, use those given values.
Assuming more strips always means a better real world answer
Section titled “Assuming more strips always means a better real world answer”More strips reduce the discretisation error for a smooth known function. They cannot remove measurement error or restore information absent from sparse data.
Calling every result an area
Section titled “Calling every result an area”A definite integral is signed. Below the axis, the ordinate and the trapezium contribution are negative.
Final self-check
Section titled “Final self-check”- Use four strips to estimate . Give your answer to four decimal places.
- Explain, without evaluating the exact integral, whether your answer to question 1 is necessarily an overestimate or underestimate over the whole interval.
- Five ordinates are used between and . If they are equally spaced, find and .
Answers
- Here and
so
- For ,
This changes sign at , so the graph changes concavity within . The simple concavity test does not determine one error direction for the whole interval.
- Five ordinates form four strips, so and
What to learn next
Section titled “What to learn next”- Revisit definite integrals and areas to connect the numerical estimate with exact integration and signed area.
- Study integration as a limit to understand why increasingly fine sums approach a definite integral.
- Continue with fixed point iteration and the Newton-Raphson method for numerical solutions of equations.
- Learn when iteration fails to develop error awareness across numerical methods.