You are on page 1of 5
Discussion - 1 & 2 An iterative method is a successive approximation method. Consider the system of n linear equations in n unknowns be given by AX=B In iterative methods we start with an initial solution X and improve it step by step following awell defined rules. 1 The Jacobi Iterative method Jacobi method makes two assumptions about the system of equations AX = B; (i) the system hhas a unique solution and (ii) the coefficient matrix A has no zeros on its main diagonal. First, ‘express the given system in the following form: [i — (inks + ass +--+ ainty)] AL an [be — (ania + 23X53 + +++ + dan Xq)] 1 Xn [bn — (Gani X1 + Qy2X2 +++ + Anni %n-1)) ‘Then make an initial guess of the solution, x, = x”,x. = x{),...,x, = x0 and substitute this initial guess into the right-hand side of the above equations to get the first approximations x, = x1, x2 = x1), ...,%, = x1. This completes one iteration. Next substitute the first approx- imation values into the right hand side of the above equations to get the second approximation. By repeating these iterations we get a sequence of approximations which often converges to the actualsolution. Example 1.1. Using Jacobi iteration method, find an approximate solution to the following system of equations. 3x+20y—z=-18 2x— By +20z = 25 1 ¥= pgllT—y +22] a ppt i8-3e+a @ ze qies- 2439) @) Let x =0, y =0, <0 Me wl — (0) + 2(0)] = 0.85. ye yes —3(0) +0] = wes = 2(0) + 3)] = 1.25 1 Fi = x2) = SCNT ~ (0.90) + 201.25)] = 1.020 y= phi —3(0.85) + 1.25] = -0.965 2 = 1.195 -2(0.85) + 3(-0.90)] = 1.030 20) = zi — (-0.965) + 2(1.030)] = 1.0012 y= [-18 — 3(1.020) + 1.030] = -1.0015 8l- 1 28) = 5 [25 ~ 2(1.020) + 3(-0.965)] = 1.0033 BI .0004 x= zu = (-1.0015) + 2(1.0033)] = y= piis- 31.0012) + 1.0033] = -1.0000 2 = A195 202.0012) +3¢-1.0015)] = 0.9997 20 Cae wl — 1.0000) + 2(0.9997)] = 1.0000 ys pis — 3(1.0004) + 0.9997, 2 = 125 2(.0008) + 3¢-1.0000)] = 1.0000 2 Gauss- Siedel Iterative method ‘The Gauss- Siedel method is a minor modification of the Jacobi method. In Gauss- Siedel method once we have obtained an approximation for x; from the first equation, we immediately use it to obtain x, from the next equation in the same iteration. Then use x, and x2, in the same iteration step to obtain x, from the third equtation and so on. Definition 2.1. Ann xn matrix A = [ay] is said to be strictly diagonally dominant if lasl> )) layl forall i dal jet Theorem 2.1. (A sufficient, but not necessary condition) If A is strictly diagonally dominant, then the system AX = B has a unique solution and the successive approximations generated by both the Jacobi and Gauss-Seidel methods converges to this solution for any initial approxima- te Example 2.2. Using Gauss-Seidal iteration method, find an approximate solution to the follow- ing system of equations. 8x—3y+22=20 4x+ly— 33 6x4 3y+ 122 = 36 = 3120+3y-24 a) v= POB-4r+a Q) 1 z= 75136 -6x—3y] 8) Let = 0, ¥ =0, M=0 = 720+ 30) - 2(0)] = 2.5 y= 73-40. 5) +0] = 2.0909 Ms 06 = 6(2.5) — 3(2.0909)] = 1.2273 w= zi20 +3(2.0909) — 2(1.2273)] = 2.9773 y? 4B —4(2.9773) + 1.2273] = 2.0289 ae Hho ~ 6(2.9773) — 3(2.0289)] = 1.0041 = zi20 +3(2.0289) — 2(1.0041)] = 3.0098 y= 73 — 4(3.0098) + 1.0041] = 1.9968 As Hoe ~ 6(3.0098) — 3(1.9968)] = 0.9959 3 #9 = =[20 + 3(1.9968) — 2(0.9959)] = 2.9998 y? 4 [33 — 4(2.9998) + 0.9959] = 1.9997 2 = L136 — 62.9998) -3(1.9997)1 = 0002 a zl20 + 3(1.9997) ~ 2(1.0002)] = 2.9998 ya qe ~ 4(2.9998) + 1.0002] = 2.0001 Pa poe — 6(2.9998) — 3(2.0001)] = 1.0001 Example 2.3. Using Gauss-Seidel method, solve the following system of equations Sx-y=9 —x+Sy-z=4 ~y+5e 6 Here the given system of equations satisfies the diagonal dominance conditions. We approx- imate the values upto four places of decimal. xs z+) a ye qexed @ z= 26491 ® Let 2 =0, 9 =0, 2 =0 xs 39 +0}=18 3 = 1441840) = 116 Me qh6+ 1.16] = -0.968 x= H9+ 1.16] = 2.032 y= L144 2.032 0968} = 1.0128 Ma i-6 + 1.0128] = -0.9974 29 = 19 + 1.0128) = 2.0026 ya 34 + 2.0026 — 0.9974] = 1.0010 = 3-6 + 1.0010] = -0.9998 4 2 = 119+ 10010) = 2.0002 y= d+ 2.0002 —0.9998] = 1.0000 w= gl-6+ 1.0000] = —1.0000 = 39+ 1.0000} = 2.0000 yo = is + 1.0000] = -1.0000 34 + 2.0000 — 1.0000] = 1.0000 2.1 Exercise 1. Apply Gauss-Seidel method to solve the equations : 10x-2y +z = 12, x49y—z= 10, 2x—y+11z=20 2. Apply Gauss-Seidel method to solve the equations : 10x+y+z= 12, 2x+ lOy+z= 13, x+y 452 = 3. Apply Jocobi method to solve the equations : Sx 2y +3: 3x4 9y+2=2, 2x-y-72=3

You might also like