# Math Help - Trapezium rule integration

1. ## Trapezium rule integration

Find approximations to the value of:

$\int_{1}^5 \frac{1}{x^2} dx$

Using the trapezium rule with 4 intervals.

Now I know that it's calculated using the formula:

$\frac{h}{2} (f(x_{0}) + f(x_{n})) + 2(f(x_{1}) + f(x_{2}) ... f(x_{n-1}))$ Where:

n = interval

$h = \frac {b - a}{n}$

$x_{k} = a + kh$

But the answer is not coming right :

= 1/2 (1 + 1/25) + 2(1/4 + 1/9 + 1/16)

2. Originally Posted by struck
Find approximations to the value of:

$\int_{1}^5 \frac{1}{x^2} dx$

Using the trapezium rule with 4 intervals.

Now I know that it's calculated using the formula:

$\frac{h}{2} (f(x_{0}) + f(x_{n})) + 2(f(x_{1}) + f(x_{2}) ... f(x_{n-1}))$ Where:

n = interval

$h = \frac {b - a}{n}$

$x_{k} = a + kh$

But the answer is not coming right :

= 1/2 (1 + 1/25) + 2(1/4 + 1/9 + 1/16)

it should be $\frac{1}{2}(f(x_0)+2f(x_1)+2f(x_2)+2f(x_3)+f(x_4))$

which is $\frac{1}{2}(f(1)+2f(2)+2f(3)+2f(4)+f(5))$

which is $\frac{1}{2}\left(\frac{1}{1^2}+2\left(\frac{1}{2^2 }\right)+2\left(\frac{1}{3^2}\right)+2\left(\frac{ 1}{4^2}\right)+\frac{1}{5^2}\right)$

3. Originally Posted by struck
Find approximations to the value of:

$\int_{1}^5 \frac{1}{x^2} dx$

Using the trapezium rule with 4 intervals.

Now I know that it's calculated using the formula:

$\frac{h}{2} (f(x_{0}) + f(x_{n})) + 2(f(x_{1}) + f(x_{2}) ... f(x_{n-1}))$ Where:

n = interval

$h = \frac {b - a}{n}$

$x_{k} = a + kh$

But the answer is not coming right :

= 1/2 (1 + 1/25) + 2(1/4 + 1/9 + 1/16)

$\Delta{x}=\frac{5-1}{4}=1$

This implies that $x_i=1+i\Delta{x}=1+i$

Then $x_0=1,x_1=2,x_2=3,x_3=4,x_4=5$

So, we have By the TR

$\int_1^5\frac{1}{x^2}\approx\frac{1}{2}\Delta{x}[f(x_0)+2f(x_1)+2f(x_2)+2f(x_3)+f(x_4)]$

4. You beat me to it McScruffy! Thanx for the thanx, though!

5. Originally Posted by VonNemo19
You beat me to it McScruffy! Thanx for the thanx, though!
No problem, I thought that your post explained how to get to where I started a bit better.