clear;
eta=0.5;
w(1)=10;
for i=1:1:50
    w(i+1)=w(i)-eta*(2*(w(i)-3)-sin(w(i))-0.1*exp(-w(i)/10))
end
w(i)
E=2*(w(i)-3)-sin(w(i))-0.1*exp(-w(i)/10)
abs(E)

ans=3.0717
abs(E)=3.7748e-15 < 1e-3