function retval = testfn(x)
% usage:  y = testfn(x)
% description: Returns value of simple test function
% assuming that x is a vector of length 2

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