Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


nx 1 x 2 x 3
12 2 2
24 0.1 1.34
3 12.76 1.381 2.323
4 9.008 0.867 1.881
5 10.321 1.042 2.039
6 9.902 0.987 1.988
7 10.029 1.004 2.004

Table 27.6 Successive approximations to the solution of simultaneous equa-
tions (27.29) using the Gauss–Seidel iteration method.

Obtain an approximate solution to the simultaneous equations

x 1 +6x 2 − 4 x 3 =8,
3 x 1 − 20 x 2 +x 3 =12,
−x 1 +3x 2 +5x 3 =3.

(27.29)


These are the same equations as were solved in subsection 27.3.1.

Divide the equations by 1,−20 and 5, respectively, to give


x 1 +6x 2 − 4 x 3 =8,
− 0. 15 x 1 +x 2 − 0. 05 x 3 =− 0. 6 ,
− 0. 2 x 1 +0. 6 x 2 +x 3 =0. 6.

Thus, set out in matrix form, (27.28) is, in this case, given by



x 1
x 2
x 3



n+1

=




000


0. 15 0 0


0. 2 − 0. 60






x 1
x 2
x 3



n+1

+




0 − 64


000. 05


00 0






x 1
x 2
x 3



n

+




8


− 0. 6


0. 6



.


Suppose initially (n= 1) we guess each component to have the value 2. Then the successive
sets of values of the three quantities generated by this scheme are as shown in table 27.6.
Even with the rather poor initial guess, a close approximation to the exact result,x 1 = 10,
x 2 =1,x 3 = 2, is obtained in only a few iterations.


27.3.3 Tridiagonal matrices

Although for the solution of most matrix equationsAx=bthe number of


operations required increases rapidly with the sizeN×Nof the matrix (roughly


asN^3 ), for one particularly simple kind of matrix the computing required increases


only linearly withN. This type often occurs in physical situations in which objects


in an ordered set interact only with their nearest neighbours and is one in which


only the leading diagonal and the diagonals immediately above and below it

Free download pdf