It estimates the integral by adding up the areas of trapezoids drawn between consecutive points along the function.
Yes, it can be applied to any continuous function within a closed interval.
No, it is applied mainly to definite integrals with defined limits.
Select the number of subintervals depending on the desired precision and function complexity.
Join ALLEN!
(Session 2026 - 27)
Choose class
Choose your goal
Preferred Mode
Choose State
Trapezoidal Rule
Everyone knows that integration is used to find the area of irregular shapes, but did you know that some problems may still seem complex even with the help of integration? When a precise solution isn't straightforward, the Trapezoidal Rule provides a savvy and effective method to estimate the area under a curve. Reducing the problem into trapezoids provides a method to achieve numerical solutions for integrals that would be otherwise difficult to find.
Understanding the Trapezoidal Rule:
The Trapezoidal Rule estimates the integral of a function f(x) from an interval [a,b] by breaking up the region under the curve into small trapeziums, trapezoids. The numerical integration by the trapezoidal rule helps to calculate the value of these trapezoids, which ultimately provides an estimated value for the area of this region.
1.0The Formula for the Trapezoidal Rule:
The Formula for the Trapezoidal Rule differs based on the number of intervals to be calculated. The formula for the single interval can be expressed as:
∫abf(x)dx≈2b−a(f(a)+f(b))
Here,
a & b are the limits of integration (the interval).
f(a) and f(b) are the function values at the endpoints.
2b−a represents the width of the trapezoid base, and the average of f(a) and is the height of the trapezoid.
2.0Trapezoidal Rule for Multiple Intervals:
To increase the accuracy of the result, we can also divide the interval [a,b] into n smaller subintervals, with the width of each interval as h. Here:
h=nb−a
This is how the Trapezoidal Rule formula in numerical methods for multiple intervals is expressed:
∫abf(x)dx≈21h[f(a)+2∑i=1n−1f(xi)+f(b)]
Here:
xi = a + i ⋅ h for i = 1, 2, …, n–1.
The sum
∑i=1n−1f(xi)
is the sum of the function values at the intermediate points x1, x2,…,xn−1.
f(a) and f(b) are the function values at the endpoints, and they are not multiplied by 2, as they represent the bases of the trapezoids at the edges.
The error in the value of the area of a region decreases with an increase in the number of intervals (n) of the region. Less error is also incurred if the second derivative of the function is small. The error term for the Trapezoidal Rule can be written as:
ET=−12n2(b−a)3f′′(ξ)
Here,
ξ is some point in the interval [a,b].
f′′(ξ) is the second derivative of f(x) at that point.
n is the number of subintervals.
4.0Trapezoidal Rule Derivation:
To derive the trapezoidal rule formula, take a curve described by the function ∫abf(x)dx with a definite integral and divide this integral into several trapezoids.
Now, divide the interval [a,b] into n smaller subintervals, with the width h, which is given as:
h=nb−a
Thus, the points dividing the interval [a,b] are x0, x1, x2,…,xn, where x0 = a and xn = b. The points x1, x2,…, xn−1 are the intermediate points of division.
Now, calculate the area of each trapezoid using the general formula for the area of a trapezium. Which is defined as the half of the sum of the parallel sides, say, y0 = f(x0) and y1 = f(x1), and height h, and it can be expressed as:
A=21×h×(f(x0)+f(x1))
For the first trapezoid, the area is:
A1=21×h×(f(x0)+f(x1))
Similarly, for the subsequent trapezoid, the area is: