Newton's method for a 2x2 system 

restart 

with(LinearAlgebra); -1 

System{f1(x,y) = 0, f2(x,y) =0}) with: 

 

f1 := proc (x, y) options operator, arrow; 10*x-y-20 end proc 

proc (x, y) options operator, arrow; 10*x-y-20 end proc 

f2 := proc (x, y) options operator, arrow; x+(9+x^2)*y end proc 

proc (x, y) options operator, arrow; x+(9+x^2)*y end proc 

Jacobian matrix: J := proc (x, y) options operator, arrow; Matrix(2, 2, {(1, 1) = ((D[1])(f1))(args[1], args[2]), (1, 2) = ((D[2])(f1))(args[1], args[2]), (2, 1) = ((D[1])(f2))(args[1], args[2]), (2, 2) = ((D[2])(f2))... 

proc (x, y) options operator, arrow; Matrix(2, 2, {(1, 1) = (D[1](f1))(args[1], args[2]), (1, 2) = (D[2](f1))(args[1], args[2]), (2, 1) = (D[1](f2))(args[1], args[2]), (2, 2) = (D[2](f2))(args[1], arg...
proc (x, y) options operator, arrow; Matrix(2, 2, {(1, 1) = (D[1](f1))(args[1], args[2]), (1, 2) = (D[2](f1))(args[1], args[2]), (2, 1) = (D[1](f2))(args[1], args[2]), (2, 2) = (D[2](f2))(args[1], arg...
 

Stop iteration when difference between consecutive iterates is less than: tolerance := 0.1000000000e-9 

0.1000000000e-9 

 

Maximum number of iterations:N := 100 

100 

 

Start values: X := Vector[column](%id = 6445404) 

Vector[column](%id = 6445404) 

 

for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1
for i to N do DeltaX := -Typesetting:-delayDotProduct(MatrixInverse(J(X[1], X[2])), Vector[column](%id = 18991456)); X := X+DeltaX; if VectorNorm(DeltaX, 2) < tolerance then break end if end do; -1