function[x_new,iter]=newton(x0,tol,maxit)
% Computes the solution of f(x)=0 using the Newton method using the 
% algorithm from p.49 of the lecture notes
x_old=..
for iter=1:maxit
    Delta=..
    x_new = ..
    if norm(x_new-x_old)<..
      return % aborts the for loop
    end
    x_old = x_new;
end
end


function[J]=Df(x)
J=..  % Jacobi matrix as a function of x(1),x(2)
end

function[fct]=f(x)
fct=.. % vector f(x)
end