The methods of approximating an integral are divided into two categories:
1. Riemann sums, and
2. Newton-Cotes methods.
Riemann sums approximate an integral by summing the areas of adjacent rectangles, where the height of the rectangle depends on the value of function in that interval.
Newton-Cotes methods assume knowledge of integration of polynomials. These methods interpolate the function on each subinterval, and integrate this interpolating polynomial. The trapezoid rule approximates integrals using linear functions. Simpson's rule uses quadratic functions to approximate the expression.
>
|
|
>
|
|
In every case, an animation, in which each frame shows a refinement of the previous partition, can be returned.
>
|
|
An interesting variation begins with a random partition, and at each step, chooses a refinement that randomly divides the largest subinterval.
>
|
|
When using this method with a partition, note how the total area appears to converge to a value and then jumps to another.
>
|
|
You can also compute and visualize approximate integrals using the ApproximateIntTutor tutor.