# Math Help - Deriving Simpson's Rule

1. ## Deriving Simpson's Rule

To derive Simpson's Rule and it's error, we can integrate a 2nd degree Lagrange polynomial. To make the process less laborious, we can integrate over the interval [-h,h] using the points (-h,f(-h)), (0,f(0)), (h,f(h)). We end up with,

\begin{aligned} \int^h_{-h}p_2(x)dx = \frac{h}{3}\bigg(f(-h) + 4f(0) + f(h)\bigg) &+& \\
\cdots &+& \int^h_{-h}\frac{f^{(3)}(\xi)}{6}x(x+h)(x-h)dx,
\end{aligned}

where $p_2(x)$ denotes the second degree Lagrange polynomial. If I now wish to bound the error I can let $M=\max_{x\in [a,b]}|f^{(3)}(x)|$ and call the error $E_2(f)$ such that,

$|E_2(f)| \leq \frac{M}{6}\int^h_{-h}|x(x+h)(x-h)|dx.$

The integral however, is zero and so I end up with a useless error bound. In one of my books they state a similar thing, but instead of using $-h,0,h$, they use $a,\frac{a+b}{2},b$ to get,

$|E_2(f)| \leq \frac{M}{6}\int^b_{a}|(x-a)(x-\frac{a+b}{2})(x-b)|dx.$

I've tried plugging the integral into wolframalpha and get zero here as well. The book though ends up with,

$|E_2(f)| \leq \frac{(b-a)^4}{196}M$.

Am I doing something wrong here? Are there easier ways of deriving Simpson's along with the error term?Any comments are highly appreciated! Thanks.

2. A gentle bumb. I have yet to figure this one out.

3. Originally Posted by Mollier

$|E_2(f)| \leq \frac{M}{6}\int^h_{-h}|x(x+h)(x-h)|dx.$

The integral however, is zero and so I end up with a useless error bound. In one of my books they state a similar thing, but instead of using $-h,0,h$, they use $a,\frac{a+b}{2},b$ to get,

$|E_2(f)| \leq \frac{M}{6}\int^b_{a}|(x-a)(x-\frac{a+b}{2})(x-b)|dx.$

I've tried plugging the integral into wolframalpha and get zero here as well. The book though ends up with,

$|E_2(f)| \leq \frac{(b-a)^4}{196}M$.

Am I doing something wrong here? Are there easier ways of deriving Simpson's along with the error term?Any comments are highly appreciated! Thanks.
Man oh man, I've totally ignored the absoulte-value sign. The integral is of course not zero!

$|E_2(f)| \leq \frac{M}{6}\int^h_{-h}|x(x+h)(x-h)|dx = \frac{M}{6}\frac{h^4}{2}.$ .

Since $h = \frac{b-a}{2}$ then $\frac{h^4}{2}= \frac{(b-a)^4}{32}$, and so,

$|E_2(f)| \leq \frac{M}{192}h^4$ .

The book gets $\frac{1}{196}$, but that just might be a typo

I will stop talking to my self now.