Next:Difference Notations Up:Main Previous: Numerical Differentiation

# 7. Numerical Integration:

The problem of numerical integration is that of determining an approximate value of the integral

If is the interpolating polynomial of degree n which approximate on then for the error

we have the following theorem:
Theorem: Let be points on the interval . Let be the corresponding values of at . Let be the polynomial of degree n which interpolates at the n+1 points Then if

Ψ(x)=(x-x0)(x-x1).....(x-xn)

does not change sign on the interval , the error of numerical integration is given by

,

for some point in .
Proof: We have from the error formula for the interpolating polynomial

Integrating, we get

If does not change sign on the interval , then we can apply the second mean value theorem of integral calculus, we obtain the desired result. Let us assume that the function can be computed at a set of n+1 equally spaced points . Then can be approximated by the Newton forward difference interpolating polynomial

where . Thus we have

Let us take n=0, we get

This is known as rectangular rule and we denote it as

The error of this approximation is

To find the integral of f(x) over an extended interval we subdivide , into N equal subdivision, setting . Now

Applying the above formula to each integral yields the rectangular rule for the integral of over an interval :

and the error is given by

and if is continuous over , then

A more accurate formula can be obtained by taking n=1, and we find that

which is known as Trapezoidal rule denoted by

with the error given by

To obtain the integral over the interval , we subdivide into N equal parts and use the above formula to each integral, this yields

The error of this formula is given by

Simpson's Rule
We integrate over the double interval of width and get

By direct integration, we find that

If we retain difference through the third order, we obtain an approximation

This formula is called Simpson's rule.
The error of this formula is given by

To extend Simpson's rule for integration over an interval , we now divide into an even number 2N of sub intervals of width h so that

and

Using Simpson's rule over the interval ,we have

If we now sum over the N subgroups of two intervals each, we obtain

and thus Simpson's rule for integration over an interval which has been subdivided into 2N subintervals of length h is

and since , the error term is

Next: Difference Notations Up: Main Previous: Numerical Differentiation