How large should $n$ be to guarantee that the Simpson's Rule approximation on $\int_0^1 9e^{x^2} dx$ is accurate to within $0.0001$?

509 Views Asked by At

Please help I am really struggling with this problem. I have been working on it and trying to look up how to do it but nothing is making sense.

Thank you!

1

There are 1 best solutions below

0
On

Hint: Apply the formula for upper bound of error of Composite Simpson's rule approximation $$\frac {h^{4}}{180}(b-a)\max _{\xi \in [a,b]} \left| f^{(4)}(\xi ) \right| $$ with $a = 0$, $b = 1$, $h = (b-a)/n = 1/n$ and $f(x) = 9e^{x^2}$.

Calculate the fourth derivative of $f(x)$: \begin{align} f(x) &= 9e^{x^2} \\ f'(x) &= 9e^{x^2} (2x) = 18xe^{x^2} \\ f''(x) &= 18e^{x^2} (1+x(2x)) \\ &= 18e^{x^2} (1+2x^2) \\ f^{(3)}(x) &= 18e^{x^2} (4x+(1+2x^2)(2x)) \\ &= 36e^{x^2}(2x^3+3x) \\ f^{(4)}(x) &= 36e^{x^2}((6x^2+3) + (2x^3+3x)(2x)) \\ &= 36e^{x^2}(4x^4 + 12x^2 + 3) \end{align} Since $f^{(4)}$ is increasing on $x\ge0$, $$\max _{\xi \in [0,1]} \left| f^{(4)}(\xi ) \right| = f^{(4)}(1) = 36e(4+12+3) = 684e.$$ If we want the error bound to be $10^{-4}$, we need \begin{align}\frac{h^4}{180} \; 684e &\le \frac{1}{10^{4}} \\ n^4 &\ge 38000e \\ n&\ge \sqrt[4]{38000e} \end{align}