clear; clc
format long
eta=0.1;
w(1)=5;
for i=1:1000
    w(i+1)=w(i)-eta*(2*(w(i)-3)-sin(w(i))-exp(-w(i)/10)/10);
end
plot(w)
w(1001)
abs(2*(w(1001)-3)-sin(w(1001))-exp(-w(1001)/10)/10)

-------------------------------------------------

ans (=w*) =

    3.071696112536959

ans (=|dE(w*)/dw|) =

    1.554312234475219e-15