The Trapezoidal Rule
Sometimes rectangles aren’t the best shape for approximating the area under a curve. What if we used trapezoids instead? This often gives us better approximations, especially when the function has significant curvature.
In Figure 2, the area beneath the curve is approximated by trapezoids rather than by rectangles.

How the Trapezoidal Rule Works
The trapezoidal rule approximates the area under a curve by dividing the region into trapezoids instead of rectangles. Each subinterval has equal width [latex]\Delta x[/latex], and the “height” of each trapezoid is [latex]\Delta x[/latex] (measured horizontally). The parallel bases have lengths [latex]f(x_i)[/latex] and [latex]f(x_{i+1})[/latex].
Let’s work through how we get the trapezoidal rule formula. Consider the first few trapezoids:
- First trapezoid area: [latex]\frac{1}{2}\Delta x(f(x_0) + f(x_1))[/latex]
- Second trapezoid area: [latex]\frac{1}{2}\Delta x(f(x_1) + f(x_2))[/latex]
- Third trapezoid area: [latex]\frac{1}{2}\Delta x(f(x_2) + f(x_3))[/latex]
- Fourth trapezoid area: [latex]\frac{1}{2}\Delta x(f(x_3) + f(x_4))[/latex]
When we add up all the trapezoid areas:
[latex]\int_a^b f(x),dx \approx \frac{1}{2}\Delta x(f(x_0) + f(x_1)) + \frac{1}{2}\Delta x(f(x_1) + f(x_2)) + \frac{1}{2}\Delta x(f(x_2) + f(x_3)) + \frac{1}{2}\Delta x(f(x_3) + f(x_4))[/latex]
Now here’s the key insight: factor out [latex]\frac{1}{2}\Delta x[/latex] and combine like terms:
[latex]\int_a^b f(x),dx \approx \frac{1}{2}\Delta x(f(x_0) + 2f(x_1) + 2f(x_2) + 2f(x_3) + f(x_4))[/latex]
This approach generalizes to give us the formal trapezoidal rule.
the trapezoidal rule
Assume that [latex]f\left(x\right)[/latex] is continuous over [latex]\left[a,b\right][/latex]. Let n be a positive integer and [latex]\Delta x=\frac{b-a}{n}[/latex]. Let [latex]\left[a,b\right][/latex] be divided into [latex]n[/latex] subintervals, each of length [latex]\Delta x[/latex], with endpoints at [latex]P=\left\{{x}_{0},{x}_{1},{x}_{2}\ldots ,{x}_{n}\right\}[/latex]. Set
Then, [latex]\underset{n\to \text{+}\infty }{\text{lim}}{T}_{n}={\displaystyle\int }_{a}^{b}f\left(x\right)dx[/latex].
Before we move forward, let’s unpack some important patterns you should notice about how the trapezoidal rule works.
The trapezoidal rule is actually an average: the trapezoidal rule [latex]T_n[/latex] is exactly the average of the left-hand and right-hand Riemann sums! Mathematically, this means:
[latex]T_n = \frac{1}{2}(L_n + R_n)[/latex]
where [latex]L_n = \sum_{i=1}^n f(x_{i-1})\Delta x[/latex] and [latex]R_n = \sum_{i=1}^n f(x_i)\Delta x[/latex]
This makes sense when you think about it—each trapezoid connects the left endpoint height to the right endpoint height with a straight line.
The shape of your function determines whether you’ll get an overestimate or underestimate:
- Trapezoidal rule behavior:
- Concave up functions: The rule systematically overestimates the integral (trapezoids sit above the curve)
- Concave down functions: The rule systematically underestimates the integral (trapezoids sit below the curve)
- Midpoint rule behavior: The midpoint rule is often more balanced. It tends to partially overestimate and partially underestimate over the same intervals, so these errors somewhat cancel each other out.

Use the trapezoidal rule to estimate [latex]{\displaystyle\int }_{0}^{1}{x}^{2}dx[/latex] using four subintervals.
For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.
You can view the transcript for this segmented clip of “3.6.1” here (opens in new window).