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,

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

$\displaystyle |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 $\displaystyle -h,0,h$, they use $\displaystyle a,\frac{a+b}{2},b$ to get,

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

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

$\displaystyle |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 $\displaystyle -h,0,h$, they use $\displaystyle a,\frac{a+b}{2},b$ to get,

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

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

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

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

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

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

I will stop talking to my self now.