Vous êtes sur la page 1sur 10

EXERCISE #1

x y z k
A 1 -3 4 = -3
6 11 4 = 2
8 -9 12 = 9

#1. Solve the system by LU Decomposition Method.

A 1 -3 4
6 11 4
8 -9 12

L11 = 1 L21 = 6 L31 = 8


U11 = 1 U12 = -3 U13 = 4

L22 = A22-L21*U12 29
L32 = A32-L31*U12 15
U23 = (A23-L21*U13)/L22 - 20/29
L33 = A33-(L31*U13+L32*U23) -9 19/ 29

L 1 0 0 D1 = -3
6 29 0 * D2 = 2
8 15 -9 19/29 D3 = 9

U 1 -3 4 X1 -3
0 1 - 20/29 * X2 20/29
0 0 1 X3 -2 1/3

Final Ans X1 3 3/ 5 3.6000


X2 - 13/14 -0.9286
X3 -2 26/75 -2.3464
D1 = -3
D2 = 20/29
D3 = -2 1/3
EXERCISE #1

x y
A 1 -3
6 11
8 -9

#2. Solve the system by Jacobi and Gauss Seidel Methods


Jacobi Method

n x y
0 0.0000 0.0000
1 0.3333 -1.0000
2 2.6667 -1.7037
3 4.5123 -0.7407
4 3.4877 -0.5816
5 3.0221 -1.1447
6 3.8041 -1.0579
7 3.8488 -0.7707
8 3.4092 -0.9047
9 3.5188 -1.0232
10 3.7298 -0.9133
11 3.6058 -0.8808
12 3.5264 -0.9514
13 3.6190 -0.9482
14 3.6351 -0.9100
15 3.5790 -0.9233
16 3.5869 -0.9404
17 3.6156 -0.9279
18 3.6025 -0.9222
19 3.5906 -0.9309
20 3.6014 -0.9314
21 3.6048 -0.9265
22 3.5978 -0.9276
23 3.5980 -0.9300
24 3.6018 -0.9287
25 3.6005 -0.9277
26 3.5988 -0.9288
27 3.6001 -0.9290
28 3.6006 -0.9283
29 3.5998 -0.9284
30 3.5997 -0.9287
31 3.6002 -0.9286
32 3.6001 -0.9285
33 3.5999 -0.9286
34 3.6000 -0.9286
35 3.6001 -0.9285
36 3.6000 -0.9285
37 3.6000 -0.9286
38 3.6000 -0.9286
39 3.6000 -0.9286
40 3.6000 -0.9286
z k Diagonally Dominant Equations (Jacobi)
4 = -3 6X+11Y+4Z=2
4 = 2 8X-9Y+12Z=9
12 = 9 X-3Y+4Z=-3

Gauss Seidel Method

z n x y
0.0000 0 0.0000 0.0000
-0.7500 1 1.1250 -0.4318
-1.5833 2 2.6719 -0.7828
-2.6944 3 3.2520 -0.8629
-2.4336 4 3.4695 -0.9069
-2.0581 5 3.5511 -0.9196
-2.3641 6 3.5816 -0.9254
-2.4944 7 3.5931 -0.9273
-2.2902 8 3.5974 -0.9281
-2.2808 9 3.5990 -0.9284
-2.3971 10 3.5996 -0.9285
-2.3674 11 3.5999 -0.9285
-2.3120 12 3.5999 -0.9286
-2.3452 13 3.6000 -0.9286
-2.3659 14 3.6000 -0.9286
-2.3413 15 3.6000 -0.9286
-2.3372 16 3.6000 -0.9286
-2.3520 17 3.6000 -0.9286
-2.3498
-2.3423
-2.3458
-2.3489
-2.3460
-2.3452
-2.3470
-2.3469
-2.3459
-2.3463
-2.3467
-2.3464
-2.3463
-2.3465
-2.3465
-2.3464
-2.3464
-2.3465
-2.3464
-2.3464
-2.3464
-2.3464
-2.3464
agonally Dominant Equations (Jacobi) Diagonally Dominant Equations (Gauss Seidel)
8X-9Y+12Z=9
6X+11Y+4Z=2
X-3Y+4Z=-3

z
0.0000
-1.3551
-2.0051
-2.2101
-2.2976
-2.3275
-2.3395
-2.3438
-2.3454
-2.3461
-2.3463
-2.3464
-2.3464
-2.3464
-2.3464
-2.3464
-2.3464
-2.3464
EXERCISE#1
#3 Matrix Inverse Method

A*x=b

x1 x2 x3 b x
A= 0.20000 -1.80000 2.10000 1.50000 -2.541479
1.30000 -0.45000 1.70000 2.50000 4.148527
2.50000 1.13000 0.48000 0.50000 4.512211

Final Ans A'= 1.41824 -2.14826 1.40364 Check: b= 1.5


-2.40642 3.42049 -1.58614 2.5
-1.72153 3.13645 -1.49323 0.5
EXERCISE #1
For #4 Gauss-Jordan

Solve the system by the following methods.


x y z k
A 0.20000 -1.80000 2.10000 1.50000
1.30000 -0.45000 1.70000 2.50000
2.50000 1.13000 0.48000 0.50000

(1/0.2)R1 1.00000 -9.00000 10.50000 7.50000


R2-(1.3/0.2R1) 0.00000 11.25000 -11.95000 -7.25000
R3-(2.5/0.2R1) 0.00000 23.63000 -25.77000 -18.25000

R1+(9/11.25R2) 1.00000 0.00000 0.94000 1.70000


1/11.25R2 0.00000 1.00000 -1.06222 -0.64444
R3-(23.65/11.25R2) 0.00000 0.00000 -0.66969 -3.02178

R1+0.94/0.66969R3 1.00000 0.00000 0.00000 -2.54148 x


R2+1.0622/0.66969R3 0.00000 1.00000 0.00000 4.14853 y
1/-0.66969R3 0.00000 0.00000 1.00000 4.51221 z
EXERCISE #1
For #5 Gauss-Elimination

Solve the system by the following methods.


x y z k
A 0.20000 -1.80000 2.10000 1.50000
1.30000 -0.45000 1.70000 2.50000
2.50000 1.13000 0.48000 0.50000

R1 0.20000 -1.80000 2.10000 1.50000


R2-((1.3/0.2)*R1) 0.00000 11.25000 -11.95000 -7.25000
R3-((2.5/0.2)*R1) 0.00000 23.63000 -25.77000 -18.25000

R1 0.20000 -1.80000 2.10000 1.50000


R2 0.00000 11.25000 -11.95000 -7.25000
R3-(23.63/11.25*R2) 0.00000 0.00000 -0.66969 -3.02178

BACK SUBSTITUTION: Z 4.51221


Y 4.14853
X -2.54148

Vous aimerez peut-être aussi