% Newton's method to solve the nonlinear system of equation % (x-0.01)^2 + y^2 = 1 % x^2 - (y-0.01)^2 = .25 % in the first quadrant (near (1/4, 1/4) := x_0 clear; format long e; x = [.5; .5] % repeat the following command till convergence (about 9 iterations) x = x - [ 2*(x(1)-0.01) 8*x(2); 2*x(1) -2*(x(2)-0.01)]\ ... [ x(2)^2+4*( x(2)-0.01 )^2-1; x(1)^2-(x(2)-0.01)^2-0.25 ]