You are on page 1of 2

Advance Mathematics for ME

Lecture notes and Exercises


Part 2
Gauss-Seidel Method

Given A1w  B1 x  C1 y  D1 z  E1 Equation 1

A2 w  B2 x  C2 y  D2 z  E2 Equation 2

A3 w  B3 x  C3 y  D3 z  E3 Equation 3

A4 w  B4 x  C4 y  D4 z  E4 Equation 4

The matrix of the coefficients is,

 A1 B1 C1 D1 
A B2 C2 D2 
 2
 A3 B3 C3 D3 
 
 A4 B4 C4 D4 

The system should be diagonally dominant, that is, in each row of the coefficient of the matrix, the
absolute value of the element lying on the leading diagonal should exceeds the sum of the absolute value of all
the other elements in the row. Thus,

A1  B1  C1  D1
B2  A2  C2  D2
C3  A3  B3  D3
D4  A4  B4  C4
Then, the Gauss-Seidel method can be applied and the process can be defined as,

1
w  E1  B1 x  C1 y  D1 z  When manipulating equation 1
A1
1
x  E2  A2 w  C2 y  D2 z  When manipulating equation 2
B2
1
y  E3  A3 w  B3 x  D3 z  When manipulating equation 3
C3
1
z  E4  A4 w  B4 x  C4 y  When manipulating equation 4
D4

Example:
10 w  2 x  3 y  2 z  14 
 w  5 x  y  2 z  22 
 
Solve   using Gauss-Seidel method.
 3 w  2 x  8 y  2 z  4 
 w  x  2 y  6 z  5 
If the arrangement of the equations are not diagonally dominant, it is needed to arrange to make it
diagonally dominant before solving.

Solution: Assume that the value of y = 0 and z = 0 and x =0 to get the value of w1 from the derive
formula for finding the w1 value.
1
w1   14   2  0   (3)(0)  (2)(0)   1.400000 (Use this value of w1, y = 0 and z = 0 to get the
10
value of x1)
1
x1   22   1.400000   0  2(0)   4.120000 (Again use this value of x1, w1 and z = 0 to get the value
5
of y1)
1
y1    4  3(1.400000)  2(4.120000)  2(0)  1.005000 (Use the value of w1, x1 and y1 to get the
8
value of z1)
1
z1   5  (1.400000)  (4.120000)  2(1.005000)  1.418333
6
Now we have a new value of w1, x1, y1 and z1 to solve the succeeding value, that is called iteration. In
this method we continuously solving the succeeding value of w, x, y and z until the two consecutive value of
any of the variable are the same result. It means that we get the roots of the variable.

1st iteration: x = 4.120000, y = 1.005000 and z = -1.418333, then find the value of w2, x2, y2, and z2.

1
w2   14   2  4.120000   (3)(1.005000)  (2)(1.418333)   1.161166
10 
(Use this new value of w together with the same value of y and z to get the new value of x, then use again the value of w with
the new value of x and same value of z to get the new value of y, then use the new value of w, x and y to get the new value of z. Do
this procedure to the succeeding iteration)
1
x2   22   1.161166   1.005000  2(1.418333)   4.936100
5
1
y2    4  3(1.161166)  2(4.936100)  2(1.418333)   0.944004
8
1
z2   5  (1.161166)  (4.936100)  2(0.944004)  1.534876
6
The result of succeeding iterations is shown in the table below
Iteration w x y z
Get w = -1.400000 When x = 0 When y = 0 When z = 0
When w = -1.400000 Get x = 4.120000 When y = 0 When z = 0
Get w = -1.400000 Get x = 4.120000 Get y = 1.005000 When z = 0 Consecutive same value
0 -1.400000 4.120000 1.005000 -1.418333 which are the roots of the variable
1 -1.161166 4.936100 0.944004 -1.534876
2 -1.002957 5.002160 0.990712 -1.503949
3 -0.997571 5.000208 0.999975 -1.499638
4 -0.999879 4.999875 1.000105 -1.499924
5 -1.000041 4.999982 0.999999 -1.500004
For the 5th iteration, it can be shown that the value are w = -1, x = 5, y = 1 and z = -3/2 by rounding off the value.

Exercises: Solve with complete solution the following systems of linear equations using Gauss-Seidel method. To
be submitted when the classes resume. This serve as your home study, recitation and assignment.

8w  x  2 y  3 z  10 
2 w  9 x  y  5 z  18 
 
1.  
  w  x  6 y  3 z  2 
 x  2 y  5 z  8 

  a  6b  2c  d  25 
 2a  b  7c  d  9 
 
2.  
 2a  3b  6d  6 
5a  3b  c  2 

You might also like