# Thread: Estimating an integral within a given tolerance (Simpson's)

1. ## Estimating an integral within a given tolerance (Simpson's)

My question is really just a clarification. When using the Simpson's error equation to determine the value of n needed to produce a certain level of accuracy, you take the maximum absolute value, right? So for instance, that means that for this problem:

$\int_{-1}^{2}\sqrt{1 + x^{2}}$

with

$f^{4}(x) = 3(4x^{2} - 1)(x^{2} + 1)^{-7/2}$

the maximum value of $|f^{4}(x)|$ on [-1,2] is the minimum of the function $f^{4}(x)$ on that interval, $f^{4}(x) = - 3$ at x = 0. So for

$|E_{n}|\leq \frac{(b-a)^{5}}{180n^{4}}K$

you use K = 3, right? Or do you use the actual maximum itself? (In the example, about $f^{4}(x)= 0.8463$ at x = 0.866 or -0.886.) Thanks for the help!

2. remember K is the maximum of the absolute value of f^4(x)

So you are correct here you use 3.

3. Since you only want " $|E_n|<$" you could use the "actual maximum" itself or any number larger than that.

4. Originally Posted by Calculus26
remember K is the maximum of the absolute value of f^4(x)

So you are correct here you use 3.

Originally Posted by HallsofIvy
Since you only want " $|E_n|<$" you could use the "actual maximum" itself or any number larger than that.
Ok, I am a little confused -- do I need to use 3 or just any number greater than or equal to 0.8463? Does it not matter which?

5. You need to use 3 or any number greater than 3 -- the max of |f^4(x)|

6. Originally Posted by Calculus26
You need to use 3 or any number greater than 3 -- the max of |f^4(x)|
Thanks very much for the help! Now I know.

7. You may wonder why if you know the max is 3 why use a bigger number?

Since we are no longer in the middle ages typically we can graph

|f^4(x)| and with out zooming and tracing we can simply pick an obvious upper bound so that we don't need the exact max.

For eg with Mathcad once we define f(x) we don't even need to calculate

f^4(x) we simply plot |f^4(x)| and pick an obvious upper bound.

In the old days when processors were run by gerbels we were more concerned with n being as small as possible and so we spent more time
trying to find the smallest n instead of any n which would give us the desired accuracy