Asymptotic error formula for the trapezoidal rule

In summary, the conversation revolves around using the asymptotic error formula for the trapezoidal rule to estimate the number of subdivisions needed to evaluate a given integral to a desired accuracy. The approximate integral is then found using this value of n. The conversation ends with a clear explanation of the steps involved and the final answer.
  • #1
kalish1
99
0
I need to use the asymptotic error formula for the trapezoidal rule to estimate the number n of subdivisions to evaluate $\int_{0}^{2}e^{-x^2}dx$ to the accuracy $\epsilon=10^{-10}$. I also need to find the approximate integral in this case. I would like to know if my attempt is correct. Thanks in advance for any help.

**My attempt:** $E_n^T(f)\approx -h^2/12[f'(b)-f'(a)]. f(x)=e^{-x^2}, f'(x)=-2xe^{-x^2}.$

So $E_n^T(f)\approx h^2/(4e^4)$ and since $h=1/n$, we have to find an n that satisfies the inequality $\frac{1}{4e^4n^2}\leq 10^{-10}$. We obtain $n \approx 6767$. The approximate integral is ??
 
Mathematics news on Phys.org
  • #2
Hmm. I don't quite get what you get. I have
\begin{align*}
E_{N}(f)& \approx - \frac{(b-a)^{2}}{12 N^{2}}[f'(b)-f'(a)] \\
&= \frac{2^{2}}{12 N^{2}}[4e^{-4}-0] \\
&= \frac{4}{3 N^{2}e^{4}}.
\end{align*}
Hence, we need
$$ \frac{4}{3 N^{2}e^{4}} \le 10^{-10},$$
or
$$N \ge \frac{2 \cdot 10^{5}}{ \sqrt{3} \, e^{2}} \approx 15627.2,$$
so let $N=15628$. You must set up a trapezoidal scheme with this many sub-intervals, and evaluate. You're going to have:
$$A \approx \frac{2-0}{2 \cdot 15628} \sum_{j=0}^{15627}[f(x_{j})+f(x_{j+1})]
=\frac{1}{15628} \sum_{j=0}^{15627}[e^{-(2j/15628)^{2}}+e^{-(2(j+1)/15628)^{2}}]$$
$$=\frac{1}{15628} \sum_{j=0}^{15627}[e^{-(j/7814)^{2}}+e^{-((j+1)/7814)^{2}}].$$
 
  • #3
Great! CCC. (Crystal clear clarification.)
 

FAQ: Asymptotic error formula for the trapezoidal rule

What is the asymptotic error formula for the trapezoidal rule?

The asymptotic error formula for the trapezoidal rule is given by E = - \frac{h^2}{12}f''(\xi), where h is the step size and f''(\xi) is the second derivative of the function being integrated.

How is the asymptotic error formula derived for the trapezoidal rule?

The asymptotic error formula is derived by Taylor expanding the integrand around the midpoint of each interval and then using the midpoint rule to approximate the integral. By taking the difference between the exact integral and the approximation, the error formula can be obtained.

What is the significance of the asymptotic error formula for the trapezoidal rule?

The asymptotic error formula allows us to estimate the error of the trapezoidal rule for a given function and step size. This can help in determining the appropriate step size for a desired level of accuracy, as well as comparing the efficiency of the trapezoidal rule to other numerical integration methods.

Does the asymptotic error formula apply to all functions?

No, the asymptotic error formula only applies to smooth, continuous functions with a well-behaved second derivative. In cases where the second derivative is not well-behaved, the error may not follow the formula and may need to be estimated through other means.

Can the asymptotic error formula be extended to higher order integration methods?

Yes, the asymptotic error formula can be extended to higher order integration methods such as Simpson's rule. However, the formula will have a different coefficient depending on the order of the method.

Similar threads

Replies
3
Views
1K
Replies
2
Views
1K
Replies
38
Views
11K
Replies
1
Views
2K
Replies
4
Views
936
Back
Top