Professional Documents
Culture Documents
Solving System of Linear Non-Homogeneous Equations: Jacobi'S Iteration Method
Solving System of Linear Non-Homogeneous Equations: Jacobi'S Iteration Method
Where the coefficients of the diagonal elements are all not equal to zero and large
compared to the other coefficients. Systems of this type are known as diagonally
dominant systems.
The solution to the above system is obtained by iteration method called Jacobi’s iteration
method.
1
x 1= [ b −a x −a x ]
a11 1 12 2 13 3
1
x 2= [ b −a x −a x ]
a22 2 21 1 23 3
1
x 3= [ b −a x −a x ] … … … … …..(2)
a33 3 31 1 32 2
Suppose x 1(0 ) , x2( 0) , x 3( 0 ) are the initial approximate values of x1,x2,x3 with satisfy equation
(2). Substituting these values in to the right sides of equations (2), we obtain a system of
first approximation of x1,x2,x3 or first iterates, given by
1
x 1( 1) = [ b −a x ( 0)−a13 x 3(0 ) ]
a11 1 12 2
1
x 2( 1) = [ b −a x (0)−a23 x 3(0 ) ]
a 22 2 21 1
1
x 3 ( 1) = [ b −a x (0 )−a32 x 2(0 ) ] … … … … ..(3)
a 33 3 31 1
Substituting x 1(1) , x 2(1 ) , x 3(1) for x1,x2,x3 in the right sides of equations (2), we obtain the
second iterates, given by
1
x 1( 2) =
a 11
[ b1−a 12 x 2( 1) −a13 x 3(1) ]
1
x 2( 2) = [ b −a x (1)−a23 x 3(1 )]
a 22 2 21 1
1
x 3 ( 2) =
a 33
[ b3−a31 x 1(1)−a32 x 2(1 )] … … … … ..(4)
1
x 1(k+1 )=
a11
[ b1 −a12 x 2(k )−a 13 x 3(k ) ]
1
x 2(k+1 )= [ b −a x ( k )−a 23 x 3(k ) ]
a22 2 21 1
1
x 3(k +1)=
a33
[ b 3−a 31 x1( k )−a32 x 2(k ) ]
The process of iteration is stopped when the desired order of approximation is reached or
two successive iterations are nearly the same.
We can extend this method to ‘n’ equations in ‘n’ unknowns. This method is known as
the Jacobi’s iteration method.
Note: In this method, the process of iteration starts with some initial approximation to
the solution, namely x 1(0 ) , x2( 0) , x 3( 0 ) . This initial solution is chosen as zero solution.
Problems
1. Using Jacobi’s iteration method, solve the system of equations 10x+2y+z = 9,
x+10y-z = -22, -2x+3y+10z = 22
Solution: We observe that given system is diagonally dominant.
Then given equations can be written as
1
x= [ 9−2 y −z ]
10
1
y= [ z−x−22 ]
10
1
z= [ 22=2 x−3 y ] … … … … … … … ..(1)
10
Substituting these values in R.H.S of equation (1), we get the second approximate
solution as
1 1 11.2
x ( 2 )= [ 9−2 y (1 )−z (1) ]= [ 9−2 (−2.2 )−2.2 ] = =1.12
10 10 10
1 1 −20.7
y (2 )= [ z (1)−x ( 1)−22 ] = [ 2.2−0.9−22 ]= =−2.07
10 10 10
1 1 30.4
z (2 )= [ 22+ 2 x (1 )−3 y (1) ]= [22+2 ( 0.9 ) −3 (−2.2 ) ] = =3.04
10 10 10
Again, substituting these values in R.H.S of equation (1), we get the third
approximate solution as
1 1 10.1
x (3 )= [ 9−2 y (2 )−z (2 )] = [ 9−2 (−2.07 ) −3.04 ] = =1.01
10 10 10
1 1 −20.08
y (3 )= [ z (2) −x( 2)−22 ]= [ 3.04−1.12−22 ] = =−2.008
10 10 10
1 1 30.45
z (3 )= [ 22+ 2 x (2 )−3 y (2 )] = [ 22+ 2 ( 1.12 )−3 (−2.07 ) ]= =3.045
10 10 10
Again, substituting these values in R.H.S of equation (1), we get the next approximate
solution as
1
x (4 )= [ 9−2 y (3)−z ( 3) ]= 1 [ 9−2 (−2.008 )−3.045 ]= 9.971 =0.9971
10 10 10
1 ( 3) ( 3 )
[ z −x −22 ]= 1 [ 3.045−1.01−22 ] = −19.965 =−1.9965
y ( 4) =
10 10 10
1 1 30.044
z (4 )= [ 22+2 x (3)−3 y ( 3) ] = [ 22+2 ( 1.01 )−3 (−2.008 ) ]= =3.0044
10 10 10
Again, substituting these values in R.H.S of equation (1), we get the next approximate
solution as
1
x (5 )= [ 9−2 y ( 4)−z ( 4 ) ]= 1 [ 9−2 (−1.9965 )−3.0044 ]= 9.9886 =0.9989
10 10 10
1 1 −19.9927
y (5 )= [ z (4 )−x (4 )−22 ]= [ 3.0044−0.9971−22 ] = =−1.9993
10 10 10
1 1 29.9837
z (5 )= [ 22+ 2 x ( 4)−3 y ( 4 ) ]= [ 22+ 2 ( 0.9971 ) −3 (−1.9965 ) ]= =2.9984
10 10 10
Again, substituting these values in R.H.S of equation (1), we get the next approximate
solution as
1
x (6 )= [ 9−2 y ( 5)−z (5 ) ]= 1 [ 9−2 (−1.9993 ) −2.9984 ]= 10.0002 =1.00002=1.0000
10 10 10
1 1 −20.0005
y (6 )= [ z (5 )−x (5)−22 ] = [ 2.9984−0.9989−22 ] = =−2.00005=−2.000
10 10 10
1 1 29.9957
z (6 )= [ 22+2 x (5 )−3 y (5 ) ]= [ 22+2 ( 0.9989 )−3 (−1.9993 ) ] = =2.99957=2.9996
10 10 10
Again, substituting these values in R.H.S of equation (1), we get the next approximate
solution as
1
x (7 )= [ 9−2 y ( 6)−z (6 ) ]= 1 [ 9−2 (−2 )−2.9996 ]= 10.0004 =1.00004=1.0000
10 10 10
1 1 −20.0004
y (7 )= [ z (6 )−x (6 )−22 ] = [ 2.9996−1−22 ] = =−2.00004=−2.000
10 10 10
1 1 30
z (7 )= [ 22+2 x ( 6)−3 y (6 ) ]= [ 22+2 ( 1 )−3 (−2 ) ]= =3
10 10 10
We note that the solutions in the 6th and 7th iterations are nearly equal. So we stop the
iteration process, and take the solution of the system as x = 1,y = -2, z = 3.
2. Solve the equations 5x-y+3z =10, 3x+6y =18, x+y+5z = -10 by Jacobi’s method with
(3,0,-2) as the initial approximation to the solution.
We observe that the solutions in the 9th and 10th iterations are nearly equal.
⸫ The solution of the equations are x =4, y = 1, z = -3.