# Trapezoidal Rule

The trapezoidal rule is one of the fundamental rules of integration which is used to define the basic definition of integration. It is a widely used rule and the Trapezoidal rule is named so because it gives the area under the curve by dividing the curve into small trapezoids instead of rectangles.

Generally, we find the area under the curve by dividing the area into smaller rectangles and then finding the sum of all the rectangles, but in the trapezoidal rule the area under the curve is divided into trapezoids, and then their sum is calculated. The trapezoidal rule is used to find the value of the definite integrals in numerical analysis. This rule is also called the trapezoid rule or the trapezium rule. Let us learn more about the trapezoidal rule, its formula and proof, example, and others in detail in this article.

## What is the Trapezoidal Rule?

The trapezoidal rule is a rule which is used to find the value of the definite integral of the form bâˆ«a f(x) dx. We know that the value of the definite integral bâˆ«a f(x) dx is the area enclosed under the curve y = f(x) and the x-axis in the interval a and b on the x-axis. We calculate this area by dividing the complete area into several small rectangles and then finding their sum.

In the Trapezoidal rule as the name suggest the area under the curve is divided into several trapezoids and then their sum is found to get the area of the curve. The trapezoidal rule does not provide the best approximation of the area under the curve than the Simpsonâ€™s Rule but still, its result is precise enough and this rule is a widely used rule in calculus.

## Trapezoidal Rule Formula

The trapezoidal rule formula is the formula that is used to find the area under the curve. Now to find the area under the curve using the Trapezoidal Rule,

Let y = f(x) be a continuous curve defined on the closed interval [a, b]. Now we divide the closed interval [a, b] into n equal subintervals, with each having the width of,

Î”x = (b – a)/n

Such that,

a = x0 < x1 < x2 < â‹¯ < xn = b

Now using the Trapezoidal rule formula we can find the area under the curve as,

âˆ«ba f(x) dx = Area Under the Curve = (Î”x/2) [y0 + 2 (y1 + y2 + y3 + ….. + yn-1) + yn]

where, y0, y1, y2, …. yn are the values of function at x = 1, 2, 3, ….., n respectively.

## Derivation of Trapezoidal Rule Formula

The Trapezoidal Rule formula for calculating the area under the curve is derived by dividing the area under the curve into several trapezoids and then finding their sum.

### Statement:

Let f(x) be a continuous function defined on the interval (a, b). Now we divide the intervals (a, b) into n equal sub-intervals where the width of each interval is,

Î”x = (b – a)/n

such that a = x0 < x1 < x2 < x3 <â€¦..< xn = b

Then the Trapezoidal Rule formula is,

âˆ«baf(x) dx â‰ˆ â–³x/2 [f(x0) + 2f(x1) + 2f(x2) +â€¦.2f(xn-1) + f(xn)]

where, xi = a + iâ–³x

If n â†’ âˆž, the R.H.S of the expression gives the definite integral

### Proof:

This formula is proved by dividing the area under the given curve as shown in the above figure into various trapezoids. The first trapezoid has a height Î”x and the length of parallel bases are f(x0) and f(x1)

The area of the first trapezoid = (1/2) Î”x [f(x0) + f(x1)]

Similarly, the area of the remaining trapezoids are (1/2)Î”x [f(x1) + f(x2)], (1/2)Î”x [f(x2) + f(x3)], and so on.

Now we can say that,

âˆ«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(xn-1) + f(xn) )

After simplifying we get,

âˆ«ba f(x) dxâ‰ˆ (Î”x/2) (f(x0)+2 f(x1)+2 f(x2)+2 f(x3)+ … +2f(xn-1) + f(xn))

Thus, the trapezoidal rule is proved.

## How to Apply Trapezoidal Rule?

The trapezoidal rule finds the area under the curve by dividing the area under the curve into various trapezoids and then find the sum of all the trapezoids. The trapezoidal rule is not the perfect approximation of the value of the definite integral as it uses the quadratic approximation.

We have to find the value of the definite integral, âˆ«ba f(x) dx. The value of the definite integral can be calculated using the trapezoidal rule by following the steps below,

Step 1: Mark the value of sub-intervals, “n” and intervals “a” and “b”.

Step 2: Find the width of sub-interval (â–³x) using the formula â–³x = (b – a)/n

Step 3: Put all the values in the trapezoidal rule formula and find the approximate area of the given curve which represents the definite integral âˆ«ba f(x) dx

âˆ«ba f(x) dx â‰ˆ (Î”x/2) (f(x0)+2 f(x1)+2 f(x2)+2 f(x3)+ … +2f(xn-1) + f(xn))

where, xi = a + iâ–³x

## Summation Notation of Trapezoidal Rule

We know that the area of a trapezoid is basically the average of the lengths of the parallel sides multiplied by the height. So, in this case, consider a trapezoid for the ith interval,

Since the total area is the sum of all the areas,

A = A1 + A2 + ….+ An

