# Simpson's Rule

1. Oct 10, 2007

### Lanza52

Let a0, a1, a2, a3 be arbitrary real numbers, and let

f(x) = a0 + a1*x + a2*x^2 + a3*x^3

Show that the approximating the integral $$\int f(x)dx$$[/tex] ( Couldn't figure out the bounds using latex but the integral is from pi to 42) with Simpson's rule yields the exact value of this integral.

My initial thought was to go to the error bound.
k > or = f''''(x) ......so k > or = to 0

And since K is a coefficient in the numerator the error is 0.

But that seems way too easy. My professor likes giving 10 hour take home tests, so I can't be right.

So, what did I miss? Or by some odd chance am I right?

2. Oct 10, 2007

### Hurkyl

Staff Emeritus
You certainly seem to have a good idea. But...

I don't understand what you are saying; the only reason I can follow this is because I (think I) know what you're trying to say. (for example, you suddenly started using the symbols k and K without ever defining them!)

Try thinking this bit through a little more carefully.

3. Oct 10, 2007

### Lanza52

Oh, sorry, forgot to say the formula.

Error bound formula for Simpson's rule

(Amount of error) < or = (k(b-a)^5) / (180n^4)

the fourth derivative of f(x) < or = to k for a < or = x < or = b

and since f(x) is a 3rd degree polynomial, it gets reduced to 0 at the fourth derivative.

And that makes k = 0 and so the error is 0.

4. Oct 10, 2007

### Hurkyl

Staff Emeritus
If all you know is:
(1) $f^{(4)}(x) = 0$,
(2) $f^{(4)}(x) \leq k \quad (\text{for\ } x \in [a, b])$,
then all you can do is conclude that k is nonnegative.

Fortunately, you know more than this.

(Wait, where did a and b come from? I suppose that you meant for them to be the bounds on your integral, although you never said so)

Last edited: Oct 10, 2007
5. Oct 10, 2007

### Lanza52

lol yea, sorry a and b are the bounds. Keep forgetting that I'm not talking to somebody who is looking at the same textbook and formula as me.

Anyways. The bounds being pi and 42.

I'm not sure but I think the formula works like this:

First find the formula for k
k > or = f '''' (x) = 0

If there was an x derived from that 4th derivative then you would plug in this.
pi < or = x < or = 42.

But since there is no x then the k is just 0

6. Oct 28, 2011

### evangoor

The definition of k given here is a little lax. k= the largest value of the absolute value of the fourth derivative over the given interval. For this example f''''(x)=0 on the interval of [Pi,42] thus k=0. Fortunately for us, for any polynomial of degree 3 or less the fourth derivative is 0 for all real values of x. Therefore, we can assume that simpson's rule will yield an exact answer for those polynomials.

7. Oct 28, 2011

### Ray Vickson

A MUCH easier way is to note that we can look at 3-point cases sequentially (that's how the Simpson formula is obtained for an arbitrary odd number n >= 3 of points); furthermore, we can assume the three points are x1 = -1, x2 = 0 and x3 = 1 (by shifting and scaling if necessary). For these three points we have Simpson(f) = (1/3)*[f(-1)+4f(0)+f(1)]. Now for odd n, x^n is odd and so int{x^n dx, x=-1..1) = 0, and Simpson(x^n) = 0; thus, Simpson is exact for x^n, n odd (i.e., for x, x^3, x^5,... ). Now look at f0(x) = 1 and f2(x) = x^2. We can easily compute int(f(x), x=-1..1) for f = f0 and f = f2, and can compute Simpson(f) for f = f0 and f = f2. We see that Simpson(f) = integral(f) for these two f; thus, Simpson(f) = integral(f) for any cubic polynomial f.

RGV

8. Nov 6, 2011

### polarbear2007

i had the same "problem" with my problem