Sie sind auf Seite 1von 15

NUMERICAL ANALYSIS

Lecture -17

Muhammad Rafiq
Assistant Professor
University of Central Punjab
Lahore Pakistan
Diagonally Dominant System
Consider the system
a1x + b1y + c1z = d1
a2x + b2y + c2z = d2
a3x + b3y + c3z = d3
The above system is called diagonally dominant if
| a1| ≥ |b1| + |c1|
| b2| ≥ |a2| + |c2|
| c3| ≥ |a3| + |b3|
For Example:
8x - 3y + 2z = 20
4x +11y – z = 33
6x + 3y + 12z = 35
Jacobi Iteration Method
This method is also known as Guass-Jacobi method, consider the following
system:
a1x + b1y + c1z = d1 ………. (1a)
a2x + b2y + c2z = d2 ………. (1b)
a3x + b3y + c3z = d3 ………. (1c)
Assume that the system is diagonally dominant, solving equations
(1a)(1b)(1c) for x,y,z respectively.
x = [d1 – b1y – c1z]

y= [d2 – a2x – c2z]

z = [d3 – a3x – b3y]


Let x = x0 , y = y0 & z = z0 be the initial approximations of unknowns x,y and z
respectively.
Ist Approximation

x1 = [d1 – b1y0 – c1z0]

y1 = [d2 – a2x0 – c2z0]

z1 = [d3 – a3x0 – c3y0]

2nd approximation
x2 = [d1 – b1y1 – c1z1]

y2 = [d2 – a2x1 – c2z1]

z2 = [d3 – a3x1 – c3y1]


If xn , yn and zn be the nth iterates then
xn+1 = [d1 – b1yn – c1zn]

yn+1 = [d2 – a2xn – c2zn]

zn+1 = [d3 – a3xn – c3yn]


The process is continued till the convergence is secured.

NOTE:-
In the absence of any better estimates, the initial approximations are taken
as x0=0,y0=0 and z0=0.

Example:-1
Solve by Jacobi Iteration method the following system and give the answer
correct to 4 dp.
8x-3y+2z=20; 6x+3y+12z=35; 4x+11y-z=33
Solution:-

First write the system in diagonally dominant form

8x-3y+2z=20
4x+11y-z=33
6x+3y+12z=35

Solving the above equation for x,y and z

x= [20 + 3 − 2 ]
y= [33 − 4 + ]
z= [35 − 6 − 3 ]
Let x0=0 , y0=0 and z0=0
Ist Approximation
x1 = [20 + 3(0) − 2(0)] = 2.5
y1 = [33 − 4(0) + 0] = 3
z1 = [35 − 6(0) − 3(0)] = 2.916667

2nd Approximation
x2 = [20 + 3(3) − 2(2.916667)] = 2.895833
y2 = [33 − 4(2.5) + 2.916667] = 1.825758
z2 = [35 − 6(2.5) − 3(3)] = 0.916667

3rd Approximation
x3 =2.955492
y3 =2.030302
z3 =1.012310
4rd Approximation
x4 =3.00835
y4 =2.017303
z4 =0.931345

5th Approximation
x5 =3.023652
y5 =1.990745
z5 =0.908190

6th Approximation
x6 =3.019479
y6 =1.9830536
z6 =0.907145

7th Approximation
x7 =3.016856
y7 =1.9844762
z7 =0.9111637
8th Approximation
x8 =3.016387
y8 =1.985794
z8 =0.9111637

9th Approximation
x9 =3.016878
y9 =1.986022
z9 =0.9119676

10th Approximation
x10 =3.016766
y10 =1.98585
z10 =0.911821
11th Approximation
x11 =3.01676
y11 =1.98588
z11 =0.911813

After 11 iterations the correct answer is


x=3.0167
y=1.9858
z=0.9118
Example:- 2 Solve by Jacobi Iteration method the following system and give
the answer correct to 4 dp.

5x+2y+2z= 12 ; x+4y+2z= 15 ; x+2y+5z= 20


Solution:
x= ⅕ [12-2y-2z]
y= ⅟4 [15-x-2z]
z= ⅕ [20-x-2y]
1st Approximation:
x0= 0; y0=0; z0=0
x1= ⅕ [12-2(0)-2(0)] = 2.4
y1= ⅟4 [15-0-2(0)] = 3.75
z1= ⅕ [20-0-2(0)] = 4
2nd Approximation:
x2= -0.7
y2= 1.925
z2= 3.51

3rd Approximation:
x3= 0.366
y3= 1.9035
z3=3.1656
4th Approximation:
x4= 0.37244
y4= 2.07419
z4=3.095836

5th Approximation:
x5= 0.3319896
y5= 2.1190816
z5= 3.08596824
6th Approximation:
x6= 0.3179788
y6=2.1275211
z6=3.085395762
7th Approximation:
x7= 0.3148332
y7=2.128593
z7=3.0855958

8th Approximation:
x8= 0.314324
y8=2.1286210
z8=3.085686

9th Approximation:
x9= 0.3142768
y9= 2.12858
z9= 3.08570
10th Approximation:
x10= 0.3142
y10= 2.1285
z10=3.0857

Therefore,
x= 0.3142
y=2.1285
z= 3.0857
__________________________
Exercise

Solve the following systems by using Jacobi iteration method and give
answers correct to 4dp.
Question no. 1

2x+y+z=4 ; x+2y+z=4 ; x+y+2z=4

Question no. 2

28x+4y3z=32 ; x+3y+10z=24 ; 2x+17y+4z=35

Question no. 3

3x+4y+15z=54.8 ; x+12y+3z=39.66 ; 10x+y-2z=7.74

Question no. 4

10x-2y-2z-w=3 ; -2x+10y-z-w=15 ; -x-y+10z-2w=27 ;-x-y-2z+10w=-19

Das könnte Ihnen auch gefallen