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

% no bulletproofing
retval =  [(x(2)^3-7)^2+cos(x(2)*exp(x(1))-1)^2*x(2)^2*(exp(x(1)))^2-sin(x(2)*exp(x(1))-1)^2*x(2)^2*(exp(x(1)))^2+sin(x(2)*exp(x(1))-1)*cos(x(2)*exp(x(1))-1)*x(2)*exp(x(1)), 3*(x(2)^3-7)*(x(1)+3)*x(2)^2+3*((x(1)+3)*(x(2)^3-7)+18)*x(2)^2+cos(x(2)*exp(x(1))-1)^2*x(2)*(exp(x(1)))^2-sin(x(2)*exp(x(1))-1)^2*x(2)*(exp(x(1)))^2+sin(x(2)*exp(x(1))-1)*cos(x(2)*exp(x(1))-1)*exp(x(1));  3*(x(2)^3-7)*(x(1)+3)*x(2)^2+3*((x(1)+3)*(x(2)^3-7)+18)*x(2)^2+cos(x(2)*exp(x(1))-1)^2*x(2)*(exp(x(1)))^2-sin(x(2)*exp(x(1))-1)^2*x(2)*(exp(x(1)))^2+sin(x(2)*exp(x(1))-1)*cos(x(2)*exp(x(1))-1)*exp(x(1)), 9*(x(1)+3)^2*x(2)^4+6*((x(1)+3)*(x(2)^3-7)+18)*(x(1)+3)*x(2)+cos(x(2)*exp(x(1))-1)^2*(exp(x(1)))^2-sin(x(2)*exp(x(1))-1)^2*(exp(x(1)))^2];