nc 121121212121212121

5
2 8 2 1 6 -1 2 -1 2 (5.18) Applying equation (??) with k = 1 and simply replacing the second and third elements of column 1 with zeros, we obtain 2 8 2 1 6 -1 2 -1 2 = 2 8 2 0 2 -2 0 -9 0 (5.19) Now, applying equation (??) with k = 2 and replacing the third elements of second column with zeros, we obtain 2 8 2 0 2 -2 0 -9 0 = 2 8 2 0 2 -2 0 0 -9 (5.20) The value of the determinant given by the product of the main diagonal elements is -36. 5.5 Gauss-Jordan Elimination Methods This method, which is a variation of the Gaussian elimination method, is suitable for solving as many as 15 to 20 simultaneous equations, with 7 to 10 significant digits used in the arithmetic operations of the computer. This procedure varies from the Gaussian method in that, when an unknown is eliminated, it is eliminated from all the other equations, i.e., from those preceding the pivot equation as well as those following it. This eliminates the necessity of using the back substitution process employed in Gauss’s method. To illustrate the Gauss-Jordan elimination method, let us solve the following set of equations: 2x 1 - 2x 2 + 5x 3 = 13 (a) 2x 1 + 3x 2 + 4x 3 = 20 (b) 3x 1 - x 2 + 3x 3 = 10 (c) (5.21) Partial pivoting gives 3x 1 - x 2 + 3x 3 = 10 (a) 2x 1 - 2x 2 + 5x 3 = 13 (b) 2x 1 + 3x 2 + 4x 3 = 20 (c) (5.22) 85

Upload: hamid-rehman

Post on 10-Apr-2016

217 views

Category:

Documents


0 download

DESCRIPTION

Nc 77777777777777777777

TRANSCRIPT

Page 1: Nc 121121212121212121

∣∣∣∣∣∣∣

2 8 21 6 −12 −1 2

∣∣∣∣∣∣∣(5.18)

Applying equation (??) with k = 1 and simply replacing the second and thirdelements of column 1 with zeros, we obtain

∣∣∣∣∣∣∣

2 8 21 6 −12 −1 2

∣∣∣∣∣∣∣=

∣∣∣∣∣∣∣

2 8 20 2 −20 −9 0

∣∣∣∣∣∣∣(5.19)

Now, applying equation (??) with k = 2 and replacing the third elements of secondcolumn with zeros, we obtain

∣∣∣∣∣∣∣

2 8 20 2 −20 −9 0

∣∣∣∣∣∣∣=

∣∣∣∣∣∣∣

2 8 20 2 −20 0 −9

∣∣∣∣∣∣∣(5.20)

The value of the determinant given by the product of the main diagonal elements is-36.

5.5 Gauss-Jordan Elimination Methods

This method, which is a variation of the Gaussian elimination method, is suitable forsolving as many as 15 to 20 simultaneous equations, with 7 to 10 significant digitsused in the arithmetic operations of the computer. This procedure varies from theGaussian method in that, when an unknown is eliminated, it is eliminated from allthe other equations, i.e., from those preceding the pivot equation as well as thosefollowing it. This eliminates the necessity of using the back substitution processemployed in Gauss’s method.

To illustrate the Gauss-Jordan elimination method, let us solve the following setof equations:

2x1 − 2x2 + 5x3 = 13 (a)2x1 + 3x2 + 4x3 = 20 (b)3x1 − x2 + 3x3 = 10 (c)

(5.21)

Partial pivoting gives

3x1 − x2 + 3x3 = 10 (a)2x1 − 2x2 + 5x3 = 13 (b)2x1 + 3x2 + 4x3 = 20 (c)

(5.22)

85

Page 2: Nc 121121212121212121

Begin by dividing the first equation of the set, equation (??a), by the coefficient ofthe first unknown in the equation, which gives us equation (??a) below. We thenmultiply equation (??a), respectively, by the coefficient of the first unknown in eachof the remaining equations (equation (??b) and (??c) ) to get

x1 − 13x2 + x3 = 10

3(a)

2x1 − 23x2 + 2x3 = 20

3(b)

2x1 − 23x2 + 2x3 = 20

3(c)

(5.23)

Now subtract equation (??b) from equation (??b) and equation (??c) from equation(??c) and we let equation (??a) become equation (??c), obtaining

− 43x2 + 3x3 = 19

3(a)

113x2 + 2x3 = 40

3(b)

x1 − 13x2 + x3 = 10

3(c)

(5.24)

Next, we divide equation (??a) by the coefficient of the first unknown in thatequation (the coefficient of x2) to obtain equation (??a). We then multiply equation(??a), respectively, by the coefficient of the x2 term in each of equation (??b) and(??c). This yields

x2 − 94x3 = −19

4(a)

113x2 − 33

4x3 = −209

12(b)

− 13x2 + 3

4x3 = 19

12(c)

(5.25)

We next subtract equation (??b) from equation (??b) and equation (??c) fromequation (??c) and we let equation (??a) become equation (??c), obtaining

414x3 = 369

12(a)

x1 + 14x3 = 21

12(b)

x2 − 94x3 = −19

4(c)

(5.26)

Repeating the procedure yields

x3 = 3 (a)14x3 = 3

4(b)

−94x3 = −27

