Advance Mathematics For MEmodule PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Advance Mathematics for ME

Lecture notes and Exercises

Gauss-Seidel Method

Given A1 x  B1 y  C1 z  D1 Equation 1

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

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

The matrix of the coefficients is,

 A1 B1 C1 
A B2 C2 
 2
 A3 B3 C3 

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
B2  A2  C2
C3  A3  B3
Then, the Gauss-Seidel method can be applied and the process can be defined as,

1
x  D1  B1 y  C1 z  When manipulating equation 1
A1
1
y  D2  A2 x  C2 z  When manipulating equation 2
B2
1
z  D3  A3 x  B3 y  When manipulating equation 3
C3
Example:
4 x  2 y  z  1 
 
Solve 2 x  5 y  z  12  using Gauss-Seidel method.
 x  3 y  6 z  1 
 
The system is diagonally dominant, such that
4  2  1
5  2  1
6 1 3
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 to get the value of x 1 from the derive formula for
finding the x value.
1
x1  1   2  0   0   0.250000 (Use this value of x1 and z remain zero (0) to find the value of y1)
4
1
y1   12   2  0.2500000   0   2.500000 (Again use this value of y1 and the value of x1 to find the
5
value of z1)
1
z1   1  (0.2500000)  3(2.500000)   1.041667
6
Now we have a new value of x1, y1 and z1 to solve the succeeding value, that is called iteration. In this
method we continuously solving the succeeding value of x, y and z until the two consecutive value of any of
the variable are the same. It means that we get the roots of the variable.
2nd iteration: y = -2.500000 and z = 1.041667, then find the value of x2, y2, and z2.
1
x2  1   2  2.500000   1.041667   1.760417
4
1
y2   12   2 1.760417   1.041667   2.895833
5
1
z2   1  (1.760417)  3(2.895833)   0.987847
6
3rd iteration: y = -2.895833 and z = 0.987847, then find the value of x3, y3 and z3.
1
x3  1   2  2.895833  0.987847   1.944878
4
1
y3   12   2 1.944878   0.987847   2.980382
5
1
z2   1  (1.944878)  3(2.980382)   0.999378
6
4th iteration: y = -2.980382 and z = 0.999378, then find the value of x4, y4 and z4.
1
x4  1   2  2.980382   0.999378  1.990035
4
1
y4   12   2 1.990035   0.999378  2.996139
5
1
z4   1  (1.990035)  3(2.996139)  0.999730
6
The result of succeeding iterations is shown in the table below

Iteration x y z
1 0.2500000 -2.500000 1.041667
2 1.760417 -2.895833 0.987847
3 1.944878 -2.980382 0.999378 Consecutive same value
4 1.990035 -2.996139 0.999730 which are the roots of the variable

For the 4th iteration, it can be shown that the value are x = 2, y = -3 and z = 1 by rounding off the value.
Exercises: Solve with complete solution the following systems of linear equations using Gauss-Seidel
method. Submit thru messenger or email in [email protected]. On Friday. This serve as your
home study, recitation and assignment.

 6 x  3 y  2 z   1 
 
1.  x  5 y  3 z  16 
 2 x  3 y  7 z   6 
 

4a  8b  3c  14 
 
2. 6a  2b  c  7 
2a  b  5c  16 
 

3 x  8 y  4 z  11 
 
3. 6 x  2 y  10 z  13
6 x  2 y  z  5 
 

You might also like