JEE Exam » JEE Study Material » Mathematics » The Trapezoidal Rule in Calculus

The Trapezoidal Rule in Calculus

In this article, we will learn about the trapezoidal rule in calculus, the trapezoidal rule formula, and what is the trapezoidal rule and how do I use it, numerical implementation and examples.

This technique is a much more accurate way to approximate the area beneath a curve. To construct the trapezoids, you mark the height of the function at the beginning and end of the width interval, then connect the two points. This strategy, however, necessitates the memorization of a formula.

Instead of utilising rectangles, the trapezoidal rule divides the whole area into smaller trapezoids to calculate the area under the curves. This integration determines the area by approximating the region under the graph of a function as a trapezoid. The average of the left and right sums is used in this rule.

When the underlying function is smooth, the Trapezoidal Rule does not produce the same accurate value as Simpson’s Rule. Simpson’s Rule employs quadratic approximation rather than a linear approximation. Both Simpson’s Rule and the Trapezoidal Rule provide an approximation value for the integrals, however, Simpson’s Rule provides a more precise approximation value.

Trapezoidal Rule Formula

On the interval [a, b], consider the continuous function f(x). Divide the intervals [a, b] into n equal subintervals, each with a width of [a, b].

X = (b-a)/n, where a = x0< x1< x2 <x3,…..xn = b

Then there’s the Trapezoidal Rule formula for approximating the definite integral in terms of area.

ba f(x)dx

is provided by:

ba f(x)dx ≈ Tn = ∆x/2  [ ƒ ( x0 ) + 2ƒ ( x1 ) + 2ƒ ( x2 ) +….+ 2 f(xn-1) + f(xn)]

Where, xᵢ = a+iΔx

If n →∞, the expression’s R.H.S approaches the definite integral.

ba f(x)dx

What is the trapezoidal rule and how do i use it?

The trapezoidal rule can be used to solve any definite integral of a function. It divides the area under the curve formed by the function into trapezoids to calculate 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 “n” for the number of sub-intervals, “a” and “b” for the intervals, and “n” for the number of sub-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 given curve by substituting the obtained values

ba f(x)dx ≈ Tn = ∆x/2  [ ƒ ( x0 ) + 2ƒ ( x1 ) + 2ƒ ( x2 ) +….+ 2 f(xn-1) + f(xn)], where, xᵢ = a + i△x

Solved examples

Ex1. A function f ( x ) is given by the table of values . Approximate the area under the curve y = f ( x ) between x = 0 and x = 8 using  the Trapezoidal Rule with n = 4 subintervals .

x

0

2

4

6

8

F(x)

3

7

11

9

3

Solution. The formula for n=4  the Trapezoidal Rule subintervals has the form

T4 = ∆x/2  [ ƒ ( x0 ) + 2ƒ ( x1 ) + 2ƒ ( x2 ) + 2ƒ ( x3 ) + ƒ ( x4 ) ] .

The subinterval has a width of ∆x=4.

We can find the estimated area under the curve by substituting the function values from the table:

A≈ T4 = 2/2 (3 + 2·7 + 2·11 + 2·9 + 3)

     T4 = 3 + 14 + 22 + 18 + 3 = 60.

Ex2. Approximate the area under the curve y = f ( x ) between x = = 0 and x = 10 using the Trapezoidal Rule with n = 5 subintervals .

Solution. The Trapezoidal Rule formula for n = 5 intervals is given by

T5 = ∆x/2 (f(x0) + 2f(x1) + 2f(X2) + 2f(X3) + 2f(x4) +f(x5))

 It follows from the figure that Ax = 2. The function values at the endpoints of the intervals are

Ƒ ( x0) = ƒ ( 0 ) = 4 ; 

ƒ ( x1 ) = ƒ ( 2 ) = 6 ; 

f ( x2 ) = f ( 4 ) = 6 ;

 ƒ ( x3 ) = ƒ ( 6 ) = 4 ; 

f ( x4 ) = f ( 8 ) = 4 ;

 f ( x5 ) = f ( 10 ) = 5 .

As a result, the area’s approximate value is equal to

A≈ T5 = 2/2 [ 4 + 2 · 6 + 2 · 6 + 2 · 4 + 2 · 4 + 5 ] = 49 .

Ex3. Approximate the area under the curve y = 2x between x = −1 and x = 3 using the Trapezoidal Rule with n = 4 subintervals .

Solution. 

The Trapezoidal Rule formula for n = 4 has the form 

T4 = ∆x/2  [ ƒ ( x0 ) + 2ƒ ( x1 ) + 2ƒ ( x2 ) + 2ƒ ( x3 ) + ƒ ( x4 ) ] .

Compute the function values f ( xᵢ) : 

f ( x0 ) = f ( −1 ) = 2-1 = 1/2  

ƒ ( x1 ) = ƒ ( 0 ) = 20 = 1 ; 

f ( x2 ) = f ( 1 ) = 21 = 2 ;

 ƒ ( x3 ) = ƒ ( 2 ) = 22 = 4 ;

 f ( x4 ) = f ( 3 ) = 23 = 8 ;

 As ∆x =1, we get

A≈ T4 =1/2 [ 1/2 +2·1 +2·2 +2·4 +8 ] = 1/2 · 22 1/2  = 11 1/4.

Conclusion

To within a specified error tolerance, the derived trapezoidal rule can be used to compute fractional integrals and derivatives. The new formula, even for arbitrary functions, produces answers that are orders-of-magnitude more accurate than the conventional formula, according to numerical testing.

faq

Frequently asked questions

Get answers to the most common queries related to the IIT JEE Examination Preparation.

In numerical methods, what is the trapezoidal rule?

Ans. The trapezoidal rule is a numerical approach for finding the exact value ...Read full

What is the purpose of the trapezoidal rule?

Ans. The Trapezoidal Rule is the average of the left and right sums, and it usually provides a better approximation ...Read full

How can you tell whether the trapezoidal rule is an overestimate or underestimate?

Ans. So, since the trapezoidal rule underestimates area when the curve is concave down and overestimates area when t...Read full

What is the significance of the trapezoidal rule?

Ans. The rule is named trapezoidal because the overall area is divided into little trapezoids instead of rectangles ...Read full

In the trapezoidal rule, what kind of function is used?

Ans. To approximate an area under the curve, Riemann’s sums are utilised. The area under the curve is divided into...Read full