linear and nonlinear equation solvers (Jacobi and Powell)