Iterative method with Guass-Seidel and Jacobi methods