# How do you use the Trapezoidal Rule to approximate integral int(2/x) dx for n=4 from [1,3]?

Jun 25, 2018

${\int}_{1}^{3} \setminus \frac{2}{x} \setminus \mathrm{dx} \approx 2.233333$

#### Explanation:

We have:

$y = \frac{2}{x}$

We want to estimate $\int \setminus y \setminus \mathrm{dx}$ over the interval $\left[1 , 3\right]$ with $4$ strips; thus:

$\Delta x = \frac{3 - 1}{4} = 0.5$

The values of the function are tabulated as follows;

Trapezium Rule

$A = {\int}_{a}^{b} \setminus y \setminus \mathrm{dx}$

$\setminus \setminus \setminus \approx \frac{h}{2} \left\{{y}_{0} + {y}_{n} + 2 \left({y}_{1} + \ldots + {y}_{n - 1}\right)\right\}$

$\setminus \setminus \setminus = \frac{0.5}{2} \cdot \left\{2 + 0.666667 + 2 \cdot \left(1.333333 + 1 + 0.8\right)\right\}$
$\setminus \setminus \setminus = 0.25 \cdot \left\{2.666667 + 2 \cdot \left(3.133333\right)\right\}$
$\setminus \setminus \setminus = 0.25 \cdot \left\{2.666667 + 6.266667\right\}$
$\setminus \setminus \setminus = 0.25 \cdot 8.933333$
$\setminus \setminus \setminus = 2.233333$

Actual Value

For comparison of accuracy:

$A = {\int}_{1}^{3} \setminus \frac{2}{x} \setminus \mathrm{dx}$
$\setminus \setminus \setminus = {\left[2 \ln x\right]}_{1}^{3}$
$\setminus \setminus \setminus = 2 \ln 3 - 2 \ln 1$
$\setminus \setminus \setminus = 2 \ln 3$
$\setminus \setminus \setminus \approx 2.1972$