f(x)=x^3-2 df(x)=3*x^2 xi=2^(1/3) x0=1 lambda=0.02 g(x)=x-lambda*f(x) xn=x0 for n=1:170 global xn xn=g(xn) println("n=$n xn=$xn en=$(xn-xi)") end