Advertisements
Advertisements
Question
Solve the following equation by Gauss-Seidel method upto four iterations
4x-2y-z=40, x-6y+2y=-28, x-2y+12z=-86.
Solution
we first write the equationas
x=¼[40+2y+z] ……………………….(1)
`y=1/6[28+x+2y]`...........................(2)
`z=1/12[-86-x+2y]`........................(3)
(i) FIRSTITERATION:-
we start with the approximation y=0, z=0 and then we get from (1),
`thereforex_1=1/4(40)=10`
We use this approximation to find y i.e. put x=0, z=0 in (2)
`therefore y_1=1/6[28+10+2(0)]=6.3333`
We use these values of x1 and y1 to find z1 i.e. we put x=4, y=6.3333 in (3),
`therefore z_1=1/2[-86-10+2(6.3333)]=-6.944`
(ii) SECOND ITERATION:-
We use latest values of y and z to find x i.e. we put y=6.3333, z=-6.9444 in (1)
`thereforex_2=1/4[40+2(6.3333)-6.9444]= 11.4306`
We use this approximation to find y i.e. put x=11.4306, z=-6.9444 in (2)
`thereforey_2=1/6[28+11.4306+2(-6.9444)]=4.2569`
i.e. we put x=11.4306, y=4.2569 in (3),
`therefore z_1=1/12[-86-11.4306+2(4.2569)]=-7.4097`
(iii) THIRD ITERATION:-
We use latest values of y and z to find x i.e. we put y=4.2569, z=-7.40974 in (1)
`thereforex_2=1/4[40+2(4.2569)-7.4097]=10.2760`
We use this approximation to find y i.e. put x=10.2760, z=-7.4097 in (2)
`therefore y_2=1/6[28+10.2760+2(-7.4097)]=3.9094`
i.e. we put x=10.2760, y=3.9094 in (3),
`therefore z_1=1/12[-86-10.2760+2(3.9094)]=-7.3714.`
(iv) FOURTH ITERATION:-
We use latest values of y and z to find x i.e. we put y=3.9094, z=-7.3714 in (1)
`therefore x_2=1/4[40+2(3.9094)-7.3714]=10.1118`
We use this approximation to find y i.e. put x=10.1118, z=-7.3714 in (2)
`therefore y_2=1/6[28+10.1118+2(-7.3714)]=3.8948`
i.e. we put x=10.1118, y=3.8448 in (3),
`therefore z_1=1/12[-86-10.1118+2(3.8948)]=-7.3602.`
Hence ,upto two places of decimals
x=10.11, y=3.89, z=-7.36.