ITERATIVE METHODS FOR SOLUTION OF SYSTEMS OF LINEAR EQUATIONS


We have these equations:

 5x-2y+z=3
-x-7y+3z=-2
2x-y+8z=1
Solve each of the unknowns in terms of the others.
x=(3+2y-z)/5
y=(x-3z-2)/-7
z=(1-2x+y)/8
Give initial values to the unknowns.
x1=0
y1=0
z1=0
By Jacobi:
Replace in each equation the initial values, this will give new values to be used in the next iteration.
x=(3+2*0-0)/5=0,60
y=(0-3*0-2)/-7=0,28
z=(1-2x+y)/8=0,12
For Gauss-Seidel
Replace the values in each equation but found next.
x=(3+2*0-0)/5=0,6
y=(0,6-3*0-2)/-7=0,2
z=(1-2*0,6+0,2)/8=0
It performs many iterations you want, using as initial values the new values found. You can stop the execution of the algorithm to calculate the error of calculation, which we can find with this formula: sqr
((x1-x0) ^ 2 + (y1-y0) ^ 2 + (z1-z0) ^ 2).

With jacobi
 


With Gauss-Seidel


 The main difference is that the method of gauss_seidel uses the values found immediately, then makes the whole process faster, and consequently makes this a more effective method.

The formulas used in the excel sheet for the method of Jacobi is
=(3+2*D5-E5)/5
=(C5-3*E5-2)/-7
=(1-2*C5+D5)/8
=RAIZ((C6-C5)^2 + (D6-D5)^2 + (E6-E5)^2)
Corresponding to the variable X, Y, Z and failure respectively.

And to the Gauss-Seidel:
=(3+2*J5-K5)/5
=(I6-3*K5-2)/-7
=(1-2*I6+J6)/8
=RAIZ((I6-I5)^2 + (J6-J5)^2 + (K6-K5)^2)