function grad = testfngrad(x)
% usage:  grad = testfngrad(x)
% description: Returns the gradient vector for
% testfn(x), assuming x a column vector.

% no bulletproofing
grad = [-1/2*x(1)*exp(-1/4*x(1)^2)*(x(1)^4+2*x(1)^3+1)+ ...
          exp(-1/4*x(1)^2)*(4*x(1)^3+6*x(1)^2); 4*x(2)+4*x(2)^3];
