CHAPTER 2
CHAPTER 2
LINEAR
LINEAR
LINEAR
LINEAR
EQUATIONS
EQUATIONS
EQUATIONS
EQUATIONS
and
and
and
and
SIMULTANEOUS
SIMULTANEOUS
SIMULTANEOUS
SIMULTANEOUS
LINEAR
LINEAR
LINEAR
LINEAR
EQUATIONS
EQUATIONS
EQUATIONS
EQUATIONS
•• Major: ChemicalMajor: Chemical Engineering
Engineering •
• Subject: ChemicalSubject: Chemical Engineering Engineering Mathematics 2 Mathematics 2 • • Author: Author: •
• Andrew KUM Andrew KUMOROORO
•
•
e!t" o# Chemical
e!t" o# Chemical
Engineering
Engineering
•
• i!onegoro Uni$ersit%i!onegoro Uni$ersit% •
Linear equations
Linear equations
Simultaneous linear equations with two
Simultaneous linear equations with two
unknowns
unknowns
Simultaneous linear equations with
Simultaneous linear equations with
three unknowns
three unknowns
SUB CHAPTER
SUB CHAPTER
LINEAR EQUATIONS
Solution of simple equations
A linear equation in a single variable (unknown) involves powers of the variable no higher than the rst. A linear equation is also referred to as a simple equation.
The solution of simple equations consists essentially of simplifying the expressions on each side of the equation to obtain an equation of the formax b cx d giving ax cx d b and hence
d b x a c
+ = +
− = −
−
=
−
SIMULTANEOUS LINEAR EQUATIONS
WITH TWO UNKNOWNS
Solution by graphical methos
Solution by substitution
Solution
by
equating
coecients/Elimination
Simultaneous linear euations !it"
t!o un#no!ns
Solution by graphical method
!et us consider the following system of two simultaneous linear equations in two variable. "x # y $ %&
'x "y $
*ere we assign any value to one of the two variables and then determine the value of the other variable from the given equation.
)or the e*uation 2+ ,% - .' .../'0 2+ 1' - % - 2+ 1 ' (+ 1 2% - 3 ... /20 2% - 3 , (+ 3 . (+ - ... 2
X
0
2
Y
1
5
X
3
-1
Y
0
6
X
X’
Y
Y’
(2,5)
(-1,6)
(0,3)
(0,1)
X= 1
Y=3
Simultaneous linear euations !it"
t!o un#no!ns
Solution by substitution
A linear equation in two variables has an innite number of solutions. +or two such equations there may be ,ust one pair of x % and y %values that satisfy both simultaneously. +or example( ) 5 2 14 5 ( ) 3 4 24 from ( ): 5 2 14 2 14 5 7 2 a x y x b x y a x y y x y + = − = + = ∴ = − ∴ = − 5 in ( ) 3 4 7 24 4 2 in ( ) 5(4) 2 14 3 x b x x a y y − − = ∴ = ÷ + = ∴ = −
Simultaneous linear euations !it"
t!o un#no!ns
Solution by equating
coecients/Elimination
-xample
ultiply (a) by ' (the coe/cient of y in (b)) and multiply (b) by " (the coe/cient of y in (a)) ( ) 3 2 16 ( ) 4 3 10 a x y b x y
+ =
− =
( ) 3 9 6 48( ) 2 8 6 20 add together to give 17 68 4 !"#tit!te in ( ) to give 3(4) 2 16 2 a x y b x y x x a y y
×
+ =
×
−
=
=
∴
=
+ = ∴ =
Simultaneous linear euations !it"
t"ree un#no!ns
0ith three unknowns and three equations the method of solution is ,ust an extension of the work with two unknowns.
1y equating the coe/cients of one of the variables it can be eliminated to give two equations in two unknowns. These can be solved in the usual manner and the value of the third variable evaluated by substitution.
Simultaneous linear euations
Pre-simplifcation
2ometimes3 the given equations need to be simplied before the method of solution can be carried out. +or example3 to solve
2implication yields 2( 2 ) 3(3 ) 38 4(3 2 ) 3( 5 ) 8 x y x y x y x y + + − = + − + = −
11
38
9
7
8
x y
x
y
+ =
− = −
atri! "orm o# Linear Equations
11 1 12 2 1 1 21 1 22 2 2 2
1 1 2 2
$he #%#tem of e&!ation#:
N N N N N N NN N N a T a T a T C a T a T a T C a T a T a T C
+
+ +
=
+
+ +
=
+
+ +
=
! ! !A total of 4 algebraic equations for the 4 nodal points and the system can be expressed as a matrix formulation
5A65T6$5C6
11 12 1 1 1 21 22 2 2 2 1 2 ' N N N N NN N N a a a T C a a a T C where A T C a a a T C
=
=
!
!
!
atrix form 5A65T6$5C6.
+rom linear algebra 5A6
%&5A65T6$5A6
% &5C63
5T6$5A6
%&5C6
where 5A6
%&is the inverse of matrix 5A6.
5T6 is the solution vector.
atrix inversion requires cumbersome
numerical computations and is not
e/cient if the order of the matrix is
Numeri$al Solutions
9auss elimination method and other
matrix solvers are usually available in
many numerical solution package. +or
example3
:4umerical
;ecipes<
by
=ambridge >niversity ?ress or their web
source at www.nr.com.
+or high order matrix3 iterative methods
are usually more e/cient. The famous
@A=1B BT-;ATB4
C
9A>22%2-BD-!
BT-;ATB4 methods will be introduced
in the following.
Iteration "or Sol%in& Simulatenous Linear Equations 1 1 1 31 1 32 2 33 3 1 1 1 ( ) ( ) ( 1) 1
enera* a*ge"raic e&!ation for noda* +oint:
(,-am+*e : 3)
.e/rite the e&!ation of the form:
i N ij j ii i ij j i j j i N N i ij ij k i k k i j j j j i ii ii ii a T a T a T C a T a T a T a T C i a a C T T T a a a − = = + − − = =
+
+
=
+
+
+ +
=
=
=
−
−
∑
∑
∑
! 1 N +∑
E (k) % specify the level of the iteration3 (k%&) means the present level and (k) represents the new level. E An initial guess (k$8) is needed to start the
iteration.
E 1y substituting iterated values at (k%&) into the equation3 the new values at iteration (k) can be estimated
;eplace (k) by (k%&) for the @acobi iteration
o*ve the fo**o/ing #%#tem of e&!ation# !#ing (a) the aco"i metho# (") the a!## eide* iteration method
4 2 11 2 0 3 2 4 16 X Y Z X Y Z X Y Z + + = − + + = + + =
(a) Jacobi method: !#e initia* g!e## X0'Y0'0'1
#to+ /hen ma
X -X-1Y -Y-1 --1 ≤
01First iteration:
X1 ' (114) - (12)Y0 - (14)0 ' 2
Y1 ' (32) (12)X0 ' 2
1 ' 4 - (12) X0 - (14)Y0 ' 134
.eorganie into ne/ form: X ' 11 4 -1 2 Y -1 4 Y ' 3 2 1 2 X 0 ' 4 - 1 2 X -1 4 Y 4 2 1 11 1 2 0 3 2 1 4 16 X Y Z
−
=
,X;,
Second iteration: !#e the iterated va*!e# X1'2 Y1'2 1'134 X2' (114) - (12)Y1 - (14)1 ' 1516 Y2' (32) (12)X1 ' 52 2' 4 - (12) X1 - (14)Y1 ' 52 <=>; ?;@$=?> A1014 202 2996B ,XC$ ?;@$=?> A1 2 3B 5 4 5 4 5 4 Converging roce##: 13 15 5 5 7 63 93 133 31 393 A111B 22 4 16 2 2 8 32 32 128 16 128 519 517 767
to+ the iteration /hen
512 256 256 ma- X X Y Y Z Z 01 − − − ≤
(b) $auss%Seidel iteration
2ubstitute the iterated values into the iterative process immediately after they are computed.
0 0 0
1 0 0
1 1
1 1 1
@#e initia* g!e## X 1
11 1 1 3 1 1 1 4 4 2 4 2 2 2 4 11 1 1 <ir#t iteration: X ' ( ) ( ) 2 4 2 4 3 1 3 1 5 (2) 2 2 2 2 2 1 1 1 1 5 19 4 4 (2) 2 4 2 4 2 8 5 19 Converging +roce##: A111B 2
2 8 Y Z X Y Z Y X Z X Y Y Z Y X Z X Y
=
=
=
= − −
= +
= − −
−
−
=
= +
= +
=
= − − = −
−
=
29 125 783 1033 4095 24541 32 64 256 1024 2048 8192$he iterated #o*!tion A1009 19995 2996B and it converge# fa#ter
Bt takes three diFerent ingredients A3 13 and =3 to produce a certain chemical substance. A3 13 and = have to be dissolved in water separately before they interact to form the
chemical. 2uppose that the solution
containing A at &.G gHcm' combined with the
solution containing 1 at '.I gHcm' combined
with the solution containing = at G.' gHcm'
makes "G.8J g of the chemical. Bf the proportion for A3 13 = in these solutions are
changed to ".G3 K.'3 and ".K gHcm' 3
respectively (while the volumes remain the same)3 then "".'I g of the chemical is produced. +inally3 if the proportions are ".J3
G.G3 and '." gHcm'3 respectively3 then "L.&K g
$ROUP TASK &
A garden supply centre buys Nower seed in bulk then mixes and packages the seeds for home garden use. The supply center provides ' diFerent mixes of Nower seeds :Wild Thing<3 :Mommy Dearest < and :Medicine Chest <.
&) ne kilogram of Wild Thing seed mix contains G88 grams of wild Nower seed3 "G8 grams of
-chinacea seed and "G8 grams of
Chrysanthemum seed.
") Mommy Dearest mix is a product that is commonly purchased through the gift store and consists of JGO Chrysanthemum seed and "GO wild Nower seed.
') The Medicine Chest mix has gained a lot of attention lately3 with the interest in medicinal plants3 and contains only -chinacea seed3 but the mix must include some vermiculite (&8O by
$ROUP TASK 2
Bn a single order3 the store received &J grams of wild Nower seed3 &G grams of -chinacea seed and "& grams of =hrysanthemum seed. Assume that the garden center has an ample supply of vermiculite on hand.
>se matrices and complete Gauss-Jordan
Elimination to determine how much of each mixture the store can prepare.
Pour company has three acid solutions on hand '8O3 K8O3 and L8O acid. Bt can mix all three to come up with a &88 % gallons of a 'O acid solution. Bf it interchanges the a mount of '8O solution with the amount of the L8O solution in the rst mix3 it can create a &88 % gallon solution that is GO acid. *ow much of the '8O3 K8O3 and L8O solutions did the company mix to create a &88% gallons of a 'O acid solutionM
$ROUP TASK '
A bakery displays the number of ounces of yogurt3 wheat3 and butter used in the production of one patch of its products. Bt uses 8.I"G kg of yogurt3 8.I"G kg of wheat and
8.I"G kg of butter in a patch of rollsQ 8.'JG kg of wheat and 8.'JG kg of butter in a patch of cookiesQ and &."G kg
of yogurt and &."G kg of butter in a patch of bread. The bakery is supplied with K88 kg of yogurt3 'G8 kg of wheat3 and G88 kg of butter3 which must be used up completely.
a . ?ut the above information in a table format. b. 0hat is the maximum number of patches of all products that can be made to completely use up all the suppliesM
$ROUP TASK (
!ast year you purchased shares in three
Bnternet companies *agan1ooks.com3
+armers1ooks.com3 and @ungle1ooks.com. The *agan1ooks.com cost you RG8 per
share3 +ar mers1ooks.com stocks cost you RKG per share3 and @ungle1ooks.com cost you R'8 per share. Pou spent a total of R"K3K883 and purchased twice as many +armers1ooks.com
shares as @ungle1ooks.com. The
*agan1ooks.com stocks appreciated by
"8O3 while the other two appreciated by &8O3 and you sold all the stocks for R'3KK8 more than you originally paid. *ow many stocks of each company did you originally purchaseM
$ROUP TASK )