Newton's method
Example

For example, the following set of equations needs to be solved for vector of points , {\displaystyle \ \,} given the vector of known values. {\displaystyle \ ~.}

5 x 1 2 + x 1 x 2 2 + sin 2 (2 x 2) = 2 e 2 x 1 − x 2 + 4 x 2 = 3 {\displaystyle {\begin{array}{lcr}5\ x_{1}^{2}+x_{1}\ x_{2}^{2}+\sin ^{2}(2\ x_{2})&=\quad 2\\e^{2\ x_{1}-x_{2}}+4\ x_{2}&=\quad 3\end{array}}}

the function vector, F (X k) , {\displaystyle \ F(X_{k})\,} and Jacobian Matrix, J (X k) {\displaystyle \ J(X_{k})\ } for iteration k, and the vector of known values, Y , {\displaystyle \ Y\,} are defined below.

F (X k) = = k J (X k) = k = k Y = {\displaystyle {\begin{aligned}~&F(X_{k})~=~{\begin{bmatrix}{\begin{aligned}~&f_{1}(X_{k})\\~&f_{2}(X_{k})\end{aligned}}\end{bmatrix}}~=~{\begin{bmatrix}{\begin{aligned}~&5\ x_{1}^{2}+x_{1}\ x_{2}^{2}+\sin ^{2}(2\ x_{2})\\~&e^{2\ x_{1}-x_{2}}+4\ x_{2}\end{aligned}}\end{bmatrix}}_{k}\\~&J(X_{k})={\begin{bmatrix}~{\frac {\ \partial {f_{1}(X)}\ }{\partial {x_{1}}}}\,&~{\frac {\ \partial {f_{1}(X)}\ }{\partial {x_{2}}}}~\\~{\frac {\ \partial {f_{2}(X)}\ }{\partial {x_{1}}}}\,&~{\frac {\ \partial {f_{2}(X)}\ }{\partial {x_{2}}}}~\end{bmatrix}}_{k}~=~{\begin{bmatrix}{\begin{aligned}~&10\ x_{1}+x_{2}^{2}\,&&2\ x_{1}\ x_{2}+4\ \sin(2\ x_{2})\ \cos(2\ x_{2})\\~&2\ e^{2\ x_{1}-x_{2}}\,&&-e^{2\ x_{1}-x_{2}}+4\end{aligned}}\end{bmatrix}}_{k}\\~&Y={\begin{bmatrix}~2~\\~3~\end{bmatrix}}\end{aligned}}}

Note that F (X k) {\displaystyle \ F(X_{k})\ } could have been rewritten to absorb Y , {\displaystyle \ Y\,} and thus eliminate Y {\displaystyle Y} from the equations. The equation to solve for each iteration are

k k + 1 = k {\displaystyle {\begin{aligned}{\begin{bmatrix}{\begin{aligned}~&~10\ x_{1}+x_{2}^{2}\,&&2x_{1}x_{2}+4\ \sin(2\ x_{2})\ \cos(2\ x_{2})~\\~&~2\ e^{2\ x_{1}-x_{2}}\,&&-e^{2\ x_{1}-x_{2}}+4~\end{aligned}}\end{bmatrix}}_{k}{\begin{bmatrix}~c_{1}~\\~c_{2}~\end{bmatrix}}_{k+1}={\begin{bmatrix}~5\ x_{1}^{2}+x_{1}\ x_{2}^{2}+\sin ^{2}(2\ x_{2})-2~\\~e^{2\ x_{1}-x_{2}}+4\ x_{2}-3~\end{bmatrix}}_{k}\end{aligned}}}

and

X k + 1 = X k − C k + 1 {\displaystyle X_{k+1}~=~X_{k}-C_{k+1}}

The iterations should be repeated until < E , {\displaystyle \ {\Bigg }<E\,} where E {\displaystyle \ E\ } is a value acceptably small enough to meet application requirements.

If vector X 0 {\displaystyle \ X_{0}\ } is initially chosen to be , {\displaystyle \ {\begin{bmatrix}~1~&~1~\end{bmatrix}}\,} that is, x 1 = 1 , {\displaystyle \ x_{1}=1\,} and x 2 = 1 , {\displaystyle \ x_{2}=1\,} and E , {\displaystyle \ E\,} is chosen to be 1. 10, then the example converges after four iterations to a value of X 4 =. {\displaystyle \ X_{4}=\left~.}
punctuation:no_comma