Simple integration methods

Trapezoidal rule

Obtained via a straight line interpolation between each two points on the grid.

       

       

 

Simpson rule

Obtained via a parabolic interpolation between each three points on the grid.

Here is a Maple derivation of the formula.

       

       

Order of the Methods

The order of a numerical scheme is a measure of the accuracy of the method as a function of the lattice spacing. Higher order schemes generally require fewer grid points to achieve a given accuracy, but often require more function evaluations per grid point. This is illustrated here for the simple integration schemes.

Exercise: Use the Trapezoidal and Simpson rules to integrate a known function over an easy domain, i.e., sin(x) over half the period, and calculate the error when compared to the exact answer. Plot this error versus the lattice spacing. Deduce the order of the methods.

The order of a method can often be established analytically as well. This is done for the Trapezoidal rule, trapezoidal_error.mw, and the Simpson rule, Simpson_error.mw, using Taylor series expansions.