Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

27.3 SIMULTANEOUS LINEAR EQUATIONS


variables (unknowns),xi,i=1, 2 ,...,N. The equations take the general form


A 11 x 1 +A 12 x 2 +···+A 1 NxN=b 1 ,

A 21 x 1 +A 22 x 2 +···+A 2 NxN=b 2 , (27.21)

..
.

AN 1 x 1 +AN 2 x 2 +···+ANNxN=bN,

where theAijare constants and form the elements of a square matrixA.Thebi


are given and form a column matrixb.IfAis non-singular then (27.21) can be


solved for thexiusing the inverse ofA, according to the formula


x=A−^1 b.

This approach was discussed at length in chapter 8 and will not be considered


further here.


27.3.1 Gaussian elimination

We follow instead a continuation of one of the earliest techniques acquired by a


student of algebra, namely the solving of simultaneous equations (initially only


two in number) by the successive elimination of all the variables but one. This


(known asGaussian elimination) is achieved by using, at each stage, one of the


equations to obtain an explicit expression for one of the remainingxiin terms


of the others and then substituting for thatxiin all other remaining equations.


Eventually a single linear equation in just one of the unknowns is obtained. This


is then solved and the result is resubstituted in previously derived equations (in


reverse order) to establish values for all thexi.


This method is probably very familiar to the reader, and so a specific example

to illustrate this alone seems unnecessary. Instead, we will show how a calculation


along such lines might be arranged so that the errors due to the inherent lack of


precision in any calculating equipment do not become excessive. This can happen


if the value ofNis large and particularly (and we will merely state this) if the


elementsA 11 ,A 22 ,...,ANNon the leading diagonal of the matrix in (27.21) are


small compared with the off-diagonal elements.


The process to be described is known asGaussian elimination with interchange.

The only, but essential, difference from straightforward elimination is that before


each variablexiis eliminated, the equations are reordered to put the largest (in


modulus) remaining coefficient ofxion the leading diagonal.


We will take as an illustration a straightforward three-variable example, which

can in fact be solved perfectly well without any interchange since, with simple


numbers and only two eliminations to perform, rounding errors do not have


a chance to build up. However, the important thing is that the reader should

Free download pdf