â‡’ A =

â‡’ A =

This is called the sigma notation or summation notation of the trapezoid sums.

## Riemann Sums

The Riemann sums up work on the idea of diving the area under the curve into different rectangular parts. As the number of rectangles increases, the area becomes closer and closer to the current area. In the figure shown below, there is a function f(x). The area under this function is divided into many rectangles. The total area under the curve is the sum of the areas of all the rectangles.

Notice that in the above figure, the right end of the rectangles touches the curve. This is called right-Riemann sums.

In another case, when the left end of the rectangles touches the curve as shown in the image below, they are called left Riemann sums.

Let’s say Î”x is the width of the interval width n is the number of intervals as stated above. Then the area of the curve represented by the sum is given by,

## Middle Point Sums

In the Riemann sums, either the left end or the right end of the rectangle touches the curve. In this case, the middle point of the rectangle touches the curve. Everything else is the same as Riemann sums. The figure below shows the function f(x) and different rectangles in the middle point sums.

Let’s say Ai denotes the area of the ith rectangle. The area of this rectangle in this case will be,

Now, the total area in the summation notation will be given by,

Read More,

## Solved Example on Trapezoidal Rule

### Example 1: Find the area enclosed by the function f(x) between x = 0 to x = 4 with 4 intervals.

f(x) = 4

Solution:

Here a = 0, b = 4 and n = 4.

The trapezoidal rule for n = 4 is,

Substituting the values in this equation,

### Example 2: Find the area enclosed by the function f(x) between x = 0 to x = 3 with 3 intervals.

f(x) = x

Solution:

Here a = 0, b = 3 and n = 3.

The trapezoidal rule for n = 3 is,

Substituting the values in this equation,

### Example 3: Find the area enclosed by the function f(x) between x = 0 to x = 2 with 2 intervals.

f(x) = 2x

Solution:

Here a = 0, b = 2 and n = 2.

The trapezoidal rule for n = 2 is,

Substituting the values in this equation,

### Example 4: Find the area enclosed by the function f(x) between x = 0 to x = 3 with 3 intervals.

f(x) = x2

Solution:

Here a = 0, b = 3 and n = 3.

The trapezoidal rule for n = 3 is,

Substituting the values in this equation,

### Example 5: Find the area enclosed by the function f(x) between x = 0 to x = 4 with 4 intervals.

f(x) = x3 + 1

Solution:

Here a = 0, b = 4 and n = 4.

The trapezoidal rule for n = 4 is,

Substituting the values in this equation,

### Example 6: Find the area enclosed by the function f(x) between x = 0 to x = 4 with 4 intervals.

f(x) = ex

Solution:

Here a = 0, b = 4 and n = 4.

The trapezoidal rule for n = 4 is,

Substituting the values in this equation,

## Applications of Trapezoid Rule

### Numerical Integration:

The primary application of the trapezoidal rule is in approximating definite integrals. It’s used when the integration of a function is challenging, and a numerical approach is more feasible. The trapezoidal rule is often part of more advanced numerical integration techniques.

### Physics and Engineering:

In physics and engineering, the trapezoidal rule can be applied to calculate quantities such as displacement, velocity, and acceleration. For example, when experimental data is collected at discrete time intervals, the trapezoidal rule can be used to estimate the area under the curve, providing an approximation of the integral.

### Economics and Finance:

The trapezoidal rule can be applied in financial modeling to estimate the present value of future cash flows. This is especially useful in discounted cash flow (DCF) analysis, where the goal is to calculate the net present value of an investment.

### Statistics:

In statistics, the trapezoidal rule can be used to estimate the area under probability density functions or cumulative distribution functions. This is particularly useful in cases where the exact form of the distribution is unknown or complex.

## FAQs on Trapezoidal Rule

### Q1: What is Trapezoidal Rule?

Answer:

The trapezoidal rule is the rule that is used to find the definite integral it divides the area under the curve into several trapezoids and then their individual area is found and then the sum is calculated to get the value of the definite integral.

### Q2: What is the Trapezoidal Rule Formula?

Answer:

The trapezoidal rule formula is,

âˆ«ba f(x) dx = (Î”x/2) (f(x0)+2 f(x1)+2 f(x2)+2 f(x3)+ … +2f(xn-1) + f(xn))

### Q3: Why is it Called Trapezoidal Rule Formula?

Answer:

Trapezoidal Rule Formula is called the trapezoidal rule because it divides the area under the curve into several trapezoids and then their area is calculated by finding the sum of the trapezoids.

### Q4: What is the Difference Between Trapezoidal Rule and Riemann Sums Rule?

Answer:

The major difference between the Trapezoidal rule and Riemann Sums rule is, as the trapezoidal rule divides the area under the curve as the trapezoids and then finds the area by taking their sum whereas, the Riemann Sums divides the area under the curve as the trapezium and then finds the area by taking their sum.

Previous
Next
Share your thoughts in the comments
Similar Reads