# Approximate integration

1. Feb 6, 2005

I have two similar problems. I need to show that

1. $$\frac{1}{2} \left( T_n + M_n \right) = T_{2n}$$

2. $$\frac{1}{3} T_n + \frac{2}{3} M_n = S_{2n}$$

where:

$$T$$ is the Trapezoidal rule.

$$M$$ is the Midpoint rule.

$$S$$ is Simpson's rule.

This is what I've got:

$$T_n = \frac{b-a}{2n}\left[ f\left( x_0 \right) + 2f\left( x_1 \right) + 2f\left( x_2 \right) + \dots + 2f\left( x_{n-2} \right) + 2f\left( x_{n-1} \right) + f\left( x_{n} \right) \right]$$

$$T_{2n} = \frac{b-a}{4n}\left[ f\left( x_0 \right) + 2f\left( x_2 \right) + 2f\left( x_4 \right) + \dots + 2f\left( x_{2n-2} \right) + 2f\left( x_{2n-1} \right) + f\left( x_{2n} \right) \right]$$

$$M_n = \frac{b-a}{n}\left[ f\left( \bar{x}_1 \right) + f\left( \bar{x}_2 \right) + f\left( \bar{x}_3 \right) + \dots + f\left( \bar{x}_{n} \right) \right]$$

$$S_n = \frac{b-a}{3n}\left[ f\left( x_0 \right) + 4f\left( x_1 \right) + 2f\left( x_2 \right) + 4f\left( x_3 \right) + \dots + 4f\left( x_{n-3} \right) + 2f\left( x_{n-2} \right) + 4f\left( x_{n-1} \right) + f\left( x_{n} \right) \right]$$

$$S_{2n} = \frac{b-a}{6n}\left[ f\left( x_0 \right) + 4f\left( x_2 \right) + 2f\left( x_4 \right) + 4f\left( x_6 \right) + \dots + 4f\left( x_{2n-3} \right) + 2f\left( x_{2n-2} \right) + 4f\left( x_{2n-1} \right) + f\left( x_{2n} \right) \right]$$

The main difficulty I've had is to deal with the $$f\left( \bar{x}_{n} \right)$$ terms, since I can't see a way to combine them with the $$f\left( x_{n} \right)$$ ones.

Any help is highly appreciated.

2. Feb 6, 2005

### Integral

Staff Emeritus
Express your points $x_0, x_1, ..., x_n$ in terms of the lower limit and the step. So the step is:

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

$$x_0 = a$$
$$x_1 = a + h$$
.
.
.
$$x_n = a + nh$$

Can you do the same for the $\bar {x}_n$

You may want to use different symbols for the evaluation points of the different methods. This will help you to deal with the fact that $x_n$ is not the same point for the different methods. Once you have worked out the actual values, in terms af a and h you should be home free.

3. Feb 7, 2005

Thank you for the tips!!!

I think I've found the solution to both problems. Here's what I have:

$$T_n = \frac{h}{2}\left\{ f(a) + 2f(a+h) + 2f(a+2h) + \dots + 2f\left[ a + (n-2)h \right] + 2f\left[ a + (n-1)h \right] + f\left( a + nh \right) \right\}$$

$$T_{2n} = \frac{h}{4}\left\{ f(a) + 2 f\left( a + \frac{h}{2} \right) + 2 f\left( a + h \right) + 2 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a + \frac{(2n-1)h}{2} \right] + f\left( a + nh \right) \right\}$$

$$M_n = h \left\{ f\left( a + \frac{h}{2} \right) + f\left( a + \frac{3h}{2} \right) + f\left( a + \frac{5h}{2} \right) + \dots + f\left[ a + \frac{(2n-3)h}{2} \right] + f\left[ a + \frac{(2n-2)h}{2} \right] + f\left[ a + \frac{(2n-1)h}{2} \right] \right\}$$

$$S_n = \frac{h}{3}\left\{ f(a) + 4 f(a+h) + 2 f(a+2h) + 4 f(a+3h) + \dots + 4 f\left[ a+(n-3)h \right] + 2 f\left[ a+(n-2)h \right] + 4 f\left[ a+(n-1)h \right] + f(a+nh) \right\}$$

$$S_{2n} = \frac{h}{6} \left\{ f(a) + 4 f\left( a + \frac{h}{2} \right) + 2f(a+h) + 4 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a+\frac{(2n-2)h}{2} \right] + 4 f\left[ a+\frac{(2n-1)h}{2} \right] + f(a+nh) \right\}$$

To make things a bit simpler, I write them in shorthand notation:

$$T_n = \frac{h}{2}\alpha$$

$$T_{2n} = \frac{h}{4}\beta$$

$$M_n = h \gamma$$

$$S_n = \frac{h}{3}\theta$$

$$S_{2n} = \frac{h}{6}\lambda$$

So, we have:

1. $$\frac{1}{2}\left( T_n + M_n \right) = T_{2n}$$

$$\frac{1}{2} \left( \frac{h}{2} \alpha + h \gamma \right) = \frac{h}{4}\beta$$

$$\frac{h}{2} \left( \frac{1}{2} \alpha + \gamma \right) = \frac{h}{4}\beta$$

$$\frac{1}{2}\alpha + \gamma = \frac{1}{2}\beta$$

Thus, we find

$$\frac{1}{2} f(a) + f(a+h) + f(a+2h) + \dots + f\left[ a + (n-2)h \right] + f\left[ a + (n-1)h \right] + \frac{1}{2} f\left( a + nh \right)$$​

$$+$$​

$$f\left( a + \frac{h}{2} \right) + f\left( a + \frac{3h}{2} \right) + f\left( a + \frac{5h}{2} \right) + \dots + f\left[ a + \frac{(2n-1)h}{2} \right]$$​

$$=$$​

$$\frac{1}{2} f(a) + f\left( a + \frac{h}{2} \right) + f(a+h) + f\left( a + \frac{3h}{2} \right) + \dots + f\left[ a + \frac{(2n-1)h}{2} \right] + \frac{1}{2} f\left( a + nh \right)$$​

which verifies the first relationship.

2. $$\frac{1}{3}T_n + \frac{2}{3}M_n = S_{2n}$$

$$\frac{1}{3}\left( \frac{h}{2}\alpha \right) + \frac{2}{3}(h\gamma ) = \frac{h}{6}\lambda$$

$$\frac{h}{6}\alpha + \frac{2h}{3}\gamma = \frac{h}{6}\lambda$$

$$\frac{h}{6} \left( \alpha + 4\gamma \right) = \frac{h}{6}\lambda$$

$$\alpha + 4\gamma = \lambda$$

Thus, we find

$$f(a) + 2f(a+h) + 2f(a+2h) + \dots + 2f\left[ a + (n-2)h \right] + 2f\left[ a + (n-1)h \right] + f\left( a + nh \right)$$​

$$+$$​

$$4f\left( a + \frac{h}{2} \right) + 4f\left( a + \frac{3h}{2} \right) + 4f\left( a + \frac{5h}{2} \right) + \dots + 4f\left[ a + \frac{(2n-3)h}{2} \right] + 4f\left[ a + \frac{(2n-2)h}{2} \right] + 4f\left[ a + \frac{(2n-1)h}{2} \right]$$​

$$=$$​

$$f(a) + 4 f\left( a + \frac{h}{2} \right) + 2f(a+h) + 4 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a+\frac{(2n-2)h}{2} \right] + 4 f\left[ a+\frac{(2n-1)h}{2} \right] + f(a+nh)$$​

which verifies the second relationship.