Chapter 7 Numerical Differentiation and Integration
INTRODUCTION DIFFERENTIATION USING DIFFERENCE OPREATORS DIFFERENTIATION USING INTERPOLATION RICHARDSON’S EXTRAPOLATION METHOD NUMERICAL INTEGRATION
NEWTON-COTES INTEGRATION FORMULAE THE TRAPEZOIDAL RULE ( COMPOSITE FORM ) SIMPSON’S RULES ROMBERG’S INTEGRATION DOUBLE INTEGRATION
Basic Issues in Integration What does an integral represent? = AREA = VOLUME
Basic definition of an integral:: = = sum of Height x Width
Objective: Evaluate I = without doing calculation analytically. When would we want to do this?
1. Integrand is too complicated to integrate analytically. 2. Integrand is not precisely defined by an equation,i.e., we are given a set of data (xi,ƒ(xi)), i=1,...,n. All methods are applicable to integrands that are functions. Some are applicable to tabulated values.
Key concepts: Integration is a summing process. Thus virtually all numerical approximations can be represented by I = =
where: x = weights xi = sampling points Et = truncation error 2. Closed & Open forms: Closed forms include the end points a & b in xi. Open forms do not.
NUMERICAL INTEGRATION Consider the definite integral
where f (x) is known either explicitly or is given as a table of values corresponding to some values of x, whether equispaced or not. Integration of such functions can be carried out using numerical techniques.
Of course, we assume that the function to be integrated is smooth and Riemann integrable in the interval of integration. In the following section, we shall develop Newton-Cotes
formulae based on interpolation which form the basis for trapezoidal rule and Simpson’s rule of numerical integration.
NEWTON-COTES INTERGRATION FORMULAE In this method, as in the case of numerical differentiation, we shall approximate the given tabulated function, by a polynomial Pn(x) and then integrate this polynomial.
Suppose, we are given the data (xi, yi), i = 0(1)n, at equispaced points with spacing h = xi+1 – xi, we can represent the polynomial by any standard interpolation polynomial. Suppose, we use Lagrangian approximation, then we have
with associated error given by
where and
Then, we obtain an equivalent integration formula to the definite integral in the form
where ck are the weighting coefficients given by
which are also called Cotes numbers which are also called Cotes numbers. Let the equispaced nodes are defined by
so that xk – x1 = ( k – 1)h etc. Now, we shall change the variable x to p such that, x = x0 + ph, then we can rewrite equations.
as
and
or
Also, noting that dx = h dp. The limits of the integral in Equation change from 0 to n and equation reduces to
The error in approximating the integral can be obtained from
Where x0 < ξ < xn. For illustration, consider the cases for n = 1, 2; For which we get
and
Thus, the integration formula is found to be
This equation represents the Trapezoidal rule in the interval [x0, x1] with error term. Geometrically, it represents an area between the curve y = f (x), the x-axis and the ordinates erected at x = x0 ( = a) and x = x1 as shown in the figure.
yn-1 y3 y2 y1 y0 yn xn = b xn-1 x3 x2 x1 x0 = a X O Y (x2, y2) (x1, y1) (x0, y0) y = f(x)
This area is approximated by the trapezium formed by replacing the curve with its secant line drawn between the end points (x0, y0) and (x1, y1).
For n =2, We have
and the error term is given by
Thus, for n = 2, the integration takes the form
This is known as Simpson’s 1/3 rule This is known as Simpson’s 1/3 rule. Geometrically, this equation represents the area between the curve y = f (x), the x-axis and the ordinates at x = x0 and x2 after replacing the arc of the curve between (x0, y0) and (x2, y2) by an arc of a quadratic polynomial as in the figure
xn = b xn-1 x3 x2 x1 x0 = a X O Y (x2, y2) (x0, y0) y2 y1 y0 y = f(x)
Thus Simpson’s 1/3 rule is based on fitting three points with a quadratic. Similarly, for n = 3, the integration is found to be
This is known as Simpson’s 3/8 rule, which is based on fitting four points by a cubic. Still higher order Newton-Cotes integration formulae can be derived for large values of n.
But for all practical purposes, Simpson’s 1/3 rule is found to be sufficiently accurate.