function y = new_max(x_old, x) y = max((x(1)*x(2) - 300), (x(1) - 2*x(2))); y = max(y , (0.5*x(2) - x(1))); y = max(psi(x) -psi(x_old),y);