Você está na página 1de 25

03 Linear Algebraic Equations

Chapter 03
LINEAR ALGEBRAIC EQUATIONS
03 Linear Algebraic Equations Linear Algebraic Equations
03 Linear Algebraic Equations

Example
3X1 + 2X2 + X3 = 11
3X1 + X2 + 3X3 = 16
X1 + 2X2 + X3 = 7
03 Linear Algebraic Equations Gaussian Elimination with Backward Substitution

Elimination process

Backward
substitution
Original equations
03 Linear Algebraic Equations

Devide eq (2.1) by a11

Eliminate
Eliminateaa2121by
by
[[Eq. (2.2)––aa2121xxEq.
Eq.(2.2) Eq.(2.4)]
(2.4)]
Eliminate a31 Eq. (2.3) by
[ Eq. (2.3) – a31 x Eq. (2.4)]
03 Linear Algebraic Equations

Devide eq (2.5) by a’22

Eliminate a’31 Eq. (2.6) by


[ Eq. (2.6) – a’32 x Eq. (2.7)]
Backward substitution
03 Linear Algebraic Equations

Solution of x3 form eq (2.8)

Solution of x2 form eq (2.5)

Solution of x1 form eq (2.1)


03 Linear Algebraic Equations

Example
3X1 + 2X2 + 3X3 = 10
3X1 + X2 + 2X3 = 9
X1 + X2 + 2X3 = 5
03 Linear Algebraic Equations
03 Linear Algebraic Equations Matrix Inversion

 a 11 a 12 a 13 ... a 1n   x1   b1 
a b 
 21 a 22 a 23 ... a 2 n  x 
 2  2
 a 31 a 32 a 33 ... a 3n  x3  b3 
   
=  
 .   .   . 
 a n1 a nn  x n  b n 
 a n2 a n3 ...    

A x = B
03 Linear Algebraic Equations Solution
A x = B
A-1 A x = A-1 B
I x = A-1 B
x = A-1 B
Matlab
x = inv(A)*B
or
x = A\B
Example
x1 + 2 x2 + 3x3 = 366
03 Linear Algebraic Equations

4x1 + 5x2 + 6x3 = 804


7x1 + 8x2 = 351
1 2 3 x1 = 366
4 5 6 x2 = 804
7 8 0 x3 = 351
A x = B
x = inv(A)*B
03 Linear Algebraic Equations Solution
>> A=[1 2 3 ; 4 5 6 ; 7 8 0]
A=
1 2 3
4 5 6
7 8 0
>> det(A)
ans =
27
03 Linear Algebraic Equations Program

%Program for solution linear algebraic equations


A=[1 2 3 ; 4 5 6 ; 7 8 0 ]
b=[366 ; 804 ; 351]
disp('x=inv(A)*b')
x=inv(A)*b
disp('atau')
disp('x=A\b')
x=A\b
03 Linear Algebraic Equations Ex 01

10x1 - x2 + 2x3 = 6
-x1 + 11x2 - x3 + 3x4 = 25
2x1 - x2 + 10x3 - x4 = -11
3x2 - x3 + 8x4 = 15
03 Linear Algebraic Equations Next meeting
03 Linear Algebraic Equations Ex 02
X2 – 2X3 + X4 + 2X5 + 4X7 = -16
X1 + X2 + 2X3 – 2X4 + X5 – X6 = 14
3X1 – 2X2 – X3 + X4 + 2X5 +2X6 + 2X7 = -7
2X1 + 2X2 – 5X3 – X4 – 4X5 + 3X6 –10X7 = 1
2X1 – 2X3 – X4 + 2X5 + 3X6 + 2X7 = -6
-X1 + 2X2 + X3 – 2X4 + X6 + 2X7 = 12
-2X1 – X2 + X3 – X4 + X5 – 2X7 = -6
03 Linear Algebraic Equations Ex. 03
• Five reactors linked by pipes are shown in Fig. The rate of mass flow
through each pipe is computed as the product of flow (Q) and
concentration (c). At steady state, the mass flow into and out of each
reactor must be equal. Write mass balances for the remaining reactors
in Fig. and express the equations in matrix form. Then use MATLAB
to solve for the concentrations in each reactor.
Ex 04
The plant need former acid contained 65 % weight H2SO4, 20 %
03 Linear Algebraic Equations

HNO3, and 15 % H2O. They have 3 acids :


(A) Residual acid contains 60 % H2SO4, 10 % HNO3, and 30 %
H2O
(B) Nitric acid fresh contains 90 % HNO3 and 10 % H2O
(C) Sulfuric acid fresh contains 98 % H2SO4 and 2 % H2O

How much A, B, and C to get former acid ?


Ex 05
Mass Transfer Parameter
03 Linear Algebraic Equations
The relation of mass transfer parameter can be state as dimensionless
groups
K2 K3
kf a dp  d p VS     
 K1  


 D


De     e 

Sh = K1 (Re)K2 (Sc)K3
Determine K1, K2, dan K3 form this data :

Sh Re Sc
(Sherwood) (Reynold) (Schmidt)

1 43,7 10800 0,6

2 21,5 5290 0,6

3 24,2 3120 1,8


Ex 06
The relationship volume and pressure of gas can be state as ideal gas equation.
03 Linear Algebraic Equations
For non ideal gas, there are some equations for that. One of them is virial
equation :

The data of one experiment to find a, b, and c is


03 Linear Algebraic Equations Ex 07

Find A, m, and E for the constant of reaction rate form this data:
03 Linear Algebraic Equations Ex 08

Find α, β, and k for the reaction rate from this data

ra = k Caα Cbβ
03 Linear Algebraic Equations Ex 09

Energy supply unit need coal contained 0.61 % sulphur, 0.043 % phosphor,
and 1.8% ash. There are 4 type coal. Find the composition of coal

Type % ash
Ex 10
Xylene, styrene, toluene, and benzene is separated in distillation
03 Linear Algebraic Equations
system.
Find D1, D2, B1, B2, D, and B

Você também pode gostar