You are on page 1of 11
tect weHio0s N ENGINEERING AND SCENE and ze— 3 (-8)=-1 y= 2andz i. | version method. Consider the equations a+ by +e2=d; asx + bay + 42 | (1) age + byy + ey2 = dy by cy x If ae a b “ x.[3] and od : dy by Cy 2 5 then the equations (1) are equivalent to the matrix equation AX = D (2) Multiplying both sides of (2) by the inverse matrix A+, we get AMAX=A7D or IX lv Ave or X=A1D As] [dy ie. ap dy (3) Cs} [dg where A, B,, ete. are the cofactors of @,, 5,, ete. in the determinant | A |. Hence equating the values of x, y, to the corresponding elements in the product on the right side of (3) we get the desired solution. Obs, This method fails when A is a singular matrix ie. | A | =0. Although this method is quite Seneral, yet it is not suitable for large systems since the evaluation of A-! by cofactors becomes very cumbersome, We shall now explain some methods which can be applied to any number of equations, Example 3.17. Solve the equations 3x + y + 22 = y-2=-3:x4+2y+2z=4 by matrix inversion method. (cf. Example 3.16) [ 1 2) fa Sol. Here A=l2 -3 ~iJ=]a, (say) 12 4} fay x] [Al Ay Ay 3.5 ‘ yl=— |B, By By|x{ dy -3 10 7x/-3 2] l4llc, ce] la 7-5-1) | 4 Heneex=1,y =2,2=-1, \,,(3) Gauss elimination method. In this method, the unknowns vely and the system is reduced to an upper triangular system from which the tnknowns are found by back substitution, ‘The method is quite general and is well-adapted for computer operations, Here we shall explain it by considering a system of three equations for sake of clarity, Consider the equations are eliminated art by te2=d, Ot + by +02 =d, Ok + by + eg =d, (1) SOLUTION OF SIMULTANEOUS ALGEBRAIC EQUATIONS aan Step I. To eliminate x from second and third equations. | uming @, + 0, we eliminate x from the second equation by subtracting (a./a,) times the first equation from the second equation, Similarly we eliminate x from the third equation by eliminating (a./a,) times the first equation from the third equation. We thus, get the new tem ax + by +e,2 = daly +02 byy +02 =d, (2) yee dy Here the first equation is called the pivotal equation and a, is called the first pivot. “Step II. To eliminate y from third equation in (2). uming b,’ ¢ 0, we eliminate y from the third equation of (2), by subtracting (5. times the second equation from the third equation. We thus, get the new system lB) ‘3 ds he pivotal equation and by" Here the second equation is ‘Step III. To evaluate the unknowns The values of x, y, 2 are found from the reduced system (3) by back substitution. the new pivot. Obs. 1. On writing the given equations as Bes this method consists in transforming the coefficient mat elementary row transformations only, ~ ~ 7 Oba 2. Clearly the method will fail if any one of the pivots a, by’ or: ‘ent order so that the pivots are non-Z A to upper triangular matrix ““ becomes zero, In such cases, we rewrite th Obs. 3. Partial and complete pivoting. In the first step, the numerically largest coefficient of x is chosen from all the + and brought as the first pivot by interchanging the first equation with the equation having the I {Micient of x. In the second step, the numerically largest coefficient of y is eetn from the remaining equations (leaving the first equation) and brought as the second pivot by interchanging the second equation equation having the largest coefficient of y. This process is aotaiwed ull we arrive at the equation with the single variable, This modified procedure is called partial pivoting Tf we are not keen about the elimination of x,y,z in a specif stage the numerically largest coefficient of the entire matrix of coefficients. This requires not only an sates hange of equations but alsoan interchange of the position of the variables, "This method of elimination is called complete pivoting. It is more complicated and does not appreciably improve the accurney d order, then we can choose at each Example 3.18. Apply Gauss elimination method to solve the equations x + 4y —2 ; x+y-62=-12;3x-y-z (Mumbai, B. Tech., 2005) Check sum Sol. We hav eal i) -16 ati) 5 ) j) and (iit) — 30 + Step 1. To eliminate x, operate ( eeu ey eay-Bee-7 ~ 8 sald) —1By +22 = 19 8 Step II. To eliminate y, operate (vy - 2 Check sum 73 (vi) Step III. By back-substitution, we get From (vi) : From (iv) : = 1.1408 i si), (148) _ 117 = 1.6479 From (i): -5-4(-8)9(Sr)° a Hence, x = 1.6479, y = — 1.1408, 2 = 2.0845. Note. A useful check is provided by noting the sum “ rehe coefficients and terms on the right, operating con those numbers as on the equations and checking that tho derived equations have the correct sum. 1 4 -1fx] [-5 Otherwise: wore 1 ae 3 -1 -1lz 4 1 4 -3fx] [-5 ot, -Ryn8 yA -3 = ia 0-138 2i[z} | 19 a fi 4 -Hle -5 Operate R,- = Ry |9 ~3 BS\ly|=|_ -7 3-3 10 «0 7u/3\lz} |148/3. Thus, we have z = 148/71 = 2.0845, By = 7 — Bz = 7 ~ 10.4225 = - 8.4295 ive, y = - 1.1408 5 dy +2=—5 +4 (1.1408) + 2.0845 = 1. Hence = 1.6479, =~ 1.1408,2= 2.0845, 46 = 18479 and wu Example 3.19. Solve 10:~ 7y + 32 + 5u=6, - be —Gy_ 22 + 4u=7 by Gauss elimination Ea ae ria Hu =2, ne (C.S.V.T.U., B. Tech., 2007) Sol. We have 10x - Ty + 8z + 5u =6 ee “wm — 6x + By -2-41 5 Sx ty +4z41lu=2 21 bx -9y-22 + 4u=7 5 Step I. To eliminate x, operate | = 3) ] [avo 3 5 \@iy-2 i #0] [uo-2.0) [e050] evi) i w}{in-[ 58)0]: 6.8157895 -Aviii) 16.447368 ix) Step II. To eliminate y, operate [eo - 244736842 + 10.315789u — 2.34210532 + 0.0526315u Step III. To eliminate z, operate | (ix) — = 221 i : 2.4473684 9,9249319u = 9.924597 Step IV. By back-substitution, we get u=lz=-T,y=4andx=5. HeExample 3.20. Using Gauss elimination method, solve the equations : x + 2y + 3z—u = 10, 2x + 3y 32 —u = I, 2x-y + 22 + Bu =7, 3x + 2y 42 + Su = 2. 1 2 3 -I]f[x] [10 ae 2 3 -3 -1lly|_]1 Sol.Wehave |5 _) 9 3i/2|=|7 3 2-4 alle) [2 Operate Ry - 2R,, Ry 2K, Ry- 3%, 1 3-1 0 -9 1 0 -4 05 0-4-1386 1 0- Operate Ry - 5R,, Ry 4Ry | g 0 0 2 alu 48. ‘Thus, we have 41z = 82 ie, 2 = 2. 232 + Qu = 48 ic., 46 + Qu = 48, u=l -1W9ie, -y-18+1=-19, ya2 r+4+6-1=10, x=l 3 i is performed not in the equati i equations above also, ultimately reducing the system to a diagonal pee forme ouch equation involving only one unknown. From these equati reual be eatin ne these equations, the unknowns x, y, z can be |ENCE IN ENGINEERING AND SCI! on for finding the unknowns is saved Thus in this method, the labour of back~ at the cost of additional calculations. jauss, Jordan method A for G ons required Obs. Fora system of 10 equations, the number of entpiatio ea cosh shows that is about 500 whereas for Gauss elimination meta ved 239 erations than the Gauss LO for large systems. though Gauss-Jordan method au 7 APEes is preferred tlimination method, As such Gauss elimination method i ethod to solve the equations See eae (V.T.U., B.E., 2009) wall Sol. We have ; welt) (tii) Bx + dy +52 = 40 2¢i) and (iii) — 30) = Step 1. To eliminate x from (ii) and (i), operate (ii) = wiv) welvi) Step II. To eliminate y from (iv) and (vi), operate (0) + 2 (wand (vi) + 3): (vii) viii) olin) 4 fix) and (viii) ~ 5 = Step III. To eliminate z from (vii) and (wii), operate (of) ~ Hence the solution is x= 1, 9 Otherwise: Rewriting the equations as = A 40 1 1 Mfx] [9 Operate Ry ~2R,,Ry~3R,,]0 -8 2|/y]=|~5 O 1 ile 13 11 fx operate B+ l -5 allyleleg 5 "lo 0 awsjle} | ae { souution OF SIMULTANEOUS ALGEBRAIC EQUATIONS a Operate ~ R, at * 12 Operate R, + 4 R, Operate 4 R, coor orn HoH Operate R, —R,-R, oor ono Hence x = 1,y=3,z=5. Obs. Here the process of elimination of variables amounts to reducing the given coefficient metric to a diagonal matrix by elementary row transformations only. Example 3.22. Solve the equations 10x - 7y + 32 + 5u = 6; - 6x + 8y—z-4u=5; 3x4 ¥+4z + lu = 2 ; 5x - Gy - 2z + 4u = 7 by Gauss-Jordan method. (cf. Example 3.19) Sol. We have 10x — Ty + 32 + 5u =6 — 6x + 8y—2-4u =5 Bx +y 4424+ 1lu=2 Bx -9y— 22+ 4u =7 Step I. To eliminate x, operate [io -()>} [sso -(S)o}[» -(3) °} : 10x — Ty + 32 + 5u = 6 3.8y + 0.82 -u =8.6 B.ly + 3.12 + 9.5u = 0.2 —5.5y — 3.52 + Lou =4 wo} [oso = 10x + 4.4736842z + 3.1578947u = 21.842105 3.8y + 0.82-u = 8.6 2.4473684z + 10.315789u = - 6.8157895 — 2.34210582 + 0,0526315u = 16.447368 Step II. To climinate y, operate [o - nice 2 Ee Second iteration io (3 +2(1.5) + 2.7 + (- 0.9)] = 0.78 y= [15 +2 (0.3) + 2.7 + (- 0.9)] = L.74 .T + (— 0.9)] = 1. (0.3) jo 15 97 403415426 0.9)) = 2.7 10 1 —0.9)] =- 0.18 44> 7g F 9403415 42609)] Proceeding in this way, we get Third iteration 0.9, x, = 1.908, x, = 2.916, x, = - 0.108 Fourth iteration 0.9624, x, = 1.9608, x, = 2.9592, a, = — 0.036 Fifth iteration = 0.9845, x, = 1.9848, x, .9851, x, = - 0.0158 Sixth iteration 2, = 0.9939, = 1.9938, x, = 2.9938, x, = — 0.006 ‘Seventh iteration 9939, x, = 1.9975, x, = 2.9976, x, = — 0.0025 Eighth iteration 999, x, = 1.999, x, 999, x, =~ 0.001 Ninth iteration 9996, x» = 1.9996, x, = 2.9996, x 0.004 Tenth iteration “= 09998, x, = 1.9998, x, = 2.9998, « 0.0001 Hence x, = 1, x, = 2, x5 3,2, =0. (2) Gauss-Seidal iteration method. This is a modifi before the system of equations + 'eation of Jacobi’s method, Ag ax tbytezad, Oe +b 40.2 =d, Or + by tog md, od) is written as . (2) Fey (sax ~ dy) Here also we start with the initia , Approximat which may each be taken as zene: Substituting oe tions xo, y, 29 fOr x,y, 2 pegyeng we get Yo? = yin the est of the eqesbeetivel ‘qwations (2) ~6 1 Lee SOLUTION OF SIMULTANEOUS ALGEBRAIC EQUATIONS ‘Then putting x ‘ in the second of the equations (2), we have 1 Jota ety = 6x29) Next substituting x =.,,3 1 * B15 Gy aay by) and so on Le. as soon as a new approximation for an unknown is found, it is immediately used in the next step, in the third of the equations (2), we obtain S$ proces degree of accura of iteration is repeated till the values of x, y, 2 are obtained to desired Obs. 1. Since the most recent approximations of the unknowns are used while proceeding to the neat step, the convergence in the Gauss-Seidal method is twice as fast as in Jacobi's method. Obs. 2. Jacobi and Gauss-Seidal methods converge for any choice of the initial approximations if in cach equation of the system, the absolute value of the largest co-efficient is almost equal to or in atleast one equation greater than the sum of the absolute values of all the remaining coefficients. Mi Example 3.28. Apply Gauss-Seidal iteration method to solve the equations 20x + y ~ 22 = 17; Bx + 20y~2 =~ 18; 2x~ By +202=25. — (V.T.U,, B. Tech., 2013) (cf. Example 3.25) Sol. We write the given equations in the form a at-y+2) 20 1 4 1 (18-342) di) 20 iii) First iteration Putting y = yo. Puttingx =, in (ii), we have Putting x =x, in (iii), we obtain Putting y =yy,2 =z, in @, we = 1.0025 Putting x = x,,2 = 2 in (ii), we obtain — 0.9998 Putting x = 1 in iD, we get 9998 Peay g NUMERICAL METHODS IN ENGINEERING AND Science Third iteration, we get a (17 ~yq + 224) = 1.0000 20 : Se © 18~ ax, +24) =- 1.0000 20 aia a= x (25 ~ 2x + 3y,) = 1.0000 ‘The values in the 2nd and 3rd iterations being practically the same, we can stop. Hence the solution is x = Lys-lzsl. M Example 3.29. Solve the equations 27x + 6y ~7 = 85, x + y + 5dz = 110; 6x + 1By + 22 = 72 by Gauss-Jacobi method and Gauss-Seidel method. (Anna, B.Tech., 2006) Sol. Rewriting the given equations as x= (5_6y 42) 7 wi) $62) it) a Ba 25 (110-x~y) iit) (a) Gauss-Jacobi’s method We start from an approximation x, = yy =z) = 0 First iteration Second iteration aye + (85 - 6y, +2,) = 2.157 1 Ya ag (72 ~ 6x, ~2e,) = 3.269 1 25 Gy (110-2, -y))= 1.890 Third iteration xy a (85 - 6y, + 2,) = 2.492 Fourth iteration 1 7 X4= 97 (85 ~ Gys + 24) = 2.401 SOLUTION OF SIMULTANEOUS ALGEBRAIC EQUATIONS 1 7g (72 8x, ~ 2es) = 8.545 1 Gq (10-25-95 923 Fifth iteration 1 5 G7 (85— Gy, +2,) = 2.482 Js= < (72 = 6x, - 22,) = 3.583 4 54 Repeating this process, the successive iterations are. 2.423, yg = 3.570, 25 = 1.926 x, = 2.426, y, = 8.574, 2, = 1.926 xq = 2.425, yg = 8.573, 25 = 1.926 Xp = 2.426, yg = 3.573, 2g = 1.926 Hence x = 2.426, y = 3.573, z = 1.926 (b) Gauss-Seidal method First iteration 24= ey (110-5 ~yq) = 1.927 Putting y =) = 0,2 p= 0in@d, 7 (85 ~ 6y +24) = 3.14 Putting x = x,,2 = 25 in (i), n= (72 - 6x, - 229) = 3.541 Putting x =xyy =); in Gi), 22 fy (10-x,-9,)= 1.918 Second iteration 1 93 y= pp (85~ yy +) = 2.492 22,) = 3.572 1 da 8 7g 2-6 1 24 = Gy (1102, -94) = 1.926 Third iteration X= - (85 — Gy, + 25) = 2.426 1 gH zg (12 Gry — 229) = 3.873 1 255 Gq (10 —xy-9) = 1.926 Fourth iteration y= (65 — Gy, +25) = 2.496 7 = (72-6, -22,) = 3.573 My= Gg (12~ 6x, — 224) 1 —x,-y,) = 1.926. 245 Gy (0-24-94 Hence x = 2.426, y = 3.573, 2 = 1.926, i to Gauss. Obs. We have seen that the convergence is quite fast in Gauss-Seidal method as compared to. Jacobi method. Example 3.30. Apply Gouss-Sei ~%3~xy=3;— 24 1+ 10x, ~x5~x)= 15; idal iteration method to solve the equations : 10x, 2x, ITM Hyt MOiy + 254227 ; x, ~ xy ~2x, + 10e,=- 9 (Bhopal, B.E. 2009) (cf. inna 3.27) Sol. Rew: vriting the given equations as 0340.2, + 0.11, + 0.1%, 15 4+0.2e, + 0.1y, + 0.14, 2740.12, #018 + 0244 ~09 + 0.14, + 0.1%, +0.2x5 First iteration Putting x, in @), we get x, Putting x, ‘= 0 in (i), we obtain x. Putting x, =0.3) 25156, x, = 0 in Git), we obtain x Putting x, =0.3, %2= 1.56, x, = 2.886 in (iv), we get. Second iteration 56, . We obtain x, 1368 in (ii), We have x .8869, 9566 in (ie), we get x Third iteration Putting x, = 1.9523, = 2.9566, x, =~ 0.0248 in , we obtain x, = 0.9896 Putting x, = 0.9836, 566, x (i), we Putting x, = 0.9836, ‘4 =~ 0.0248 j in 9, obtain 4 Putting x, 1.9899 1836, 2.9924 Fourth iteration, Proceeding ax aoa ~ 0.0042 %1= 0.9968, x, = 1.9989, « Fifth iteration is x, a ~ 0.0008, Sixth iteration i E = 2 999¢ 88 =~ 9-0001, Hence the solution is x, 9.24 =~ 0.0001 (8) Relaxation methods, Consider the equations axehs

You might also like