How large should $n$ be to guarantee that the Simpson's Rule of approximation on integral is accurate to an error within $0.00001$?

1.3k Views Asked by At

As the title says: How large should $n$ be to guarantee that the Simpson's Rule of approximation on the integral $\int_{1}^{2} e^{\frac{1}{x}}dx$ is accurate to an error within $0.00001$?

2

There are 2 best solutions below

0
On BEST ANSWER

The error committed by Simpson's approximation is bounded by $$\frac{(b-a)^5}{180\cdot n^4}\max_{\xi \in[a,b]} |f^{(4)}(\xi)|,$$

where $[b,a]$ is the interval and $f^{(4)}(\xi)$ is the fourth derivative of the function which integral is approximated taken at some value $\xi\in[a,b]$.

Now, $$f^{(4)}(x)=\frac{\mathrm{d^4}}{\mathrm{d}x^4}e^{1/x}=e^{1/x}\left(\frac{1+12x(1+x)(1+2x)}{x^8}\right).$$

It should be clear that this function will attain its maximum at the lowest possible value of $x$, which is $x=1$, which evaluates to $73e$.

So inserting all known values, we have

$$\frac{73e}{180n^4}\leq 0.00001 \implies n\geq 20,$$

as $n$ must be even.

2
On

EDIT: Remember, $n$ must be even, so $n=19$ won't work.


The answer is $n = 20$

Straight from the Wikipedia article:

The error committed by the composite Simpson's rule is bounded (in absolute value) by $$\frac{h^4}{180}(b-a)\cdot \max_{x\in[a,b]}|f^{(4)}(x)|$$

Here, $a = 1, b = 2$, and $h = (b - a)/n$, and we can find that $\max_{x\in[a,b]}|f^{(4)}(x)| = 73e$. Therefore, we want to solve the inequality:

$$\frac{73\cdot e}{180\cdot n^4} \leq 10^{-5}$$

Which is true when $n \geq 18.221...$