clear y1 y2;
y1(1) = exp(1) + 0.001;
y2(1) = exp(1) - 0.001;
nMax = 9;

for n=1:nMax
    y1(n+1) = y1(n) * log(y1(n));
    y2(n+1) = y2(n) * log(y2(n));
end;

n = 1:(nMax+1);
plot(n, y1, 'b-*', n, y2, 'r--x');
line([1, nMax+1], [exp(1), exp(1)], 'color', 'black', 'linewidth', 2, 'linestyle', ':');
title('Difference equation y_{n+1}=y_n ln y_n: monotonically unstable equilibrium at y_{eq}=e');
xlabel('n'); ylabel('y_n');
legend('y_0 = e + 0.001', 'y_0 = e - 0.001');