Vous êtes sur la page 1sur 14

• Major: Chemical

Engineering CHAPTER 3
• Subject: Chemical
Engineering
Mathematics 2 GAUSS ELIMINATION
WITH BACKWARD
• Author:
• Andrew KUMORO
SUBSTITUTION METHOD
FOR
• Dept. of Chemical
Engineering SIMULTANEOUS LINEAR
• Diponegoro University
• 2013 EQUATIONS
MATRIX FORM OF LINEAR EQUATIONS

The system of equations:


a11T1  a12T2   a1N TN  C1
a21T1  a22T2   a2 N TN  C2

a N 1T1  a N 2T2   a NN TN  CN
A total of N algebraic equations for the N nodal points
and the system can be expressed as a matrix formulation:
[A][T]=[C]
 a11 a12 a1N   T1   C1 
a a22 a2 N  T  C 
where A=  21  , T   2  ,C   2 
     
     
aN 1 aN 2 aNN   N
T C N 
NUMERICAL SOLUTIONS

Matrix form: [A][T]=[C].

From linear algebra:


[A]-1[A][T]=[A]-1[C],
[T]=[A]-1[C]
where [A]-1 is the inverse of matrix [A].
[T] is the solution vector.

Matrix inversion requires cumbersome numerical


computations and is not efficient if the order of the
matrix is high (>10)
Numerical Solutions

Gauss elimination method and other matrix


solvers are usually available in many numerical
solution package. For example, “Numerical
Recipes” by Cambridge University Press or their
web source at www.nr.com.

For high order matrix, iterative methods are


usually more efficient. The famous Jacobi &
Gauss-Seidel iteration methods will be
introduced in the following.
THE CONCEPT GAUSS ELIMINATION

This easy solution process is called BACKWARD


SUBSTITUTION, and is made possible by the lower
triangles of ZEROS in the coefficient matrix, marked with
a dashed triangular box.

The first equation will be -2 X3 =-4 or X3 = 2


What are the rest of the equations?
Step 1.: rewrite the simultaneous linear equations to
get one matrix with both A and B in it and called
AUGMENTING the matrix

Select the pivot row based on the highest absolute


coefficient of column (1)….row (1) is selected
Step 2.: reduce A2,1 to zero
New member of Row 2 = Row (1).(-2/3) + Row (2)
Step 3.: reduce A3,1 to zero
New member of Row 3 = Row (1).(-1/3) + Row (3)

Step 4.: select new pivot row of column 2 to further


reduction of the A3,2 to zero
Row with -11/3 in column 2 is selected. Why?
As pivot row has to be above of other rows, then row 3
is swapped up to row 2.
Step 3.: reduce A3,2 to zero
New member of Row 3 = Row (2).(-1/11) + Row (3)

The first equation to be solved will be:


-2 X3 =-4
-11/3 X2 - 11/3 X3 = -11/3
3X1 + 5 X2 + 2X3 = 8
Consider the equations..
x  2y  z  8
3x  y  z  2
x  y  2z   3
To help us to program this it is best to be systematic and re-
write the equations as

x1  2 x2  x3  8
3x1  x2  x3  2
x1  x2  2 x3  3
[You could use x0, x1, x2 instead when programming, as C uses
arrays that commence with element zero]
EXERCISE
3X1 + 5X2 + 2X3 = 8 2X1 - 4X2 + 5X3 = 36
2X1 + 3X2 - X3 = 5 -3X1 + 5X2 + 7X3 = 7
-X1 - 2X2 - 3X3 = 7 5X1 + 3X2 - 8X3 = - 31

2X1 + 4X2 - 2 X3 - 2 X4 = -4
1X1 + 2X2 + 4X3 - 3 X4 = 5 3X2 + 2X3 = 16
- 3X1 - 3X2 + 8X3 - 2X4 = 7 4X1 + 2X2 - 3X3 = 5
- X1 + X2 + 6X3 - 3X4 = 7 3X1 - 4X2 + X3 = 9

X1 + X2 + X3 = 3
2X1 + 3X2 + 4X3 = 9
X1 + 7X2 + X3 = 9
2 X1 + 4 X2 - 2 X3 = 10 3X1 + 2 X2 +100X3 = 105
X1 + 2 X2 + 4 X3 = 6 - X1 + 3 X2 +100X3 = 102
2 X1 + 2 X2 + 1 X3 = 2 X1 + 2 X2 - 1X3 = 2

-3X1 + 2X2 - X3 = -1 4X1 + 2 X2 + X3 = 105


6X1 - 6X2 + 7X3 = -7 - X1 + 2 X2 = 102
3X1 - 4X2 + 4X3 = -6 2X1 + X2 + 4X3 = 2
A garden supply centre buys flower seed in bulk then mixes
and packages the seeds for home garden use. The supply
center provides 3 different mixes of flower seeds: “Wild
Thing”, “Mommy Dearest” and “Medicine Chest”.

1) One kilogram of Wild Thing seed mix contains 500 grams of


wild flower seed, 250 grams of Echinacea seed and 250
grams of Chrysanthemum seed.
2) Mommy Dearest mix is a product that is commonly
purchased through the gift store and consists of 75%
Chrysanthemum seed and 25% wild flower seed.
3) The Medicine Chest mix has gained a lot of attention lately,
with the interest in medicinal plants, and contains only
Echinacea seed, but the mix must include some vermiculite
(10% by weight of the total mixture) for ease of planting
In a single order, the store received 17 grams of wild
flower seed, 15 grams of Echinacea seed and 21 grams of
Chrysanthemum seed. Assume that the garden center
has an ample supply of vermiculite on hand.

Use matrices and complete Gauss-Jordan Elimination to


determine how much of each mixture the store can
prepare.
THE END

Vous aimerez peut-être aussi