# How do you Use the trapezoidal rule with n=10 to approximate the integral int_1^2ln(x)/(1+x)dx?

Sep 6, 2014

The trapezoidal rule is:
${\int}_{a}^{b} f \left(x\right) \mathrm{dx} \approx \frac{b - a}{2 n} \cdot \left(f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + \ldots + 2 f \left({x}_{n}\right) + f \left({x}_{n + 1}\right)\right)$

1. First, we need to find our different values of x: since $1 \le x \le 2$ and we need to split up our function into ten parts. So, quite simply, the values of x we need are 1, 1.1, 1.2, ..., 1.9, 2, with ${x}_{1} = 1$, ${x}_{2} = 1.1$, and so on.

2. Next, we need to substitute the values of $a$ and $b$, which are 1 and 2 respectively, into the equation. Also plug in $n = 10$.
${\int}_{1}^{2} \ln \frac{x}{1 + x} \mathrm{dx} \approx \frac{2 - 1}{2 \cdot 10} \cdot \left(f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + \ldots + 2 f \left({x}_{10}\right) + f \left({x}_{11}\right)\right)$

3. Next, we evaluate $f \left({x}_{1}\right)$, $f \left({x}_{2}\right)$ and so on. As an example:
$f \left({x}_{1}\right) = f \left(1\right) = \ln \frac{1}{1 + 1} = \ln \frac{1}{2} = 0$
$f \left({x}_{2}\right) = f \left(1.1\right) = \ln \frac{1.1}{1 + 1.1} = \ln \frac{1.1}{2.1} \approx 0.04539$

4. Finally, we plug all these values into our equation.
${\int}_{1}^{2} \ln \frac{x}{1 + x} \mathrm{dx} \approx \frac{2 - 1}{2 \cdot 10} \cdot \left(f \left(1\right) + 2 f \left(1.1\right) + \ldots\right)$

This should provide an approximate answer to any integral.