# Simpsons rule error bound.

1. May 22, 2013

### SherlockOhms

1. The problem statement, all variables and given/known data
Calculate the value of n so that the approximation is within 0.0001. b = 2, a = 1. f(x) = 1/x.

2. Relevant equations
f4(x) = 24/x^5 (Think this is correct)
Error <= (b-a)^5/180n^4(MAXx [a,b](f4(x))

3. The attempt at a solution
Well, 24/x^5 obtains it's max at x =1. Thus (MAXx [a,b](f4(x)) = 24.
I subbed in all the given values and keep getting 6 as my answer. The correct answer is 8 though. Could somebody point out where I'm going wrong?

2. May 22, 2013

### Staff: Mentor

What you wrote is ambiguous.
Is it ((b - a)5/180) * n4 or
(b - a)5/(180 * n4)?

3. May 22, 2013

### SherlockOhms

Apologies! It's (b-a)^5/(180*n^4).

4. May 22, 2013

### Staff: Mentor

I get 6 as well. Is 8 the answer in the back of the book? It's possible they have the wrong answer.

One way to check is to do Simpson's with n = 6, and compare the answer you get with the integral itself,
$$\int_1^2 \frac{dx}{x} = ln(2) \approx. .69315$$

You should have agreement in either 2 or 3 decimal places.

5. May 22, 2013

### SherlockOhms

Thanks for this too. There's most likely a mistake alright. I'll be sure to double check it in the morning though.