Académique Documents
Professionnel Documents
Culture Documents
page 3-26
Gauss-Seidel Method
For many systems with a large number of equations, the elimination methods seem
to be less efficient. This is because most of the elements of the coefficient matrix A
are zero i.e. the matrix A is extremely sparse. An iterative procedure based on an
initial guess is suggested. In iterative methods, RErs are not the major concern here
since we can control the level of error. Gauss-Seidel iteration is the most popular
and one of the most powerful iterative techniques available for solutions of LAEs.
Consider the following set of three LAEs,
a11x1 + a12x2 + a13x3 = b1
a21x1 + a22x2 + a23x3 = b2
a31x1 + a32x2 + a33x3 = b3
Solving the above three equations each for x1, x2, and x3, respectively, yields
b1 a12 x2 a13x3
a11
b a 21x1 a23x3
x2 2
a 22
x1
x3
b3 a31x1 a 32 x2
a 33
(3.20)
zar97/09/03
page 3-27
To solve eq.(3.20), initial guesses for x1, x2, and x3 are needed. Lets denote these
initial guesses as x1(0) , x2(0) , and x3(0) , the new values are then
x1(1)
x2(1)
b2 a21x1(1) a 23x3(0)
a 22
x3(1)
Note that the new estimate of xi(k) is immediately used in the subsequent equations.
This is where it is different from the Jacobi method. The iteration continues until the
convergence criterion is satisfied. Most commonly used convergence criterion is
a, j
x j (k) x j (k 1)
x j (k)
100 % < s
(3.21)
for all unknowns xj where xj(k) and xj(k-1) are the new and old values, respectively.
Remark:
The method is best employed when the matrix of coefficients is diagonally
dominant; that is when
n
aii
aij
(3.22)
i , j 1,i j
That is the diagonal element in each of the equations must be larger that the sum of
the absolute values of the other elements in the equation. This is to ensure that the
method converges to the exact solution. Thus, the criterion is a sufficient condition
but not necessary.
zar97/09/03
page 3-28
30 2 x2 3x3
8
1 x1 2 x3
x2
9
31 2 x1 3x2
x3
6
x1
k
0
1
2
3
4
x1
1.0
3.1250
2.1745
2.0220
2.0034
a,1
68.0
43.1
7.54
0.93
x2
1.0
0.4583
0.9963
0.9899
0.9999
a,2
118.2
54.0
0.64
1.0
x3
1.0
3.8959
3.9437
3.9977
3.9989
a,3
74.3
1.21
1.33
0.03
After four iterations the solution seems to be converging. Thus, the estimate of the
solution is x = [2.0034, 0.9999, 3.9989]T . The exact answer is [2, 1, 4]T.
zar97/09/03
page 3-29
(3.23)
= 1
0< < 1
1< < 2
: no modification.
: underrelaxation.
: overrelaxation. (or better known as Successive
Overrelaxation, SOR).
zar97/09/03
page 3-30
30 2 x2 3x3
30 2(1.0) 3(1.0)
31250
.
x1(1) (1.1)(3.1250) ( 0.1)1 3.3375
8
8
1 x1 2 x3 1 (3.3375) 3(1.0)
x2
0.4819
x2 (1) (1.1)(0.4819) ( 0.1)1 0.4301
9
9
31 2 x1 3x2 31 2(3.3375) 3(0.4301)
x3
k
0
1
2
3
4
Answer:
x1
1.0
3.1250
1.9971
a,1
-
x2
1.0
0.4819
0.9893
a,2
-
x3
1.0
3.8391
4.0102
a,3
-