03 Persamaan Aljabar Linier
Mata Kuliah Metode Numeris dan Pemograman Komputer
=== Dr. Adrian Nur ===
Example
3x
1+ 2x
2+ x
3= 11
3x
1+ x
2+ 3x
3= 16
x
1+ 2x
2+ x
3= 7
Elimination process
Backward substitution
Gaussian Elimination with Backward Substitution
Original equations
Devide eq (2.1) by a11
Eliminate a21by
[ Eq. (2.2) – a21 x Eq. (2.4)]
Eliminate a21 by
[ Eq. (2.2) – a21x Eq. (2.4)]
Eliminate a31 Eq. (2.3) by
[ Eq. (2.3) – a31x Eq. (2.4)]
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
Solution of x3 form eq (2.8)
Solution of x2 form eq (2.5)
Solution of x1form eq (2.1)
Example
3X
1+ 2X
2+ 3X
3= 10
3X
1+ X
2+ 2X
3= 9
X
1+ X
2+ 2X
3= 5
3X
1+ 2X
2+ 3X
3= 10 (1)
3X
1+ X
2+ 2X
3= 9 (2)
X
1+ X
2+ 2X
3= 5 (3)
Bagi persamaan (1) dengan 3
X
1+ X
2+ X
3= (4)
Persamaan (2) dikurangi dengan 3 kali persamaan (4)
- X
2- X
3= - 1 (5)
X
2+ X
3= 1 (6)
Persamaan (3) dikurangi dengan 1 kali persamaan (4)
X
2+ X
3= (7)
X
2+ 3X
3= 5 (8)
3X
1+ 2X
2+ 3X
3= 10 (1)
X
2+ X
3= 1 (6)
X
2+ 3X
3= 5 (8)
Bagi persamaan (6) dengan 1
X
2+ X
3= 1 (9)
Persamaan (8) dikurangi dengan 1 kali persamaan (9)
2X
3= 4 (10)
3X
1+ 2X
2+ 3X
3= 10 (1)
X
2+ X
3= 1 (6)
2X
3= 4 (10)
2X
3= 4 (10)
X
3= 2
X
2+ X
3= 1 (6)
X
2+ 2 = 1
X
2= -1
3X
1+ 2X
2+ 3X
3= 10 (1)
3X
1+ 2(-1) + 3(2) = 10
X
1= 2
03 Persamaan Aljabar Linier
Mata Kuliah Metode Numeris dan Pemograman Komputer
=== Dr. Adrian Nur ===
Matrix Inversion
A x = B
nn 3
n 2
n 1
n
n 3 33
32 31
n 2 23
22 21
n 1 13
12 11
a ...
a a
a .
a ...
a a
a
a ...
a a
a
a ...
a a
a
n 3 2 1
x . x x x
n 3 2 1
b . b b b
=
Solution A x = B
A
-1A x = A
-1B I x = A
-1B x = A
-1B Matlab
x = inv(A)*B or
x = A\B
Example x
1
+ 2 x
2+ 3x
3= 366 4x
1+ 5x
2+ 6x
3= 804 7x
1+ 8x
2= 351 1 2 3
4 5 6 7 8 0
x
1x
2x
3=
=
=
366 804 351 A x = B
x = inv(A)*B
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
Ex 02
10x
1- x
2+ 2x
3= 6 -x
1+ 11x
2- x
3+ 3x
4= 25 2x
1- x
2+ 10x
3- x
4= -11
3x
2- x
3+ 8x
4= 15
Ex 03 X
2– 2X
3+ X
4+ 2X
5+ 4X
7= -16 X
1+ X
2+ 2X
3– 2X
4+ X
5– X
6= 14 3X
1– 2X
2– X
3+ X
4+ 2X
5+2X
6+ 2X
7= -7 2X
1+ 2X
2– 5X
3– X
4– 4X
5+ 3X
6–10X
7= 1 2X
1– 2X
3– X
4+ 2X
5+ 3X
6+ 2X
7= -6
-X
1+ 2X
2+ X
3– 2X
4+ X
6+ 2X
7= 12
-2X
1– X
2+ X
3– X
4+ X
5– 2X
7= -6
Ex. 04
• 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 05 The plant need former acid contained 65 % weight H
2SO
4, 20 % HNO
3, and 15 % H
2O. They have 3 acids :
(A) Residual acid contains 60 % H
2SO
4, 10 % HNO
3, and 30 % H
2O (B) Nitric acid fresh contains 90 % HNO
3and 10 % H
2O
(C) Sulfuric acid fresh contains 98 % H
2SO
4and 2 % H
2O
How much A, B, and C to get former acid ?
Ex 06
Mass Transfer ParameterThe relation of mass transfer parameter can be state as dimensionless groups
Sh = K1 (Re)K2 (Sc)K3 Determine K1, K2, dan K3 form this data :
3 K e 2
K S p 1 e
p f
D V
K d D
d a k
Sh (Sherwood)
Re (Reynold)
Sc (Schmidt)
1 43,7 10800 0,6
2 21,5 5290 0,6
3 24,2 3120 1,8
Ex 07
The relationship volume and pressure of gas can be state as ideal gas equation.
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
Ex 08
Find A, m, and E for the constant of reaction rate form this data:
Ex 09
Find α, β, and k for the reaction rate from this data
ra = k Caα Cbβ
Ex 10
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
PBL 02 Transfer Panas 2 dimensi
Selesaikan cross section cerobong rektanguler konduksi panas steady sepanjang arah x dan y seperti gambar. Kedua sisi ujung simetris,
sehingga kita dapat mempertimbangkan 1/8 bagian saja. Di bagian ini,
kita konstruksikan bagian lebih kecil sebagai kotak yang lebih kecil.
A
B
C
D
Gambar di samping menunjukkan plat bujursangkar datar (10 x 10 satuan panjang) yang sisi sisinya dijaga konstan A, B, C, dan D. Tentukan
distribusi temperatur di bagian dalam plat.
Kelompok A B C D
Kelompok 1 500 500 100 100 Kelompok 2 500 100 100 100 Kelompok 3 500 500 500 100 Kelompok 4 500 100 100 500 Kelompok 5 100 100 100 500 Kelompok 6 100 500 500 100 Kelompok 7 100 200 300 400 Kelompok 8 400 300 200 100 Kelompok 9 200 500 100 200 Kelompok 10 100 400 100 100 Kelompok 11 500 200 500 50 Kelompok 12 450 200 400 150
Kelompok 13 150 300 50 27
Kelompok 14 560 420 310 230
500
500
500 100