Professional Documents
Culture Documents
SEAMBooks SPCE DCCN Gauss Seidel Students
SEAMBooks SPCE DCCN Gauss Seidel Students
SEAMBooks SPCE DCCN Gauss Seidel Students
a1 x + b1 y + c1 z = d1
a2 x + b2 y + c2 z = d 2
a3 x + b3 y + c3 z = d 3
Write equations as
1
x= d1 − b1 y − c1 z Here a1 b1 + c1
a1
1
y= d 2 − a2 x − c2 z Here b2 a2 + c2
b2
1
z= d3 − a3 x − b3 y Here c3 a3 + b3
c3
1
x (1) = d1 − b1 y (0) − c1 z (0)
a1
1
y (1) = d 2 − a2 x (1) − c2 z (0) Use improved value of x obtained in the previous step
b2
1
z (1) = d3 − a3 x (1) − b3 y (1) Use improved value of x and y obtained in the previous steps
c3
1
x (2) = d1 − b1 y (1) − c1 z (1)
a1
1
y (2) = d 2 − a2 x (2) − c2 z (1)
b2
1
z (2) = d3 − a3 x (2) − b3 y (2)
c3
Solved Examples
1. Solve the following system of equations using Gauss Seidel Iterative method
10 x + 2 y + z = 9
x + 10 y − z = −22
−2 x + 3 y + 10 z = 22
2. Solve the following system of equations using Gauss Seidel Iterative method
6 x + 15 y + 2 z = 72
x + y + 54 z = 110
27 x + 6 y − z = 85
3. Solve the following system of equations using Gauss Seidel Iterative method up to four
iterations
4 x − 2 y − z = 40
x − 6 y + 2 z = −28
x − 2 y + 12 z = −86
5. Solve the following system of equations using Gauss Seidel Iterative method
28 x + 4 y − z = 32
x + 3 y + 10 z = 24
2 x + 17 y + 4 z = 35
Example 8.2.1: Solve the following system of equations using Gauss Seidel Iterative method
10 x + 2 y + z = 9
x + 10 y − z = −22
−2 x + 3 y + 10 z = 22
Solution: Here coefficient matrix of the system of equations is diagonally dominant. Dividing
each equation by the dominant diagonal element and rewriting the equations, we have
1
10 x + 2 y + z = 9 x = 9 − 2 y − z − − − − − −(1)
10
1
x + 10 y − z = −22 y = −22 − x + z − − − − − (2)
10
1
−2 x + 3 y + 10 z = 22 z = 22 + 2 x − 3 y − − − (3)
10
10 10
1 1
z ( ) = 22 + 2 x ( ) − 3 y ( ) = 22 + 2 ( 0.9 ) − 3 ( −2.29 ) = 3.067
1 1 1
10 10
10 10
1 1
z ( ) = 22 + 2 x ( ) − 3 y ( ) = 22 + 2 (1.0513) − 3 ( −1.99843) = 3.00978
2 2 2
10 10
10 10
1 1
z (3) = 22 + 2 x (3) − 3 y (3) = 22 + 2 ( 0.99870 ) − 3 ( −1.99889 ) = 2.99940
10 10
10 10
1 1
z ( ) = 22 + 2 x ( ) − 3 y ( ) = 22 + 2 ( 0.99983) − 3 ( −2.00004 ) = 2.99997
4 4 4
10 10
Example 8.2.2: Solve the following system of equations using Gauss Seidel Iterative method
6 x + 15 y + 2 z = 72
x + y + 54 z = 110
27 x + 6 y − z = 85
Solution: Rearranging equations so that the coefficient matrix of the system of equations is
diagonally dominant.
27 x + 6 y − z = 85
6 x + 15 y + 2 z = 72
x + y + 54 z = 110
Dividing each equation by the dominant diagonal element and rewriting the equations, we have
1
27 x + 6 y − z = 85 x = 85 − 6 y + z − − − − − −(1)
27
1
6 x + 15 y + 2 z = 72 y = 72 − 6 x − 2 z − − − − − (2)
15
1
x + y + 54 z = 110 z = 110 − x − y − − − − − −(3)
54
27 27
1 1
y ( ) = 72 − 6 x ( ) − 2 z ( ) = 72 − 6 ( 3.14814 ) − 2 ( 0 ) = 3.54074
1 1 0
15 15
1 1
z ( ) = 110 − x ( ) − y ( ) = 110 − 3.14814 − 3.54074 = 1.91316
1 1 1
54 54
27
1
y( ) = 72 − 6 x ( ) − 2 z ( ) = ________________
2 2 1
15
1
z(
2)
= 110 − x ( ) − y ( ) = ________________
2 2
54
15
1
z ( ) = 110 − x ( ) − y ( ) = ________________
3 3 3
54
15
1
z( ) = 110 − x ( ) − y ( ) = ________________
4 4 4
54
Example 8.2.3: Solve the following system of equations using Gauss Seidel Iterative method
up to four iterations
4 x − 2 y − z = 40
x − 6 y + 2 z = −28
x − 2 y + 12 z = −86
Solution: Here coefficient matrix of the system of equations is diagonally dominant. Dividing
each equation by the dominant diagonal element and rewriting the equations, we have
1
4 x − 2 y − z = 40 x = 40 + 2 y + z − − − − − −(1)
4
1
x − 6 y + 2 z = −28 y = 28 + x + 2 z − − − − − (2)
6
1
x − 2 y + 12 z = −86 z = −86 − x + 2 y − − − (3)
12
6 6
1 1
z( ) = 12 −86 − 10 + 2 ( 6.33333 ) = −6.94444
(1) (1)
− − + =
1
86 x 2 y
12
4
1
y ( 2) = 28 + x ( 2) + 2 z (1) = ________________
6
1
z ( 2) = −86 − x ( 2) + 2 y ( 2) = ________________
12
4
1
y ( ) = 28 + x ( ) + 2 z ( ) = ________________
3 3 2
6
1
z ( ) = −86 − x ( ) + 2 y ( ) = ________________
3 3 3
12
4
1
y ( ) = 28 + x ( ) + 2 z ( ) = ________________
4 4 3
6
1
z ( ) = −86 − x ( ) + 2 y ( ) = ________________
4 4 4
12