$\newenvironment {prompt}{}{} \newcommand {\ungraded }[0]{} \newcommand {\bigmath }[1]{\displaystyle #1} \newcommand {\choicebreak }[0]{} \newcommand {\type }[0]{} \newcommand {\notes }[0]{} \newcommand {\keywords }[0]{} \newcommand {\offline }[0]{} \newcommand {\comments }[0]{\begin {feedback}} \newcommand {\multiplechoice }[0]{\begin {multipleChoice}} \newcommand {\HyperFirstAtBeginDocument }[0]{\AtBeginDocument }$

Various exercises relating to numerical integration.

Consider the definite integral $\displaystyle \int _{-1}^1 x^2\ dx$.
• The trapeziod rule with $n=4$ gives the approximation
• Simpson’s rule with $n=4$ gives the approximation
• The exact value of the integral is
When estimating the integral below using Simpson’s rule, what is the minimum number of intervals that would be required to guarantee that the approximation error does not exceed $2 \times 10^{-5}$? (Enter the smallest value which you know is correct.)
Find $n$ such that the error in approximating the given definite integral is less than $0.0001$ when using:
• The trapezoid rule: $n \geq \answer {\sqrt {\frac {10000 \pi ^3}{12}}} \approx 161.$ (Enter your answer as the exact result of your calculation; do not round or approximate.)
• Simpson’s rule: $n \geq \answer {\left (\frac {10000 \pi ^5}{180}\right )^{1/4}} \approx 12.$ (Enter your answer as the exact result of your calculation; do not round or approximate.)
How many equally spaced intervals $N$ are sufficient for the trapezoidal rule to estimate the value of the following integral with an error less than or equal to $10^{-6}$? (Enter the smallest value which you know is correct.)
The second derivative of the integrand is $(4x^2 + 2) e^{x^2 - 1}$. Since $-1 \leq x \leq 1$, it follows that
By the trapezoid rule error formula, the error $E$ satisfies where $N$ is the number of intervals.
To be sure the error is small enough, we need