Newton's method can be generalized to systems of several non-linear equations and variables. Consider the case with two equations
f1(x1,x2)=0f2(x1,x2)=0,which we Taylor expand to obtain
0=f1(x1+h1,x2+h2)=f1(x1,x2)+h1∂f1/∂x1+h2∂f1/∂x2+…0=f2(x1+h1,x2+h2)=f2(x1,x2)+h1∂f2/∂x1+h2∂f2/∂x2+….Defining the Jacobian matrix ˆJ we have
ˆJ=(∂f1/∂x1∂f1/∂x2∂f2/∂x1∂f2/∂x2),we can rephrase Newton's method as
(xn+11xn+12)=(xn1xn2)+(hn1hn2),where we have defined
(hn1hn2)=−ˆJ−1(f1(xn1,xn2)f2(xn1,xn2)).We need thus to compute the inverse of the Jacobian matrix and it is to understand that difficulties may arise in case ˆJ is nearly singular.
It is rather straightforward to extend the above scheme to systems of more than two non-linear equations. In our case, the Jacobian matrix is given by the Hessian that represents the second derivative of cost function.