Professional Documents
Culture Documents
Unit 2.2
Unit 2.2
JACOBI ITERATION
We write the system as in (4) of section 2.1 as
a 22 x2 = a 21 x1 a 23 x3 ..... a 2 n xn + y 2
...... ......
. . . . . . . .(11)
......
a nn xn = a n1 x1 a n 2 x2 ..... a nn1 x n1 + y n
We start with an initial vector,
x(
0)
x1(0)
(0)
x
= 2 . . . . . . . .(12)
M
(0)
xn
and substitute this vector for x in the RHS of (11) and calculate x1,x2, .., xn and this
vector is called x(1). We now substitute this vector in the RHS of (11) to calculate again
x1, x2, .., xn and call this new vector as x(2) and continue this procedure to calculate the
sequence {x (k) } . Thus,
The equation (11) can be written as,
Dx = - (L + U) x + y . (13)
which we can write as
x = -D-1 (L+U) x +D-1 y,
giving
x = J x + y (14)
where
J = -D-1 (L + U) .(15)
and, we get
x(0)
starting vector
.(16)
(k1)
x = Jx
(k )
+ y for k =1,2,........
57
as the iterative scheme. This is similar to (2 in section 2.1) with the iterating matrix M as
J = -D-1 (L + U); J is called the Jacobi Iteration Matrix. The scheme will converge to the
solution x of our system if J sp < 1 . We shall see an easier condition below:
We have
1
a11
-1
D =
a22
O
1
ann
and therefore
a12
0
a11
a21
0
1
a22
J = D ( L + U ) =
....
....
a
an1
n2
a
ann
nn
a13
a23
a11
....
a22
....
....
....
a11
a2n
a22
....
....
an,n1
ann
a1n
Ri =
j i
aij
aii
If Ri <1
(a
i1
)
aii
then
J
Ri < 1 means
58
.(I)
Let us apply the Jacobi iteration scheme with the initial vector as
(0)
0
= = 0
0
We have A = 1
2
L +U = 1
2
2
0
2
2
1
2
.(II)
1
1
D = 0
0
1 ;
0
0
1
0
0
1
1
y = 0
0
0 2 + 2
J = D 1 (L + U ) = 1 0 1
2 2 0
1
y = D y = 0
0
1
(0 )
0
= 0
0
59
x( ) = Jx(
k
k1)
+ y,
k = 1, 2,.......
1
x = Jx + y = y = 0 since x (0) is the zero vector.
0
(1)
(2 )
( 0)
= Jx
(1)
0 2 + 2 1 1
+ y = 1 0
1 0 + 0
2 2 0 0 0
0 1 1
= 1 + 0 = 1
2 0 2
(3 )
= Jx
(2 )
0 2 2 1 1
+ y = 1 0 1 1 + 0
2 2 0 2 0
2 1 1
= 1 + 0 = 1
0 0 0
x (4 )
0 2 2 1 1
= Jx (3) + y = 1 0 1 1 + 0
2 2 0 0 0
2 1 1
= 1 + 0 = 1 = x (3 )
0 0 0
60
The solution is
x = lim x
k
(k)
=x
(3)
1
= 1
0
We have
8 0 0
D = 0 8 0
0 0 9
D 1
J = D 1 (L + U ) = + 0.125
0.22222
0
= 0
0
1
9
0.25
0
+ 0.25
0.375
0.11111
0
1
y = D y = 2 .375
3.33333
a12 + a13 = 2 + 2 = 4
a 11 > a 12 + a13
a22 = 8 and
a21 + a23 = 1 + 3 = 4;
a 22 > a 21 + a 23
61
a31 + a32 = 2 + 1 = 3
a33 = 9 and
a 33 > a 31 + a 32
0
x 0 = 0
0
x ( k ) = Jx ( k 1) + y
0
0.25
0.25
0
0.375 x ( k 1) + y
= 0.125
0.22222 0.11111
0
(1)
= y = 2 .375
3 .33333
We continue the iteration until the components of x(k) and x(k+1) differ by at most, say;
3x10-5 , that is,
x ( k +1 ) x ( k )
= 3 .33333 . So we
continue
(2 )
(3 )
(4 )
= Jx
(1)
= Jx
(2 )
= Jx
(3 )
2.42708
+ y = 1.00000
3.37500
x (2 ) x (1 )
2 .09375
+ y = 0 .80599 ;
2 .90509
x (3 ) x ( 2 )
1 .92777
+ y = 1 .02387
2 .95761
x ( 4 ) x (3 )
= 1.42708
= 0.46991
= 0 .21788
62
(5 )
(6 )
(7 )
(8 )
(9 )
x (10 )
(11 )
(12 )
1 .99537
+ y = 1 .02492
3 .01870
x (5 ) x ( 4 )
2 .01091
= Jx (5 ) + y = 0 .99356
3 .00380
x ( 6 ) x (5 )
1 .99934
+ y = 0 .99721 ;
2 .99686
x ( 7 ) x (6 )
= Jx
= Jx
(4 )
(6 )
1 .99852
= Jx (7 ) + y = 1 .00126
2 .99984
= Jx
(8 )
x (8 ) x ( 7 )
2 .00027
+ y = 1 .00025 ;
3 .00047
x (9 ) x (8 )
2 .00018
= Jx (9 ) + y = 0 .99979
2 .99997
= Jx
(10 )
= Jx
(11 )
1 .99994
+ y = 0 .99999
2 .99994
= 0.03136
= 0 .01157
= 0 .00405
= 0 .00176
x (10 ) x (9 )
( )
( )
; x 11 x 10
1 .99998
+ y = 1 .00003 ;
3 .00001
= 0 .06760
x (12 ) x (11 )
= 0 .00050
= 0 .00024
= 0 .00008
63
(13 )
= Jx
(12 )
2 .00001
+ y = 1 .00000
3 .00001
x (13 ) x (12 )
= 0 .00003 =
64