function retval = lsq(x)
% usage:  y = lsq(x)
% description: returns least squares
% scalar function 1/2*||r(x)||^2

% no bulletproofing
retval = (((x(1)+3)*(x(2)^3-7)+18)^2 +  sin(x(2)*exp(x(1))-1)^2)/2;