
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























to check if error is within a pre-specified tolerance.
Algorithm
A set of n equations and n unknowns:
a 11 (^) x 1 + a 12 x 2 + a 13 x 3 +... + a 1 n xn = b 1
a 21 (^) x 1 + a 22 x 2 + a 23 x 3 +... + a2n xn = b 2
an (^) 1 x 1 + an 2 x 2 + an 3 x 3 +...+ annxn = b n
.. .. ..
If: the diagonal elements are
non-zero
Rewrite each equation solving
for the corresponding unknown
ex:
First equation, solve for x 1
Second equation, solve for x 2
Algorithm
Rewriting each equation
11
1 12 2 13 3 1 1 a
c a x a x a x x
ļļ
nn
n n n nn n n
n n
n n n n n n n n n n
n n
a
c a x a x a x x
a
c a x a x a x a x x
a
c a x a x a x x
1 1 2 2 , 1 1
1 , 1
1 1 , 1 1 1 , 2 2 1 , 2 2 1 , 1
22
2 21 1 23 3 2 2
ā ā
ā ā
ā ā ā ā ā ā ā ā
ļ ļ
ļļ
ļ ļ ļ
ļļ
From Equation 1
From equation 2
From equation n-
From equation n
Algorithm
General Form for any row āiā
, 1 , 2 , ,.
1
i n a
c a x
x
ii
n
j i
j
i ij j
i = ļ
ā
=
ā
ā
=
















n
n-
2
x
x
x
x
1
1
ļ
Assume an initial guess for [X] Use rewritten equations to solve for
each value of xi.
Important: Remember to use the
most recent value of xi. Which means to apply values calculated to
the calculations remaining in the
current iteration.
Gauss-Seidel Method: Example 1
Time, Velocity
5 106.
8 177.
12 279.
The upward velocity of a rocket
is given at three different times
The velocity data is approximated by a polynomial as:
( ) , 5 t 12. 2 3
2 1 v t = a t + a t + a ⤠ā¤
t ( )s v ( m/s)
Table 1 Velocity vs. Time data.
Gauss-Seidel Method: Example 1
3
2
1
3
2 3
2
2 2
1
2 1
v
v
v
a
a
a
t t
t t
t t
3
2
1










=




















2
2
8
144 12 1
64 8 1
25 5 1
3
2
1
a
a
a
Using a Matrix template of the form
The system of equations becomes
Initial Guess: Assume an initial guess of










=










5
2
1
3
2
1
a
a
a
Gauss-Seidel Method: Example 1
3
2
1
a
a
a (^) 3. 6720
25
a 1 =
( ) ( )
a 2 = ā
( ) ( )
a 3 =ā
Initial Guess
When solving for a 2 , how many of the initial guess values were used?
Gauss-Seidel Method: Example 1










ā
= ā










36
8510
6720
3
2
1
a
a
a
new i
old i
new i a (^) i x
x x
100 72. 76 %
6720
6720 1. 0000 a (^1) =
ā ā = x
100 125. 47 %
8510
8510 2. 0000 a (^2) = ā
ā ā ā = x
100 103. 22 %
36
36 5. 0000 a (^3) = ā
ā ā ā = x
Finding the absolute relative approximate error
At the end of the first iteration
The maximum absolute
relative approximate error is
125.47%
Gauss-Seidel Method: Example 1
Finding the absolute relative approximate error
100 69. 543 %
056
056 3. 6720 a (^1) =
ā ā = x
x 100 85. 695 %
882
882 7. 8510 2 = ā
ā ā ā ā a =
( ) 100 80. 540 %
34
34 155. 36 a (^3) = ā
ā ā ā ā = x
At the end of the second iteration










ā
= ā










54
882
056
3
2
1
a
a
a
The maximum absolute
relative approximate error is
85.695%
Iteration a 1 a 2 a 3
1 2 3 4 5 6
ā7.
ā54.
ā255. ā1093.
ā4577.
ā 19049
ā155.
ā798.
ā3448. ā 14440
ā 60072
ā 249580
Gauss-Seidel Method: Example 1



















0857
690
29048
a
a
a
3
2
1
Repeating more iterations, the following values are obtained
% a 1 ā (^) % a 2
a 3
Notice ā The relative errors are not decreasing at any significant rate
Also, the solution is not converging to the true solution of
[ ] 








123 16 1
45 43 1
2 5. 81 34 A










=
96 34 129
23 53 5
124 34 56
[B]
Diagonally dominant : The coefficient on the diagonal must be at least
equal to the sum of the other coefficients in that row and at least one row
with a diagonal coefficient greater than the sum of the other coefficients
in that row.
Which coefficient matrix is diagonally dominant?
Most physical systems do result in simultaneous linear equations that
have diagonally dominant coefficient matrices.
Gauss-Seidel Method: Example 2
Given the system of equations
12 x 1 (^) + 3 x 2 - 5 x 3 = 1
x 1 (^) + 5 x 2 + 3 x 3 = 28
3 x 1 + 7 x 2 + 13 x 3 = 76










=










1
0
1
3
2
1
x
x
x
With an initial guess of
The coefficient matrix is:
[ ]









 ā
=
3 7 13
1 5 3
12 3 5
A
Will the solution converge using the
Gauss-Siedel method?