# Integration Using the Trapezoidal Rule

## Key Questions

• Let us approximate the definite integral

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

by Trapezoid Rule ${T}_{n}$.

First, split the interval $\left[a , b\right]$ into $n$ equal subintervals:

$\left[{x}_{0} , {x}_{1}\right] , \left[{x}_{1} , {x}_{2}\right] , \left[{x}_{2} , {x}_{3}\right] , \ldots , \left[{x}_{n - 1} , {x}_{n}\right]$,

where $a = {x}_{0} < {x}_{1} < {x}_{2} < \cdots < {x}_{n} = b$.

Trapezoid Rule ${T}_{n}$ can be found by

${T}_{n} = \left[f \left({x}_{0}\right) + 2 f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + \cdots + 2 f \left({x}_{n - 1}\right) + f \left({x}_{n}\right)\right] \frac{b - a}{2 n}$.

I hope that this was helpful.

• First split the interval $\left[a , b\right]$ into 4 equal subintervals:

$\left[{x}_{0} , {x}_{1}\right] , \left[{x}_{1} , {x}_{2}\right] , \left[{x}_{2} , {x}_{3}\right]$, and $\left[{x}_{3} , {x}_{4}\right]$.

(Note: ${x}_{0} = a$ and ${x}_{4} = b$)

The definite integral

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

can be approximated by

${T}_{4} = \left[f \left({x}_{0}\right) + 2 f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + 2 f \left({x}_{3}\right) + f \left({x}_{4}\right)\right] \cdot \frac{\Delta x}{2}$,

where $\Delta x = \frac{b - a}{4}$.

I hope that this is helpful.

• Let us divide the interval $\left[a , b\right]$ into n subintervals of equal lengths.

$\left[a , b\right] \to \left\{\left[{x}_{0} , {x}_{1}\right] , \left[{x}_{1} , {x}_{2}\right] , \left[{x}_{2} , {x}_{3}\right] , \ldots , \left[{x}_{n - 1} , {x}_{n}\right]\right\}$,

where $a = {x}_{0} < {x}_{1} < {x}_{2} < \cdots < {x}_{n} = b$.

We can approximate the definite integral

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

by Trapezoid Rule

${T}_{n} = \left[f \left({x}_{0}\right) + 2 f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + \cdots 2 f \left({x}_{n - 1}\right) + f \left({x}_{n}\right)\right] \frac{b - a}{2 n}$