The trapezoidal rule, also known as the trapezoid rule or trapezium rule, is a numerical analytic technique for approximating the definite integral. The trapezoidal rule is an integration rule that divides a curve into little trapezoids to compute the area beneath it. The area under the curve is calculated by adding the areas of all the tiny trapezoids.
What is the Trapezoidal Rule?
By representing the region under the graph of the function f(x) as a trapezoid and determining its area, the trapezoidal rule is used to calculate the definite integral of the form abf(x)dx. The area under a curve is calculated using the trapezoidal rule, which divides the whole area into small trapezoids rather than rectangles.
The formula for the Trapezoidal Rule
To solve a definite integral, we use the trapezoidal rule formula to calculate the area under a curve by dividing the overall area into small trapezoids rather than rectangles. The linear approximations of the functions are utilized to approximate the definite integrals in this rule. The average of the left and right sums is used in the trapezoidal rule.
On [a, b], let y = f(x) be continuous. The interval [a, b] is divided into n equal subintervals, each with a width of h = (b – a)/n
so that a = x0 < x1 < x2 < x3 < x4 < x5 <… < xn = b
Area = (h/2) [y0 + 2 (y1 + y2 + y3 + …. + yn-1) + yn]
where,
The values of function at x = 1, 2, 3….. are y0, y1,y2….
Trapezoidal Rule Formula Derivation:
Using trapezoids to divide the area under the curve for the given function, we may calculate the value of a definite integral.
Statement of the Trapezoidal Rule: Let f(x) be a continuous function on the interval (a, b). Divide the intervals (a, b) into n equal sub-intervals, each with a different width.
Δx = (b – a)/n, in which a = x0 < x1 < x2 < x3 < x4 < x5 <… < xn = b
The area approximating the definite integral abf(x)dx is then given by the Trapezoidal Rule formula:
abf(x)dx ≈ Tn = △x/2 [f(x0) + 2f(x1) + 2f(x2) +….2f(xn-1) + f(xn)]
in which, xi = a + i△x
If n is large enough, the expression’s R.H.S approach the definite integral abf(x)dx.
Proof:
Consider the curve in the figure above and divide the area under it into trapezoids to demonstrate the trapezoidal rule. The first trapezoid has a height of x and parallel bases of length y0 or f(x0) and y1 or f1 respectively. As a result, the area of the first trapezoid in the diagram above can be calculated as follows:
(1/2) Δx [f(x0) + f(x1)]
(1/2)Δx [f(x1) + f(x2)], (1/2)Δx [f(x2) + f(x3)], and so on are the areas of the remaining trapezoids.
Thus,
abf(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(xn-1 )+ f(xn) )
We have, after subtracting a common factor of (1/2)Δx and merging related terms,
abf(x)dx ≈ (Δx/2) (f(x0) +2 f(x1)+2 f(x2) +2 f(x3) + … +2f(xn-1) + f(xn) )
How Do You Use the Trapezoidal Rule?
Any definite integral of a function can be solved using the trapezoidal rule. It divides the area under the curve created by the function into trapezoids to determine the area under the curve. It is a less accurate method than Simpson’s Rule. Both Simpson’s Rule and the Trapezoidal Rule provide an approximation value for the integrals, however, Simpson’s Rule provides a more accurate approximation value because it employs quadratic approximation rather than a linear approximation.
Apply the trapezoidal rule to get the area under the given curve, y = f, by following the procedures outlined below (x).
Step 1: Write down “n” for the number of sub-intervals and “a” and “b” for the intervals.
Step 2: Calculate the sub-interval width using the formula h (or) △x = (b – a)/n.
Step 3: Use the trapezoidal rule formula to get the approximate area of the above curve, abf(x)dx ≈ Tn = (△x/2) (f(x0) +2 f(x1)+2 f(x2) +2 f(x3) + … +2f(xn-1) + f(xn) )
in which, xi = a + i△x
Conclusion:
The trapezoidal rule (also known as the trapezoid rule or trapezium rule; see Trapezoid for additional information on nomenclature) is a strategy for approximating the definite integral in mathematics and, more particularly, numerical analysis. The trapezoidal rule calculates the area of the region under the graph of the function f(x) that is approximated as a trapezoid. The trapezoidal rule can be thought of as the result of averaging the left and right Riemann sums, and it is often defined in this way. By partitioning the integration interval, applying the trapezoidal method to each subinterval, and summing the results, the integral can be approximated even better. In practice, “integrating with the trapezoidal rule” usually refers to this “chained” (or “composite”) trapezoidal rule.