function [x,it] = newton(x0,tol,itmax) f=@(x)x*log(x)-1; f1=@(x)log(x)+1; it=0; err=inf; while(err>tol && it