"); hg.document.close(); } function tipclose(){ hg.window.close(); }
NUMERICAL INTEGRATION


b
Numerical Integration is nothing but finding an approximate value to  I =
ò f(x) dx
a

There are two different statergies to develop numerical integration formulae. One is similar to what we have adopted to numerical differentiation. That is, we approximate a polynomial for the given function and integrate that polynomial with in the limits of the integration. This restricts us to integrate a function known at discrete tabular points. If these points are uniformly spaced then the corresponding integration formulae are called as Newton - Cotes formulae for numerical integration. On the other hand if we know the function explicitly but could not integrate in the usual means because of the nature of the function then we can use the concept called quadrature rule to find an approximate value to the integration.
In this method the function is evalualted at some predetermined abscissa (nodal) points and then these values are added after multiplying them with some weights which are again predeternmined, to find an approximate value to the given integral.
Newton - Cotes formulae : If the function values are known at uniformly spaced-points then as we have already discussed in the chapter intepolation we can find a polynomial of degree n for the given (n+1) data-points, which approximates the function at non tabular points and passes through the tabular points. However, if the degree of this polynomial is too high then the approximated integral value is prone to large errors due to round-off and local irregularities present in the function.

To avoid these large errors, the interval of integration is divided into sub intervals and a polynomial of a lower degree is obtained in these sub intervals and integrated in the end points of the subinterval. Then the required result can be obtained by adding these values obtained in each of these sub intervals. In the following discussion let us consider three widly used Newton-Cotes formulae obtained from polynomials of degree one, two and three, to approximate I.

Case (i)Trapezoidal Formula
Approximation with a linear polynomial :
Let the function f(x) is known at uniformly spaced descrete points x0, x1, . . ., xn as f0, f1, . . ., fn.
Consider the integral 
x1   x1
ò f(x) dx
 = 
ò P1(x) dx
x0   x0

 
  x1
 = 
ò (f0 + r D f0)dx
  x0
(by Newton's forward difference formula)

 
     where   r = 
x - x0
 = 
x - x0
    &
Df0 = f1 - f0   first forward difference of   f0
x1 - x0
h
Consider
                                                                  x1   1
                                                 ò f(x) dx
 = h 
ò(f0 + r Df0)dr
                                                                x0   0
 
 
 = h 
(f0 + 1/2 Df0)
 
 
 
 = h/2
(f0 + f1)
 
Then 
xn x1 x2 xn
                               I = ò f(x) dx =  ò + ò  + . . . + ò f(x) dx 
x0 x0 x1 xn-1

                                 = h/2 (f0 + f1) + h/2 (f1 + f2) + . . . + h/2 (fn-1 + fn)

                                = h/2 (f0 + 2(f1+ f2+ . . . + fn-1 )+ fn)
 

error in the interval (x0, x1
x1
                           =  ò
r(r - 1)
 h2 f ''(x1)dx
for some x0 < x < xn
2!
x0

 
1
 = h3 f ''(x1)
ò
r2 - r
 dr  
2
0

 
 = - 1/12 h3 f ''(x1)
   
 

 
Total error = - 1/12 h3( f ''(x1) + f ''(x2) + . . . + f ''(xn))
   
 
where xi-1 < xi < xi for i = 1, 2, . . ., n
If f(x) is continuous then there exists some x Î(x0, xn) such that f ''(x1) + f ''(x2) + . . . + f''(xn) is equal to nf ''(x)
ÞTotal error =  - 1/12 h3 n f ''(x)
- (b-a)/12 h2 n f ''(x)   (... b-a = nh)
Geometrical Interpretation :
Since f(x) is approximated with a first degree polynomial in each sub interval (xi+1, xi), the integration of f(x) between xi+1and xi is knothing but the area of the  Trapezoid bounded by x axis, f(xi-1), f(xi) and the straight line joining the points (xi-1, f(xi-1)) and (xi, f(xi)). That is
xi  
ò f(x) dx
 = 
Area of the rectangle with base h and height 1/2(f(xi-1) + f(xi))
xi-1  
= h/2 ( fi-1 + fi )
is called the Trapezoidal area.
 
xn
Now  I =
ò f(x) dx  is equal to the such trapezoidal areas obtained in each subinterval of (x0, xn) and hence
x0
 
xn
the formula ò f(x) dx = h/2 ( f0 + f1 + . . .  + fn ) is called the Trapezoidal formula.
x0
Case(ii)

Approximation with a second degree polynomial

Consider
 
x2   x2
ò f(x) dx
 = 
ò P2(x) dx
x0   x0
x2
 = 
ò( f0 + r D f0
r(r - 1)
 D2 f0 )dx  
2!
x0

 
2
 = h 
ò( f0 + r D f0
r2 - r
 D2 f0 )dx  
2
0
 = h 
( 2f0 + 2D f0
1
 D2 f0 )dx  
2
 = 
h
( f0 + 4f1 + f2 )    
3

since Df0 = f1 - f0      D2f0 = f2 - 2f1 - f0
xn x2 xn
Now  I = 
ò f(x) dx =  ò f(x) dx  + . . . + ò f(x) dx 
x0 x0 xn-2
 = 
h
( f0 + 4f1 + f2 )  + . . . +
h
 ( fn-2 + 4fn-1 + fn )
3
3
 = 
h
( f0 + 4f1 + 2f  + . . . +  2fn-2 + 4fn-1 + fn )
3

This formula is called Simpson's formula. In this rule since in each sub interval we need three nodal points, the total number of tabulted points has to be odd.
 
x2
error in(x0, x2) =  ò
r(r - 1)(r - 2)(r - 3)
 h4 f iv(x1)dx
for some x0 < x1 < x2
4!
x0

 
 = - 1/90 h5 f iv(x1)
   
 

 
Total error = - 1/90 h5 ( f iv(x1) + f iv(x2) + . . . + f iv(xn))
   
 

 
 = - (b-a)/90 h4f iv(x)
 
 for some x0 < x < xn
 

Case(iii)

Approximation with a third degree polynomial

Consider
 
x3   x3
ò f(x) dx
 = 
ò P3(x) dx
x0   x0
x3
 = 
ò( f0 + r D f0
r(r - 1)
 D2 f0 + r(r - 1)(r - 2)  D3 f0 ) dx
2!
3!
x0

 
 = 
3h
( f0 + 3f1 + 3f2 + f3 )  
8
 = 
3h
( f0 + 3f1 + 3f  + . . . +  2fn-3 + 3fn-2 + 3fn-1 +  fn )
8

is called Simpson's 3/8 formula .
the no. of data points needed for this rule are 3n+1 for any n > 0.
 
 
x3
error in(x0, x3) =  ò
r(r - 1)(r - 2)(r - 3)
 h4 f iv(x1)dx
for some x0 < x1 < x3
4!
x0

 
 = - 3/80 h5 f iv(x1)
   
 

and the total error is
 
 = - 3(b-a)/80 h4f iv(x)
 
 for some x0 < x < xn
 

observe here that the order of the error in both Siompson's one third rule and three eighth rule is four (O(h4)). Moreover the coefficient in one third rule (-1/90) is less then the corresponding three eighth rule (-3/80) hence Simpson's 1/3 rule performs better than the Simpson's 3/8 rule. In fact this phenomina is true for all even-order Newton-cotes formulae. Hence Newton-cotes even order formulae are more useful than odd order formulae.


 


Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting
Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations
Numerical Solution of Partial Differential Equations