Trapezoid Rule — Definition, Formula & Examples
Trapezoid Rule
A method for approximating a
definite integral
using
linear approximations of f. The trapezoids are drawn as
shown below. The bases are vertical lines.
To use the trapezoid rule follow these two steps:
![Two-step trapezoid rule: partition [a,b] into n equal subintervals (width Δx=(b-a)/n); integral ≈...](t_assets/t57.gif)
![Graph of y=f(x) with shaded trapezoids from x₀=a to x₃=b, width Δx each. Formula: ∫f(x)dx=(Δx/2)[f(x₀)+2f(x₁)+2f(x₂)+f(x₃)]](t_assets/t58.gif)
See also
Key Formula
∫abf(x)dx≈2Δx[f(x0)+2f(x1)+2f(x2)+⋯+2f(xn−1)+f(xn)]
Where:
- a,b = The lower and upper limits of integration
- n = The number of equal subintervals the interval [a, b] is divided into
- Δx = The width of each subinterval, equal to (b − a)/n
- x0,x1,…,xn = The partition points, where x_k = a + k·Δx
- f(xk) = The value of the function evaluated at each partition point
Worked Example
Problem: Use the Trapezoid Rule with n = 4 subintervals to approximate the integral of x² from 0 to 4.
Step 1: Find the width of each subinterval Δx.
Δx=nb−a=44−0=1
Step 2: Identify the partition points x₀ through x₄.
x0=0,x1=1,x2=2,x3=3,x4=4
Step 3: Evaluate f(x) = x² at each partition point.
f(0)=0,f(1)=1,f(2)=4,f(3)=9,f(4)=16
Step 4: Apply the Trapezoid Rule formula. The first and last values get a coefficient of 1, and all middle values get a coefficient of 2.
21[0+2(1)+2(4)+2(9)+16]=21[0+2+8+18+16]=244=22
Step 5: Compare with the exact value. The exact integral of x² from 0 to 4 is 64/3 ≈ 21.333. The approximation of 22 has an error of about 0.667.
∫04x2dx=3x304=364≈21.333
Answer: The Trapezoid Rule approximation is 22, compared to the exact value of 64/3 ≈ 21.333.
Another Example
This example uses a non-polynomial function (1/x) and shows that the Trapezoid Rule overestimates the integral when the function is concave up. It also uses n = 3, an odd number of subintervals, unlike the first example.
Problem: Use the Trapezoid Rule with n = 3 subintervals to approximate the integral of 1/x from 1 to 4.
Step 1: Find Δx.
Δx=34−1=1
Step 2: Identify the partition points.
x0=1,x1=2,x2=3,x3=4
Step 3: Evaluate f(x) = 1/x at each partition point.
f(1)=1,f(2)=0.5,f(3)=31,f(4)=0.25
Step 4: Apply the Trapezoid Rule formula.
21[1+2(0.5)+2(31)+0.25]=21[1+1+32+0.25]=21⋅1235=2435≈1.4583
Step 5: The exact value is ln(4) ≈ 1.3863. The approximation overestimates because 1/x is concave up on this interval.
∫14x1dx=ln4≈1.3863
Answer: The Trapezoid Rule approximation is 35/24 ≈ 1.4583, compared to the exact value ln(4) ≈ 1.3863.
Frequently Asked Questions
What is the difference between the Trapezoid Rule and Simpson's Rule?
The Trapezoid Rule approximates the curve between consecutive points with straight lines (linear approximation), while Simpson's Rule uses parabolas (quadratic approximation) through groups of three points. Simpson's Rule is generally more accurate for the same number of subintervals. However, Simpson's Rule requires an even number of subintervals, while the Trapezoid Rule works with any positive integer n.
Does the Trapezoid Rule overestimate or underestimate an integral?
It depends on the concavity of the function. When the function is concave up on the interval, the Trapezoid Rule overestimates the integral because the straight-line segments lie above the curve. When the function is concave down, it underestimates. If the concavity changes, the errors may partially cancel.
How do you increase the accuracy of the Trapezoid Rule?
Increase the number of subintervals n. As n grows, Δx shrinks and the linear segments more closely follow the actual curve. The error of the Trapezoid Rule decreases proportionally to 1/n², meaning doubling the number of subintervals reduces the error by roughly a factor of 4.
Trapezoid Rule vs. Simpson's Rule
| Trapezoid Rule | Simpson's Rule | |
|---|---|---|
| Approximation shape | Trapezoids (linear segments between points) | Parabolic arcs through groups of 3 points |
| Formula | (Δx/2)[f₀ + 2f₁ + 2f₂ + … + 2fₙ₋₁ + fₙ] | (Δx/3)[f₀ + 4f₁ + 2f₂ + 4f₃ + … + 4fₙ₋₁ + fₙ] |
| Error order | Proportional to 1/n² (order 2) | Proportional to 1/n⁴ (order 4) |
| Subinterval requirement | Any positive integer n | n must be even |
| Exact for polynomials up to degree | 1 (linear functions) | 3 (cubic functions) |
Why It Matters
The Trapezoid Rule appears frequently in AP Calculus (AB and BC) courses, where you are asked to approximate definite integrals from tables of values or when antiderivatives are difficult to find. In science and engineering, it is one of the most commonly used methods for numerically integrating real-world data collected at discrete points, such as velocity readings or experimental measurements. Understanding this rule also builds a foundation for more advanced numerical integration techniques like Simpson's Rule and Gaussian quadrature.
Common Mistakes
Mistake: Forgetting to multiply the interior function values by 2.
Correction: In the Trapezoid Rule formula, every function value except the first (f(x₀)) and last (f(x_n)) is multiplied by 2. This is because each interior point is shared by two adjacent trapezoids. A helpful mnemonic: the coefficients follow the pattern 1, 2, 2, 2, …, 2, 1.
Mistake: Forgetting the Δx/2 factor at the front of the formula.
Correction: The area of each trapezoid includes a factor of (1/2) × base × (sum of parallel sides). The base here is Δx, so the overall factor is Δx/2. Omitting this will give an answer that is off by a factor of 2/Δx.
Related Terms
- Definite Integral — The exact quantity the Trapezoid Rule approximates
- Simpson's Rule — A higher-order numerical integration alternative
- Partition of an Interval — Divides [a, b] into subintervals used by the rule
- Trapezoid — The geometric shape used in each subinterval
- Linear — Describes the straight-line approximation between points
- Base of a Trapezoid — The vertical line segments forming each trapezoid
- Vertical — Orientation of the parallel sides of each trapezoid
