Professional Documents
Culture Documents
CE304-Unit 3-Lect3-Jumah2018
CE304-Unit 3-Lect3-Jumah2018
Iterative Method
Gauss-Seidel Method
(2)
1
Gauss-Seidel Method
Suppose that we limit ourselves to a 3x3 system in form
of [A]{x}={B}
1) The first equation can be solved for x1, the second
equation for x2, and third equation for x3 to yield:
1. b1 a12 x2j 1 a13 x3j 1
x1j (11.5a)
(12.1a)
a11 j and j-1 are
j 1
b2 a21 x a23 xj
the present
x2j 1 3
(11.5b)
(12.1b)
a22 and previous
b3 a31 x1j a32 x2j
x
3
j
(12.1c) iterations
(11.5c)
a33
(3)
2
Gauss-Seidel Method
(5)
a 33
Use initial guess x2, x3 are zero
(6)
3
First iteration:
7.85 0.1(0) 0.2(0)
x11 =2.616667
3
19.3 0.1(2.616667) 0.3(0)
x21 =-2.794524
7
71.4 0.3(2.616667) 0.2( 2.794524)
x31 =7.005610
10
Second iteration:
7.85 0.1() 0.2()
x12 =2.990557
3
19.3 0.1(2.990557) 0.3(7.005610)
x22 = -2.499625
7
71.4 0.3(2.990557) 0.2(-2.499625)
x32 = 7.000291
10
(7)
2.990557 2.616667
a ,1 100% 12.5%
2.990557
2.499625 ( 2.794524)
a ,2 100% 11.8%
2.499625
7.000291 7.005610
a ,3 100% 0.076%
7.000291
(8)
4
Gauss-Seidel Method: Pitfall
What went wrong?
Even though done correctly, the answer is not converging
to the correct answer
This example illustrates a pitfall of the Gauss-Siedel
method: not all systems of equations will converge.
Is there a fix?
One class of system of equations always converges: One with a
diagonally dominant coefficient matrix.
Diagonally dominant: [A] in [A] [X] = [C] is diagonally
dominant if:
n n
aii aij for all ‘i’ and a ii aij for at least one ‘i’
j 1 j 1
j i j i
(9)
(10)
5
Relaxation of G_S method
(12)