# Simpson's rule can solve cubics exactly

1. Feb 21, 2005

### zeta101

Simpson's rule can solve cubics exactly...(as well as quadratics which makes sense) the question is why? ive googled around and cant find an explanation, although it is just stated as being true.

Can someone offer and explanation or a website?

Thanks

2. Feb 21, 2005

### Hurkyl

Staff Emeritus
The most straightforward way to try and prove it would be to apply Simpson's rule to a generic cubic. (i.e. ax^3 + bx^2 + cx + d)

3. Feb 21, 2005

### zeta101

Could you tell me that if the integral is from x_0 to x_0 + 2h then can i set x_0 = 0 and it still be a proof (it's a lot simplier if i do)? or have i lost generality?

Thanks again!

4. Feb 21, 2005

### Hurkyl

Staff Emeritus
Instead of simply wondering if it's okay, you could try and prove it's okay. Can you find a way to convert the general problem into this form?

5. Feb 22, 2005

### zeta101

having thought about it this is the only thing i can think of:

$$int_{x_0}^{x_0+2h} -----> int_{x_0 -x_0}^{x_0+2h-x_0}$$

so, thats saying that the integral doesnt lose any generality by subtracting $$x_0$$ (a constant) from both the upper and lower limits (i dont know for certain i can do this, but it seems ok). So if it still stays general then setting $$x_0$$ to zero is also.

please tell me i am right :)

thanks for the guidance

Last edited: Feb 22, 2005
6. Feb 23, 2005

### Damned charming :)

You only need to prove that appling simpsons rule to x^3 gives the same answer as integration.

Thi
It should be clear that if simpsons works for both polynomials p(x) and q(x) then it works for p(x)+ q(x). Because int (p(x)+q(x)) = int(p(x)) + int(q(x))
and the same rule applies to Simpsons rule since using simpsons rule on the function p(x) +q(x) gives area =( b-a)/6*( p(a)+ q(a) +
4*(p(a+b)/2)+ q((a+b)/2) + p(b) + q(b)).