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 = x_{0} < x_{1} < x_{2} < ⋯ < x_{n} = b

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

∫^{b}_{a} f(x) dx = Area Under the Curve = (Δx/2) [y_{0} + 2 (y_{1} + y_{2} + y_{3} + ….. + y_{n-1}) + y_{n}]

where, y_{0}, y_{1}, y_{2}, …. y_{n} 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 = x_{0} < x_{1} < x_{2} < x_{3} <…..< x_{n} = b

Then the Trapezoidal Rule formula is,

∫^{b}_{a}f(x) dx ≈ △x/2 [f(x_{0}) + 2f(x_{1}) + 2f(x_{2}) +….2f(x_{n-1}) + f(x_{n})]

where, x_{i} = 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(x_{0}) and f(x_{1})

The area of the first trapezoid = (1/2) Δx [f(x_{0}) + f(x_{1})]

Similarly, the area of the remaining trapezoids are (1/2)Δx [f(x_{1}) + f(x_{2})], (1/2)Δx [f(x_{2}) + f(x_{3})], and so on.

Now we can say that,

∫^{b}_{a} f(x) dx ≈ (1/2)Δx (f(x_{0})+f(x_{1}) ) + (1/2)Δx (f(x_{1})+f(x_{2}) ) + (1/2)Δx (f(x_{2})+f(x_{3}) ) + … + (1/2)Δx (f(x_{n-1}) + f(x_{n}) )

After simplifying we get,

∫^{b}_{a} f(x) dx≈ (Δx/2) (f(x_{0})+2 f(x_{1})+2 f(x_{2})+2 f(x_{3})+ … +2f(x_{n-1}) + f(x_{n}))

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, ∫^{b}_{a} f(x) dx. The value of the definite integral can be calculated using the trapezoidal rule by following the steps below,

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

Find the width of sub-interval (△x) using the formula △x = (b – a)/nStep 2:

Put all the values in the trapezoidal rule formula and find the approximate area of the given curve which represents the definite integral ∫Step 3:^{b}_{a}f(x) dx

∫^{b}_{a}f(x) dx ≈ (Δx/2) (f(x_{0})+2 f(x_{1})+2 f(x_{2})+2 f(x_{3})+ … +2f(x_{n-1}) + f(x_{n}))where,

x= a + i△x_{i}

**Summation Notation of Trapezoidal Rule**

**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 i^{th} interval,

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

A = A_{1} + A_{2} + ….+ A_{n}

⇒ 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 **

**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 A_{i }denotes the area of the i^{th} 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. **

**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. **

**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. **

**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. **

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

**f(x) = x**^{2}

**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. **

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

**f(x) = x**^{3}** + 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. **

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

**f(x) = e**^{x}

**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,

∫^{b}_{a}f(x) dx = (Δx/2) (f(x_{0})+2 f(x_{1})+2 f(x_{2})+2 f(x_{3})+ … +2f(x_{n-1}) + f(x_{n}))

### 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.