4(c)

(5.27)

and finallyx1 = 1 (a)x2 = 2 (b)x3 = 3 (c)

(5.28)

which constitutes the desired solution of the simultaneous equations.

86

Page 3: Nc 121121212121212121

Now consider the augmented matrix A of the same set of equations (??). Thismatrix is

A =

3 −1 3 102 −2 5 132 3 4 20

(5.29)

We next associate an augmented matrix B with equation (??), in which the firstcolumn of coefficients (0,0,1) is omitted, and we write

b =

−4

33

19

3

11

32

40

3

−1

31

10

3

(5.30)

Having established matrix B from equation (?? ), we note, from the way in whichequation (?? ) was obtained from equation (?? ) in the first procedure, that wecan write the elements of B directly from the elements of A by using the followingformulas:

bi−1,j−1 = aij −a1jai1

a11

1 < i ≤ n1 < j ≤ m

a11 6= 0

(5.31)

bn,j−1 =a1j

a11

{1 < j ≤ m

a11 6= 0

}(5.32)

Equation (??) is used to find all elements of the new matrix B except those makingup the last row of that matrix. For determining the elements of the last row of thenew matrix, equation (??) is used. In these equations,

i = row number of old matrix Aj = column number of old matrix An = maximum number of rowsm = maximum number of columnsa = an elements of old matrix Ab = an elements of new matrix B

Now, if we write the augmented matrix of equation (??), this time omitting the first

87

Page 4: Nc 121121212121212121

two columns (elements 0,1,0 and 0,0,1), we get

C =

41

4

369

12

1

4

21

12

−9

4−19

4

(5.33)

Again, we note that the elements of C can be obtained directly from the elementsof B by utilizing equations (??) and (??), where C is now the new and B is theold matrix.

The augmented matrix of equation (??), with the first three columns (1,0,0;0,1,0;and 0,0,1) omitted, is simply the matrix whose elements are the solution of the setof simultaneous equations with which we started,

D =

123

Just as with the previous matrices, matrix D can be obtained from matrix C byapplication of equations (??) and (??). The elements shown in D are associated,respectively, with x1, x2 and x3 by the above procedure.

Thus it can be seen that the roots of a set of n simultaneous equation can beobtained by successive applications of equations (??) and (??) to get n new matrices,the last of which will be a column matrix whose elements are the roots of the setof simultaneous equations. In FORTRAN program only the names A and B wouldbe used for pairs of successive matrices, rather than calling them A,B,C,D,and soforth.

It is possible that the pivot element a11 of one or more of the matrices obtainedduring the elimination process could have a zero value, in which case divisions bya11 in equations (??) and (??) would be invalid. If this occurs, the row can beinterchanged with one of the first m−1 rows of the matrix which has a first elementnot equal to zero, where m is the number of columns in the current matrix. Theuse of the rows beyond row m − 1 as a pivot row in the elimination process wouldreintroduce one of the previously eliminated unknowns into the equations. Theelimination process then continues as before, until a solution is reached.

In instances in which a11 is not zero but is very small in comparison with thegeneral magnitude of the other elements of the matrix, its use could cause a decreasein solution accuracy, as discussed in Gauss’s elimination method. For improved ac-curacy the applicable row having the largest potential pivot element (the row among

88

Page 5: Nc 121121212121212121

the first m − 1 rows having the largest pivot element) should be laced in the firstor pivot position if it is not already there. This would be accomplished by checkingthe absolute value of a11 against the absolute values of a21, a31, a41, · · · , a11, a11, andmaking the appropriate row interchange if one of these latter values were largerthan |a11|. This procedures of partial pivoting should always be incorporated in acomputer program for solving fairly large number of simultaneous equations.

It should be noted that, if it were desired to solve a second set of simultaneousequations which differed from a first set only in the constant terms which appeared,both sets could be solved at the same time by representing each set of constantsas a separate column in augmenting the coefficient matrix. Actually, two or moresets of simultaneous equations, differing only in their constant terms, can be solvedin a single elimination procedure by placing the constants of each set in a separatecolumn to the right of the coefficient columns in the augmented matrix, and applyingequations (??) and (??) until a reduced matrix is obtained which has the samenumber of columns as the number of sets of simultaneous equations being solved.and scaling

5.6 Cholesky’s Method

Cholesky’s method also known as Crout’s method, the method of matrix decom-position, and the method of matrix factorization, is more economical of computertime than other elimination methods. As a result it has been used extensively insome of the larger structural analysis programs.

Crout’s method transforms the coefficient matrix, A, into the product of twomatrices, L (lower triangular matrix) and U, (upper triangular matrix) where Uhas one on its main diagonal (the method in which L has the ones on its diagonal,is known as Doolittle’s method).

Any matrix that has all diagonal elements non-zero can be written as a product oflower-triangular and an upper-triangular matrix in an infinity of ways, for example

2 −1 −10 −4 26 −3 1

=

2 0 00 −4 06 −3 1

1 −12

−12

0 1 −12

0 0 1

=

1 0 00 1 03 0 1

2 −1 −10 −4 20 0 4

=

1 0 00 2 03 0 1

2 −1 −10 −2 10 0 4

and so on

Of the entire set of LUs whose product equals matrix A, in the Crout’s method

89