# Trapezium rule integration

• Aug 2nd 2009, 08:44 AM
struck
Trapezium rule integration
Find approximations to the value of:

$\displaystyle \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:

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

n = interval

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

$\displaystyle x_{k} = a + kh$

But the answer is not coming right :( :

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

• Aug 2nd 2009, 08:52 AM
McScruffy
Quote:

Originally Posted by struck
Find approximations to the value of:

$\displaystyle \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:

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

n = interval

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

$\displaystyle 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 $\displaystyle \frac{1}{2}(f(x_0)+2f(x_1)+2f(x_2)+2f(x_3)+f(x_4))$

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

which is $\displaystyle \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)$
• Aug 2nd 2009, 09:01 AM
VonNemo19
Quote:

Originally Posted by struck
Find approximations to the value of:

$\displaystyle \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:

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

n = interval

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

$\displaystyle x_{k} = a + kh$

But the answer is not coming right :( :

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

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

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

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

So, we have By the TR

$\displaystyle \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)]$
• Aug 2nd 2009, 09:10 AM
VonNemo19
You beat me to it McScruffy! Thanx for the thanx, though!(Hi)
• Aug 2nd 2009, 09:11 AM
McScruffy
Quote:

Originally Posted by VonNemo19
You beat me to it McScruffy! Thanx for the thanx, though!(Hi)

No problem, I thought that your post explained how to get to where I started a bit better.