clear all; clc; x0=input('x0 = '); e=input('e = '); f1=(cos(x0)-x0^2*sin(x0)); f2=(-sin(x0)-(2*x0*sin(x0)+x0^2*cos(x0))); x1=x0-f1/f2 while(abs(x1-x0)>e) x0=x1; f1=(cos(x0)-x0^2*sin(x0)); f2=(-sin(x0)-(2*x0*sin(x0)+x0^2*cos(x0))); x1=x0-f1/f2 end