# Trapezium Rule

### Summary

• Trapezium rule can only be applied to Definite Integrals.
• Area under the curve is divided into equally spaced intervals forming a trapezium.
• Trapezium Rule only provides an estimate area of under the curve.
• The formula given is:

$\int _{ a }^{ b }{ { y }_{ i } } dx\quad \approx \quad \frac { 1 }{ 2 } h\left[ { y }_{ 0 }+2({ y }_{ 1 }+{ y }_{ 2 }........\quad +{ y }_{ n-1 })+{ y }_{ n } \right]$

where $h\quad =\quad \frac { upper\quad limit\quad -\quad lower\quad limit }{ no.\quad of\quad intervals }$

Let’s start by briefly recalling the definite integrals from the article ”Integration”.

Definite Integration is when we integrate a function between defined limits. The function must have an upper limit and a lower limit.

It is defined as:

$\int _{ a }^{ b }{ f^{ ' }\left( x \right) } dx\quad =\quad f\left( b \right) \quad -\quad f\left( a \right)$

Where f’(x) is the derived function of f throughout the interval (a, b).

Trapezium rule is also one of the methods to solve a definite integral. To be more precise, when it is difficult or impossible to find the exact value of a given definite integral, we use a method known as “The trapezium Rule” to find its approximate value.

The formula given is:

$\int _{ a }^{ b }{ { y }_{ i } } dx\quad \approx \quad \frac { 1 }{ 2 } h\left[ { y }_{ 0 }+2({ y }_{ 1 }+{ y }_{ 2 }........\quad +{ y }_{ n-1 })+{ y }_{ n } \right]$

Where  $h\quad =\quad \frac { b\quad -\quad a }{ n }$  and  ${ y }_{ i }\quad =\quad f\left( a\quad +\quad ih \right)$.

Now suppose, we are to evaluate  $\int _{ a }^{ b }{ f\left( x \right) } dx$ .

We draw the curve y = f(x) between x = a and x = b and estimate the area under the curve by using various trapeziums.

Suppose we divide the area under the curve between x = a to x = b into n equal strips by taking (n – 1) equally spaced coordinates. We then first find the area of each trapezium and then find the sum of areas of all those trapeziums.

So:

Area under the curve =

$\int _{ a }^{ b }{ f\left( x \right) } dx\quad \approx \quad \frac { 1 }{ 2 } h\left[ { y }_{ 0 }+2({ y }_{ 1 }+{ y }_{ 2 }........\quad +{ y }_{ n-1 })+{ y }_{ n } \right]$

Where:

$h\quad =\quad width\quad =\frac { upper\quad limit\quad -\quad lower\quad limit }{ no.\quad of\quad intervals }$
$h\quad =\quad \frac { b\quad -\quad a }{ n }$

Each area between two strips is considered a trapezium and we know that area of a trapezium is given by:

$Area\quad =\quad \frac { 1 }{ 2 } ({ y }_{ 0 }\quad +\quad { y }_{ 1 })h$

Note: Increasing number of strips, improves the accuracy of the approximation.

Hence:

$\int _{ a }^{ b }{ f\left( x \right) } dx\quad \approx \quad$

$\frac { 1 }{ 2 } h({ y }_{ 0 }+{ y }_{ 1 })+\frac { 1 }{ 2 } h({ y }_{ 1 }+{ y }_{ 2 })+........+\frac { 1 }{ 2 } h({ y }_{ n-1 }+{ y }_{ n })$

Factorising:

$\int _{ a }^{ b }{ f\left( x \right) } dx\quad \approx \quad \frac { 1 }{ 2 } h({ y }_{ 0 }+{ y }_{ 1 }+{ y }_{ 1 }+{ y }_{ 2 }+{ y }_{ 2 }.......{ y }_{ n-1 }+{ y }_{ n-1 }+{ y }_{ n })$

$\int _{ a }^{ b }{ f\left( x \right) } dx\quad \approx \quad \frac { 1 }{ 2 } h\left[ { y }_{ 0 }+{ 2(y }_{ 1 }+{ y }_{ 2 }+{ y }_{ n-1 })+{ y }_{ n } \right]$

#### Example #1

Q. Estimate the value of  $\int _{ 0 }^{ 0.6 }{ x{ e }^{ x } } dx$  using trapezium rule with 6 intervals.

Solution:

$n\quad =\quad 6,\quad \quad \quad \quad \quad f\left( x \right) \quad =\quad x{ e }^{ x }$

Width of each interval = $h\quad =\quad \frac { 0.6\quad -\quad 0 }{ 6 } \quad =\quad 0.1$

Next we find the value of  $f\left( x \right) \quad =\quad x{ e }^{ x }$  for all the values of x between the intervals.

 x 0 0.1 0.2 0.3 0.4 0.5 0.6 $f\left( x \right) \quad =\quad x{ e }^{ x }$$f\left( x \right) \quad =\quad x{ e }^{ x }$ 0 $({ y }_{ 0 })$$({ y }_{ 0 })$ 0.1105 $({ y }_{ 1 })$$({ y }_{ 1 })$ 0.2443 $({ y }_{ 2 })$$({ y }_{ 2 })$ 0.4049 $({ y }_{ 3 })$$({ y }_{ 3 })$ 0.5967 $({ y }_{ 4 })$$({ y }_{ 4 })$ 0.8243 $({ y }_{ 5 })$$({ y }_{ 5 })$ 1.0932 $({ y }_{ 6 })$$({ y }_{ 6 })$

Finally we substitute the above calculated values in the trapezium rule formula:

$\int _{ 0 }^{ 0.6 }{ x{ e }^{ x } } dx\quad \approx \quad \frac { 1 }{ 2 } 0.1\left[ 0+2(0.1105+0.2443+0.4049+0.5967+0.8243)+1.0932 \right]$

$\approx \quad \frac { 1 }{ 2 } 0.1\left[ 1.0932+2(2.1808) \right]$

$\approx \quad 0.5\left[ 1.0932+2(2.1808) \right]$

Ans:         $\approx \quad 0.27275$

#### Example#2

Q. Use the trapezium rule with 3 intervals to estimate the value of  $\int _{ 0 }^{ { \pi }/{ 4 } }{ \sqrt { 1\quad +\quad 2{ tan }^{ 2 }(x) } dx }$

Solution:

$n\quad =\quad 3,\quad \quad \quad \quad \quad f\left( x \right) \quad =\quad \int _{ 0 }^{ { \pi }/{ 4 } }{ \sqrt { 1\quad +\quad 2{ tan }^{ 2 }(x) } }$ $h\quad =\quad \frac { { \pi }/{ 4 }\quad -\quad 0 }{ 3 } \quad =\quad \frac { \pi }{ 12 }$
 x 0 $\frac { \pi }{ 12 }$$\frac { \pi }{ 12 }$ $\frac { \pi }{ 6 }$$\frac { \pi }{ 6 }$ $\frac { \pi }{ 4 }$$\frac { \pi }{ 4 }$ $f\left( x \right) \quad =\quad \int _{ 0 }^{ { \pi }/{ 4 } }{ \sqrt { 1\quad +\quad 2{ tan }^{ 2 }(x) } }$$f\left( x \right) \quad =\quad \int _{ 0 }^{ { \pi }/{ 4 } }{ \sqrt { 1\quad +\quad 2{ tan }^{ 2 }(x) } }$ 1 $({ y }_{ 0 })$$({ y }_{ 0 })$ 1.0694 $({ y }_{ 1 })$$({ y }_{ 1 })$ 1.2909 $({ y }_{ 2 })$$({ y }_{ 2 })$ 1.7320 $({ y }_{ 3 })$$({ y }_{ 3 })$

Finally we substitute the above calculated values in the trapezium rule formula:

$\int _{ 0 }^{ { \pi }/{ 4 } }{ \sqrt { 1\quad +\quad 2{ tan }^{ 2 }(x) } dx } \quad \approx \quad \frac { 1 }{ 2 } \frac { \pi }{ 12 } \left[ 1+2(1.0694+1.2909)+1.7320 \right]$

$\approx \quad \frac { \pi }{ 24 } \left[ 2.7320+2(2.3604) \right]$

$\approx \quad \frac { \pi }{ 24 } \left[ 2.7320+4.7208 \right]$

Ans:       $\approx \quad 0.98$