### Trapezoidal Rule

• Use the multiple-segment trapezoidal rule of integration to solve problems.

$\int_{a}^{b} f(x) dx \approx \dfrac{\triangle x}{2}\left ( y_{0} + 2y_{1} + 2y_{2} + 2y_{3} +.....+ 2y_{n-1} + y_{n}\right)$

for n= 1 the above equation modifies to,

$\int_{a}^{b} f(x) dx \approx \Delta x\left | \dfrac{f(a) + f(b)}{2} \right|$

In trapezoidal rule, the steps are as follows:

1. the area under the curve is divided into n intervals.

2. The width of each interval is $\Delta x = \dfrac{b-a}{n}$ where a and b are limits of integration and n is no. of intervals.

3. The area of each trapezoid is = $\dfrac{1}{2}$ $\times$ $\Delta$ x $\times$ sum of parallel sides = $\dfrac{1}{2}$ $\times$ $\Delta$ x $\times$ $\left (f(x_{i-1}) + f(x_i)\right)$

4. If you add all such trapezoids, all vertical sides, except first and last one are added twice. The first and last vertical lines are added only once.

### Solved Example:

#### 5-4-01

In order to estimate $\int_{2}^{6}2^{t}dt$ using the Trapezoidal rule with six subintervals. Then the width of each subinterval is:

Solution:
$h = \dfrac{b-a}{n} = \dfrac{6-2}{6} = \dfrac{4}{6}= \dfrac{2}{3}$ where h = interval width, a = initial limit, b = upper limit, n = no. of intervals

### Solved Example:

#### 5-4-02

Match the CORRECT pairs.

 Integration Scheme Order of Polynomial P. Simpson’s $\dfrac{3}{8}$ Rule 1. First Q. Trapezoidal Rule 2. Second R. Simpson’s $\dfrac{1}{3}$ Rule 3. Third

Solution:
In Trapezoidal method, the points are connected by straight line, whereas in Simpson’s $\dfrac{1}{3}$ Rule, they are connected by parabola. Also, Simpson’s $\dfrac{3}{8}$ Rule, they are connected by cubic parabola.

### Solved Example:

#### 5-4-03

Evaluate $\displaystyle \int_{0}^{6} \dfrac{1}{1+x}dx$ using trapezoidal method, using 6 intervals.

Solution:
$\triangle x = \dfrac{b-a}{n} = \dfrac{6-0}{6} = 1$ $\mathrm{At}\ x = 0, y_0 = 1,\ \mathrm{At}\ x = 1, y_1 = \dfrac{1}{2},\ \mathrm{At}\ x = 2, y_2 = \dfrac{1}{3}$ $y_3 = \dfrac{1}{4}, y_4 = \dfrac{1}{5}, y_5 = \dfrac{1}{6}, y_6 = \dfrac{1}{7}$ \begin{align*} \int_{a}^{b} f(x) dx &\approx \dfrac{\triangle x}{2}\left ( y_{0} + 2y_{1} + 2y_{2} + 2y_{3} + 2y_{4}+ 2y_{5} + y_{6} \right )\\ &=2.0214 \end{align*}

### Solved Example:

#### 5-4-04

Numerically integrate, $f(x) = 10x - 20x^2$ from lower limit a = 0 to upper limit b = 0.5. Use Trapezoidal rule with five equal subdivisions, The value (in units, round off to two decimal places) obtained is: (GATE Civil 2021)

Solution:

x $y=10x-20x^2$
0 0
0.1 0.8
0.2 1.2
0.3 1.2
0.4 0.8
0.5 0

\begin{aligned} I &= \int_0^{0.5} f(x) dx\\ &= \dfrac{h}{2}\left[y_0 + y_5 + 2(y_1 + y_2 + y_3 + y_4)\right]\\ &= \dfrac{0.1}{2}\left[ 0 + 0 + 2(0.8 + 1.2 + 1.2 + 0.8)\right]\\ &=0.40\end{aligned}

### Solved Example:

#### 5-4-05

Trapezoidal Rule gives exact value of the integral when the integrand is a: (TANGEDCO AE ME 2015)

Solution:
Numerical Methods involve calculation of integrals which are otherwise difficult or impossible to evaluate. They basically calculate area under the curve by dividing them into smaller subareas.

In Trapezoidal method, the area is subdivided into smaller trapezoids.

If the function gives you smooth graph with a nice curve, these trapezoids never exactly match the curve and the answer will always be inaccurate. Of course, you can reduce the error by selecting smaller and smaller trapezoids, but still the answer will never be 100% accurate.

However, if the function is linear, (involving simple first degree polynomial) then the trapezoids will perfectly 'fit' into the the required area and the trapezoid method will give you 100% accurate answer.