Notation: Equation numbers are placed in parentheses, (Eq. 1), at the end of the sentence preceding the mathematical presentation of the equation. They should not be read as if they are part of the sentence. When reference is made to an equation, the word "equation" will be spelled out and not abbreviated. Mathematical and Greek symbols are not in all cases precise, since they may depend on the browser used. Since we lack a font for a definite integral, we will use the following symbol aIb .
Computing An Integral
Numerical integration is the process of computing the value of a definite integral from a set of numerical values of the integrand. The problem of numerical integration can be solved by representing the integrand by an interpolation formula over the appropriate interval, say x = a < x = b, and then integrating this formula between the desired limits of a and b. In this way we can derive quadrature formulas for the approximate integration of any function for which numerical values are known.
Let us formulate the basic problem as follows. Consider n sub-intervals defined by equidistant values of the independent variable, such that (Eq. 1)
where n = ( b - a ) / h, and h = Dx = ( xi+1 - xi ) . We will use the following notation to represent the discrete values of the function to be integrated fi = f(xi).
Since the definite integral with limits a < b can be broken into sub-intervals as (Eq. 2)
it is sufficient for us to derive a formula for the interval xi to xi+1 or that is from 0 to h.
The Trapezoidal Rule
The simplest of all interpolation formula approximating the integrand between xi and xi+1, which is equal to 0 to h, is to assume a straight line connecting fi and fi+1. This technique is known as the trapezoidal rule. The equation of a straight line determined by the points ( xi, fi ) and ( xi+1, fi+1 ) is
This equation can be integrated between the limits xi and xi+1 to obtain the approximation for the definite integral (Eq. 3)
Over the interval from -h to +h, the approximation for the definite integral is (Eq. 4)
Finally, we can integrate over the n sub-intervals to obtain the following approximation for the definite integral (Eq. 5)
Simpson's Rule
A better approximation to the function over the interval is to replace the function by the n/2 arcs of a second-degree polynomial, that is a parabola with a vertical axis.
Additional Integration Techniques