13.07.2015 Views

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

27.3 SIMULTANEOUS LINEAR EQUATIONSvariables (unknowns), x i , i =1, 2,...,N. The equations take the general <strong>for</strong>mA 11 x 1 + A 12 x 2 + ···+ A 1N x N = b 1 ,A 21 x 1 + A 22 x 2 + ···+ A 2N x N = b 2 , (27.21)..A N1 x 1 + A N2 x 2 + ···+ A NN x N = b N ,where the A ij are constants <strong>and</strong> <strong>for</strong>m the elements of a square matrix A. Theb iare given <strong>and</strong> <strong>for</strong>m a column matrix b. IfA is non-singular then (27.21) can besolved <strong>for</strong> the x i using the inverse of A, according to the <strong>for</strong>mulax = A −1 b.This approach was discussed at length in chapter 8 <strong>and</strong> will not be consideredfurther here.27.3.1 Gaussian eliminationWe follow instead a continuation of one of the earliest techniques acquired by astudent of algebra, namely the solving of simultaneous equations (initially onlytwo in number) by the successive elimination of all the variables but one. This(known as Gaussian elimination) is achieved by using, at each stage, one of theequations to obtain an explicit expression <strong>for</strong> one of the remaining x i in termsof the others <strong>and</strong> then substituting <strong>for</strong> that x i in all other remaining equations.Eventually a single linear equation in just one of the unknowns is obtained. Thisis then solved <strong>and</strong> the result is resubstituted in previously derived equations (inreverse order) to establish values <strong>for</strong> all the x i .This method is probably very familiar to the reader, <strong>and</strong> so a specific exampleto illustrate this alone seems unnecessary. Instead, we will show how a calculationalong such lines might be arranged so that the errors due to the inherent lack ofprecision in any calculating equipment do not become excessive. This can happenif the value of N is large <strong>and</strong> particularly (<strong>and</strong> we will merely state this) if theelements A 11 ,A 22 ,...,A NN on the leading diagonal of the matrix in (27.21) aresmall compared with the off-diagonal elements.The process to be described is known as Gaussian elimination with interchange.The only, but essential, difference from straight<strong>for</strong>ward elimination is that be<strong>for</strong>eeach variable x i is eliminated, the equations are reordered to put the largest (inmodulus) remaining coefficient of x i on the leading diagonal.We will take as an illustration a straight<strong>for</strong>ward three-variable example, whichcan in fact be solved perfectly well without any interchange since, with simplenumbers <strong>and</strong> only two eliminations to per<strong>for</strong>m, rounding errors do not havea chance to build up. However, the important thing is that the reader should995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!