function hess = testfnhess(x)
% usage:  hess = testfnhess(x)
% description: Returns the Hessian for
% testfn(x), assuming x column vector.

% no bulletproofing
% the actual calculation
hess = [-1/2*exp(-1/4*x(1)^2)*(x(1)^4+2*x(1)^3+1)+1/4*x(1)^2* ...
        exp(-1/4*x(1)^2)*(x(1)^4+2*x(1)^3+1) -  x(1)*exp(-1/4*x(1)^2)* ...
        (4*x(1)^3+6*x(1)^2)+exp(-1/4*x(1)^2)*(12*x(1)^2+12*x(1)), 0; 0, 4+12*x(2)^2];
