Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(Darren Dugan) #1

27.4 NUMERICAL INTEGRATION


so, providedg(x) is a reasonably smooth function, the approximation is a good


one.


Taking 3-point integration as an example, the threexiare the zeros ofP 3 (x)=
1
2 (5x

(^3) − 3 x), namely 0 and± 0 .774 60, and the corresponding weights are
2
1 ×
(
−^32
) 2 =
8
9
and
2
(1− 0 .6)×
( 6
2
) 2 =
5
9
.
Table 27.8 gives the integration points (in the range− 1 ≤xi≤1) and the
corresponding weightswifor a selection ofn-point Gauss–Legendre schemes.
Using a 3 -point formula in each case, evaluate the integral


I=


∫ 1


0

1


1+x^2

dx,

(i)using the trapezium rule,(ii)using Simpson’s rule,(iii)using Gaussian integration. Also
evaluate the integral analytically and compare the results.

(i) Using the trapezium rule, we obtain

I=^12 ×^12

[


f(0) + 2f

( 1


2

)


+f(1)

]


=^14


[


1+^85 +^12


]


=0. 7750.


(ii) Using Simpson’s rule, we obtain

I=^13 ×^12

[


f(0) + 4f

( 1


2

)


+f(1)

]


=^16


[


1+^165 +^12


]


=0. 7833.


(iii) Using Gaussian integration, we obtain

I=


1 − 0


2


∫ 1


− 1

dz
1+^14 (z+1)^2

=^12

{


0 .555 56[f(− 0 .774 60) +f(0.774 60)]+0.888 89f(0)

}


=^12


{


0 .555 56[ 0 .987 458 + 0.559 503]+0.888 89× 0. 8


}


=0.785 27.


(iv) Exact evaluation gives

I=


∫ 1


0

dx
1+x^2

=


[


tan−^1 x

] 1


0 =


π
4

=0.785 40.


In practice, a compromise has to be struck between the accuracy of the result achieved
and the calculational labour that goes into obtaining it.


Further Gaussian quadrature procedures, ones that utilise the properties of the

Chebyshev polynomials, are available for integrals over finite ranges when the


integrands involve factors of the form (1−x^2 )±^1 /^2. In the same way as decreasing


linear and quadratic exponentials are handled through the weight functions in


Gauss–Laguerre and Gauss–Hermite quadrature, respectively, the square root

Free download pdf