function y = beale(x)
% 
% Beale function.
% Matlab Code by A. Hedar (Sep. 29, 2005).
% The number of variables n = 2.
% 
y = (1.5-x(1)*(1-x(2)))^2+(2.25-x(1)*(1-x(2)^2))^2+(2.625-x(1)*(1-x(2)^3))^2;
