## Summary of Numerical Integration

### Essential Concepts

• We can use numerical integration to estimate the values of definite integrals when a closed form of the integral is difficult to find or when an approximate value only of the definite integral is needed.
• The most commonly used techniques for numerical integration are the midpoint rule, trapezoidal rule, and Simpson’s rule.
• The midpoint rule approximates the definite integral using rectangular regions whereas the trapezoidal rule approximates the definite integral using trapezoidal approximations.
• Simpson’s rule approximates the definite integral by first approximating the original function using piecewise quadratic functions.

## Key Equations

• Midpoint rule
${M}_{n}=\displaystyle\sum _{i=1}^{n}f\left({m}_{i}\right)\Delta x$
• Trapezoidal rule
${T}_{n}=\frac{1}{2}\Delta x\left(f\left({x}_{0}\right)+2f\left({x}_{1}\right)+2f\left({x}_{2}\right)+\cdots +2f\left({x}_{n - 1}\right)+f\left({x}_{n}\right)\right)$
• Simpson’s rule
${S}_{n}=\frac{\Delta x}{3}\left(f\left({x}_{0}\right)+4f\left({x}_{1}\right)+2f\left({x}_{2}\right)+4f\left({x}_{3}\right)+2f\left({x}_{4}\right)+4f\left({x}_{5}\right)+\cdots +2f\left({x}_{n - 2}\right)+4f\left({x}_{n - 1}\right)+f\left({x}_{n}\right)\right)$
• Error bound for midpoint rule
$\text{Error in }{M}_{n}\le \frac{M{\left(b-a\right)}^{3}}{24{n}^{2}}$
• Error bound for trapezoidal rule
$\text{Error in }{T}_{n}\le \frac{M{\left(b-a\right)}^{3}}{12{n}^{2}}$
• Error bound for Simpson’s rule
$\text{Error in }{S}_{n}\le \frac{M{\left(b-a\right)}^{5}}{180{n}^{4}}$

## Glossary

absolute error
if $B$ is an estimate of some quantity having an actual value of $A$, then the absolute error is given by $|A-B|$
midpoint rule
a rule that uses a Riemann sum of the form ${M}_{n}=\displaystyle\sum _{i=1}^{n}f\left({m}_{i}\right)\Delta x$, where ${m}_{i}$ is the midpoint of the ith subinterval to approximate ${\displaystyle\int }_{a}^{b}f\left(x\right)dx$
numerical integration
the variety of numerical methods used to estimate the value of a definite integral, including the midpoint rule, trapezoidal rule, and Simpson’s rule
relative error
error as a percentage of the absolute value, given by $|\frac{A-B}{A}|=|\frac{A-B}{A}|\cdot 100\text{%}$
Simpson’s rule
a rule that approximates ${\displaystyle\int }_{a}^{b}f\left(x\right)dx$ using the integrals of a piecewise quadratic function. The approximation ${S}_{n}$ to ${\displaystyle\int }_{a}^{b}f\left(x\right)dx$ is given by ${S}_{n}=\frac{\Delta x}{3}\left(\begin{array}{c}f\left({x}_{0}\right)+4f\left({x}_{1}\right)+2f\left({x}_{2}\right)+4f\left({x}_{3}\right)+2f\left({x}_{4}\right)+4f\left({x}_{5}\right)\\ +\cdots +2f\left({x}_{n - 2}\right)+4f\left({x}_{n - 1}\right)+f\left({x}_{n}\right)\end{array}\right)$ trapezoidal rule a rule that approximates ${\displaystyle\int }_{a}^{b}f\left(x\right)dx$ using trapezoids