Trapezoid Rule - Number of Points

497 Views Asked by At

How many points should we use in the trapezoid rule in computing an approximate value of $\int_{0}^{1} e^{x^2} dx$ if the answer is to be within $10^{-6}$ of the correct value?

I'm looking at the basic trapezoid rule and I don't see anywhere in the formula where it takes in different number of points.

1

There are 1 best solutions below

5
On BEST ANSWER

You know that the error is lower than $$ \sup_{[0,1]}|f''| /12n^2 $$with $n$ points. Now just compute the derivative.

You find that $\sup_{[0,1]}|f''| = \sup_{[0,1]} (2+4x^2)e^{x^2}=6e$ and then $$ \sup_{[0,1]}|f''| /12n^2 < \epsilon \iff n > \sqrt\frac e{2\epsilon}\simeq 10^3 $$