The trapezoid formula (for one interval) is given by,

\int^b_a f(x)dx = (b-a)\frac{f(a)+f(b)}{2}.

a) The trapezoid method has a global error of O(h^2). In the above equation we use h=b-a. Simpson's 1/3-rule can be derived by performing Richardson extrapolation on the trapoezoid formula. Do this.

b) What happens with the error?

First of all I divide the interval [a,b] into two intervals,

\int^b_af(x)dx = \int^c_af(x)dx + \int^b_cf(x)dx = (c-a)\frac{f(a)+f(c)}{2}+(b-c)\frac{f(b)+f(c)}{2}.

This approximation has global error O(h^2) and so I am tempted to write that,

\int^b_af(x)dx = (c-a)\frac{f(a)+f(c)}{2}+(b-c)\frac{f(b)+f(c)}{2} + c_1h^2+c_2h^3+c_3h^4+\cdots,

but I've read that it can be shown that for the composite trapezoid formula we have,

\int^b_af(x)dx = (c-a)\frac{f(a)+f(c)}{2}+(b-c)\frac{f(b)+f(c)}{2} + c_1h^2+c_2h^4+c_3h^6+\cdots.

The book I have does not show how it can be shown, it merely points out that it cannot be shown very easily..I will go with it and use that result for now.

I let (c-a)=(b-c)=\frac{(b-a)}{2}=\frac{h}{2} to get,

\int^b_af(x)dx = \frac{(b-a)}{4}[f(a)+2f(c)+f(b)] + c_1\frac{h^2}{4}+c_2\frac{h^4}{16}+\cdots

Here's the part that kind of confuses me. The trapezoid rule has local error O(h^3). I am then tempted to say that,

\int^b_a f(x)dx = (b-a)\frac{f(a)+f(b)}{2} + c_1h^2+c_2h^3+\cdots ,

but then I do not see how Richardson extrapolation can do any good...

If I instead use the global error, I can perform Richardson extrapolation and get,

\begin{aligned}<br />
4\int^b_af(x)dx &= h[f(a)+2f(c)+f(b)] + c_1h^2+c_2\frac{h^4}{4}+\cdots\\<br />
-\int^b_a f(x)dx &= -\frac{h}{2}[f(a)+f(b)] - c_1h^2-c_2h^3-\cdots\\<br />
\hline \\<br />
\int^b_a f(x)dx &= \frac{h}{3}[{f(a)+4f(c)+f(b)]+O(h^4)<br />

b) The global error is O(h^4).

Like usual, I write too much to say too little!