Text this: Newton method for nonlinear system with singular Jacobian using diagonal updating