Suppose we wish to estimate
to an accuracy of 0.00001. In this problem, well work through that process for several choices of summation procedure. For the the computations, feel free to use code in our Basic Integration notebook.
Left sum
- Find a value n large enough so that the corresponding left hand sum is within our desired accuracy level.
- Type out the resulting sum in mathematical notation.
- Evaluate the resulting sum in Python.
Trapezoidal sum
- Find a value n large enough so that the corresponding Trapezoidal sum is within our desired accuracy level.
- Type out the resulting sum in mathematical notation.
- Evaluate the resulting sum in Python.
Simpson’s rule
- Find a value n large enough so that the corresponding sum provided by Simpson’s rule is within our desired accuracy level.
- Type out the resulting sum in mathematical notation.
- Evaluate the resulting sum in Python.
Gaussian Quadrature
Approximate the integral using 3-point Gaussian quadrature.
SciPy
For crying out loud, just compute the integral already using scipy.integrate.quad
.