Page 215 - Excel for Scientists and Engineers: Numerical Methods
P. 215
192 EXCEL: NUMERICAL METHODS
can be solved by successive substitution and elimination of variables. For
example, you can multiply the first equation by 3, so that the coefficient of x is
the same as in the second equation, and then subtract it from the second equation,
thus
3x+Sy=57
-3x + 6~45
2y= 12
to produce a single equation in one unknown from which y = 6. Using the value
of y, you can now calculate x.
To extend this procedure to a system of n equations in n unknowns requires
that one work in a systematic fashion. The solution process is equivalent to
converting the n x n matrix above into a triangular matrix, such as the upper
triangular matrix
allxi + ~12x2 + a193 + ... + = bl
a22x2 + a23x3 + . . + a2$" = b2
a33x3 + ... + a3dn = b3
andn = bn
which corresponds to a system of equations in which one of the equations
contains only one unknown, and successive equations contain only one additional
unknown. A similar solution process can be carried out using a lower triangular
matrix.
There are several methods for the solution of systems of equations that
involve a triangular matrix. The Gaussian elimination process reduces a system
of linear equations to an upper triangular matrix. In the example at the beginning
of this chapter, we used the first equation to eliminate x1 from the other equation.
To eliminate x1 in a system of n equations:
allxl + a12x2 f 013x3 + ... + al$n = bl
~21x1 + ~22x2 + a293 + .*. + a2dn = b2
a31x1 + ~32x2 + ~33x3 + ... + a3dn = b3
etc.
we multiply equation 1 by the factors azl/all, a31/a11, ..., a,l/all and subtract from
equations 2, 3, ..., n. This eliminates x1 from equations 2...n. Equation 1 is
termed the pivot equation, and the coefficient of x1 the pivot.
We then use equation 2 as the pivot equation, the coefficient of x2 as the
pivot, and eliminate x2 from equations 3, . . . , n.