# How do you use the trapezoidal rule with n=4 to approximate the area between the curve lnx from 1 to 3?

Jan 9, 2017

#### Answer:

${\int}_{1}^{3} \setminus \ln x \setminus \mathrm{dx} \approx 1.28 \text{ } \left(2 \mathrm{dp}\right)$

#### Explanation:

The values of $y = \ln x$ are tabulated as follows (using Excel) working to 5dp Using the trapezoidal rule:

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

We have:

${\int}_{1}^{3} \setminus \ln x \setminus \mathrm{dx} \approx \frac{0.5}{2} \left\{\left(0 + 1.098612\right) + 2 \left(0.405465 + 0.693147 + 0.91629\right)\right\}$
$0.25 \left\{+ 1.098612 + 2 \left(2.014903\right)\right\}$
$0.25 \left\{+ 1.098612 + 4.029806\right\}$
$0.25 \left\{+ 5.128418\right\}$
$1.282104$

It is sometimes interesting to compare against the actual exact answer. Using $\int \setminus \ln x \mathrm{dx} = x \ln x - x$ we get

${\int}_{1}^{3} \setminus \ln x \setminus \mathrm{dx} = {\left[x \ln x - x\right]}_{1}^{3}$
$\text{ } = \left(3 \ln 3 - 3\right) - \left(1 \ln 1 - 1\right)$
$\text{ } = \left(3 \ln 3 - 3\right) - \left(- 1\right)$
$\text{ } = 3 \ln 3 - 2$
$\text{ } = 1.295836 \ldots$