Trapezoidal Rule
In mathematics, the trapezoidal rule, also known as the trapezoid rule or trapezium rule is a technique for approximating the definite integral in numerical analysis. The trapezoidal rule is an integration rule used to calculate the area under a curve by dividing the curve into small trapezoids. The summation of all the areas of the small trapezoids will give the area under the curve. Let us understand the trapezoidal rule formula and its proof using examples in the upcoming sections.
1. | What is Trapezoidal Rule? |
2. | Trapezoidal Rule Formula |
3. | Derivation of Trapezoidal Rule Formula |
4. | How to Apply Trapezoidal Rule? |
5. | FAQs on Trapezoidal Rule |
What is Trapezoidal Rule?
The trapezoidal rule is applied to solve the definite integral of the form b∫a f(x) dx, by approximating the region under the graph of the function f(x) as a trapezoid and calculating its area. Under the trapezoidal rule, we evaluate the area under a curve is by dividing the total area into little trapezoids rather than rectangles.
Trapezoidal Rule Formula
We apply the trapezoidal rule formula to solve a definite integral by calculating the area under a curve by dividing the total area into little trapezoids rather than rectangles. This rule is used for approximating the definite integrals where it uses the linear approximations of the functions. The trapezoidal rule takes the average of the left and the right sum.
Let y = f(x) be continuous on [a, b]. We divide the interval [a, b] into n equal subintervals, each of width, h = (b - a)/n,
such that a = x0 < x1 < x2 < ⋯ < xn = b
Area = (h/2) [y0 + 2 (y1 + y2 + y3 + ..... + yn-1) + yn]
where,
- y0, y1,y2…. are the values of function at x = 1, 2, 3….. respectively.
Derivation of Trapezoidal Rule Formula
We can calculate the value of a definite integral by using trapezoids to divide the area under the curve for the given function.
Trapezoidal Rule Statement: Let f(x) be a continuous function on the interval (a, b). Now divide the intervals (a, b) into n equal sub-intervals with each of width,
Δx = (b - a)/n, such that a = x0 < x1 < x2 < x3 <…..< xn = b
Then the Trapezoidal Rule formula for area approximating the definite integral b∫af(x)dx is given by:
b∫af(x) dx ≈ Tn = △x/2 [f(x0) + 2f(x1) + 2f(x2) +….2f(xn-1) + f(xn)]
where, xi = a + i△x
If n → ∞, R.H.S of the expression approaches the definite integral b∫a f(x)dx
Proof:
To prove the trapezoidal rule, consider a curve as shown in the figure above and divide the area under that curve into trapezoids. We see that the first trapezoid has a height Δx and parallel bases of length y0 or f(x0) and y1 or f1. Thus, the area of the first trapezoid in the above figure can be given as,
(1/2) Δx [f(x0) + f(x1)]
The areas of the remaining trapezoids are (1/2)Δx [f(x1) + f(x2)], (1/2)Δx [f(x2) + f(x3)], and so on.
Consequently,
∫ba f(x) dx ≈ (1/2)Δx (f(x0)+f(x1) ) + (1/2)Δx (f(x1)+f(x2) ) + (1/2)Δx (f(x2)+f(x3) ) + … + (1/2)Δx (f(n-1) + f(xn) )
After taking out a common factor of (1/2)Δx and combining like terms, we have,
∫ba f(x) dx≈ (Δx/2) (f(x0)+2 f(x1)+2 f(x2)+2 f(x3)+ ... +2f(n-1) + f(xn) )
How to Apply Trapezoidal Rule?
The trapezoidal rule can be applied to solve the definite integral of any given function. It calculates the area under the curve formed by the function by dividing it into trapezoids and is a lesser accurate method in comparison to Simpson’s Rule. Both Simpson’s Rule and Trapezoidal Rule give the approximation value, but Simpson’s Rule results in an even more accurate approximation value of the integrals because Simpson’s Rule uses the quadratic approximation instead of linear approximation.
Follow the below-given steps to apply the trapezoidal rule to find the area under the given curve, y = f(x).
- Step 1: Note down the number of sub-intervals, "n" and intervals "a" and "b".
- Step 2: Apply the formula to calculate the sub-interval width, h (or) △x = (b - a)/n
- Step 3: Substitute the obtained values in the trapezoidal rule formula to find the approximate area of the given curve,
b∫a f(x)dx ≈ Tn = (△x/2) [f(x0) + 2 f(x1) + 2 f(x2) +….+ 2 f(n-1) + f(n)], where, xi = a + i△x
Let us have a look at a few examples to understand trapezoidal rule better.
Examples Using Trapezoidal Rule
-
Example 1: Find the area under the curve using trapezoidal rule formula which passes through the following points:
x 0 0.5 1 1.5 y 5 6 9 11 Solution:
Given: y0 = 5
y1= 6
y2= 9
y3= 11
h = (0.5 - 0) = (1 - 0.5) = (1.5 - 1) = 0.5Using Trapezoidal rule formula,
Area = (h/2) [y0 + yn + 2(y1 + y2 + y3 + ..... + yn-1)]
= (.5/2) [5 + 11 + 2 (6 + 9)]
= 0.25 [16+30]
= 0.25 [46]
= 11.5
Answer: Therefore, the area under the curve is 11.5 sq units.
-
Example 2: Using Trapezoidal Rule Formula find the area under the curve y = x2 between x = 0 and x = 4 using the step size of 1.
Solution:
Given: y = x2
h = 1Find the values of ‘y’ for different values of ‘x’ by putting the value of ‘x’ in the equation y = x2
X 0 1 2 3 4 y = x2 y0 = 0 y1 = 1 y2 = 4 y3 = 9 y4 = 16 Using Trapezoidal rule:
Area = (h/2) [y0 + yn + 2 (y1 + y2 + y3 + ..... + yn-1)]
= (1/2) [0 + 16 + 2 (1 + 4 + 9)]
= 0.5 [16 + 28]
= 22
Answer: Therefore, the area under the curve is 22 sq units.
-
Example 3: Find the area under the curve using the trapezoidal rule formula which passes through the following points:
x 0 0.5 1 1.5 y 4 7 10 15 Solution:
Given: y0 = 4
y1 = 7
y2 = 10
y3 = 15
h = (0.5 - 0) = (1 - 0.5) = (1.5 - 1) = 0.5Using Trapezoidal formula:
Area = (h/2) [y0 + yn + 2 (y1 + y2 + y3 + ..... + yn-1)]
= (0.5/2) [4 + 15 + 2 (7 + 10)]
= 0.25 [19 + 34]
= 0.25 [53]
= 13.25
Answer: Therefore, the area under the curve is 13.25 sq units.
FAQs on Trapezoidal Rule
Why is Trapezoidal Rule Used?
The trapezoidal rule is an integration rule used to calculate the area under a curve by dividing the curve into small trapezoids. The summation of all the areas of the small trapezoids will give the area under the curve. Under this rule, the area under a curve is evaluated by dividing the total area into little trapezoids rather than rectangles.
What is the Trapezoidal Rule Formula?
The trapezoidal rule formula is, Area = (h/2)[y0+yn+2(y1+y2+y3+.....+yn-1)]
where,
- y0, y1,y2…. are the values of function at x = 1, 2, 3….. respectively.
- h = small interval (x1- x0)
Why is it Called Trapezoidal Rule Formula?
The rule is called trapezoidal because when the area under the curve (a definite integral) is evaluated, then the total area is divided into small trapezoids instead of rectangles. Then we find the area of these small trapezoids in a definite interval.
Using the Trapezoidal Rule Formula, Find the Area when h = 2, y0 = 4, y1 = 8, y2 = 12, y3 = 15.
Using trapezoidal formula, Area = (h/2)[y0+yn+2(y1+y2+y3+.....+yn-1)]
= (2/2) [4+15+2(8+12)]
= 1[19+40]
= 1[59]
= 59
Therefore, the area under the curve is 59 sq. units.
visual curriculum