Approximate integral via Midpoint Rule

277 Views Asked by At

A) Use the Midpoint Rule with $n=6$ to approximate the value of $$\int_0^1 e^{x^2}dx$$

B) Use the error estimate to find the smallest value of $n$ that can be chosen in order to guarantee that the midpoint rule $M_n$ approximates the integral in part A to within $10^{-5}$

Part A would be: $$\int_0^1 e^{x^2}dx \approx 0.1\bigg[e^{0.0025}+e^{0.0225}+e^{0.0625}+e^{0.1225}+e^{0.2025}+e^{0.3025}+e^{0.4225}+e^{0.5625}+e^{0.7225}+e^{0.9025}\bigg] \approx1.460393$$

But I am stuck on part B.

So far I have: $$|E_m|\leq \frac{K(b-a)^3}{24n^2}$$ $$f(x)\prime\prime = (4x^2+2)e^{x^2}$$ $$0 \leq x\leq 1$$ $$K = 6e$$ $$\frac{6e(1-0)^3}{24(10)^2}\approx 0.007$$

which would be the error estimate, however, I'm not sure how to do the rest of the question.

1

There are 1 best solutions below

0
On BEST ANSWER

You want to pick $n$ so that you can guaruntee that $|E_m|\leq 10^{-5}$. Since you already know that

$$|E_m|\leq \frac{K(b-a)^3}{24n^2}=\frac{6e(1-0)^3}{24n^2}=\frac{e}{4n^2}$$

if you make $n$ large enough, so that

$$\frac{e}{4n^2}\leq10^{-5}$$

then it will follow that

$$|E_m|\leq\frac{e}{4n^2}\leq10^{-5}.$$

Now, noting that $n$ is a positive integer:

\begin{align*} \frac{e}{4n^2}&\leq10^{-5} \\ \iff \frac{e}{4}\cdot10^5&\leq n^2 \\ \iff n&\geq \sqrt{\frac{e}{4}\cdot10^5} \\ &\approx 260.686\ldots \end{align*}

so if you choose $n$ to be at least $261$, then you can guaruntee that the error will be within $10^{-5}$ of the true value.