We have the following results.
First iteration
Second iteration
Third iteration
Fourth iteration
Fifth iteration
It is interesting to note that the iterations oscillate and converge to the exact solution
x1 = 1.0, x2 = – 1, x3 = – 1.0.
Note :
What is the disadvantage of the Gauss-Jacobi method?
At any iteration step, the value of the first variable x1 is obtained using the values of the previous iteration. The value of the second variable x2 is also obtained using the values of the previous iteration, even though the updated value of x1 is available. In general, at every stage in the iteration, values of the previous iteration are used even though the updated values of the previous variables are available. If we use the updated values of x1, x2,..., xi-1 in computing the value of the variable xi, then we obtain a new method called Gauss-Seidel iteration method.