Newton's method and the optimization of nonlinear systems