1
Jacobi Iteration
Jacobi Iteration
1 (0)
i 1 n
x i( 1 ) = bi a ij x j a ij x j
(0)
a ii 1 b i 1 a x ( k ) n a x ( k )
j = 1 j = i + 1
x i( k +1 ) = ij j
a ii i j =1 ij j j = i +1
( i = 1, 2,..., n )
( i = 1,2,..., n) OR
1
n
x i( k + 1) = x i( k ) + bi a ij x (jk ) ( i = 1,2,..., n) R i( k )
a ii
xi
( k + 1)
= xi
(k )
+
j =1
a ii
i 1 n
R (k ) = bi
i j =1
a ij x (jk ) - a
j=i
(k )
ij x j
Gauss--Seidel
Gauss Gauss--Seidel
Gauss
Diagonal dominance is a sufficient condition for convergence 1 i 1 n
(k)
x i( k +1 ) = bi a ij x j a ij x j
( k +1 )
bi a ij x j a ij x j
1 i 1 n
OR
x i( k +1 ) = ( k +1 ) (k )
a ii j =1 j = i +1
Ri( k )
( i = 1,2,..., n) x i( k +1 ) = x i( k ) +
aii
i 1 n
R ( k ) = bi a ij x (j k +1 ) - a ij x (j k )
i
j =1 j=i
2
Example using Gauss-
Gauss-Seidel
Comparison
Jacobi
k x1 X2 X3 X4 X5
16 25 35.714286 42.857140 35.714286 25
0 0 0 0 0 0
: : :
1 25 31.25 32.8125 26.953125 23.925781
18 25 35.714285 42.857143 35.714285 25
2 26.074219 33.740234 40.173340 34.506226 25.191498
Seidel
: : : : : :
15 25 35.714286 42.857143 35.714286 25
15 25 35.714286 42.857143 35.714286 25
Successive Over-
Over- Successive Over-
Over-relaxation
relaxation k X2 X3 ( k +1 ) (k) Ri( k )
xi = xi + (i = 1,2,..., n)
Southwell observed that 0 0 0 aii
in many cases the 1 25 25 i 1 n
changes were always in 2 31.25 37.5 R( k ) = bi aij x (j k +1) - aij x (j k ) (i = 1,2,..., n)
the same direction i
j =1 j=i
3 34.375 40.625
Overcorrecting (i.e.,
over--relaxing) the value
over 4 35.15625 42.1875
of xi by the right amount
If = 1.0, we get Gauss-
Gauss-Seidel
accelerates : If 1<
1<
<2, we get an over-
over-relaxed system
convergence. 16 35.714286 42.85714
0 Does not change the final solution, since it
: multiplies the residual Ri, which approaches
18 35.714285 42.85714 zero when the final solution is reached
3
Successive Over-
Over-relaxation Example:
(k)
Ri In the previous example, the number of iterations
xi( k +1) = xi( k ) + (i = 1,2,..., n)
aii required to achieve an accuracy of 0.000001
i 1 n using (Succesive Over-
Over-Relaxation) SOR.
R( k ) = bi aij x (j k +1) - aij x (j k )
i
(i = 1,2,..., n)
j =1 j=i
3
Error Accuracy
Convergence
Achieved when accuracy criterion is satisfied
( x )
( x ) i max
relative i max
xi
n n ( x )
( x ) i
relative i
i =1 i =1 xi
1/ 2
n x
2
( (x ) )
n
i
2
1/ 2
relative i
i =1 x i
i =1