function [f,df,ddf] = fun_ellipse(x);

% fun_ellipse.m
%
% This function returns the function value, gradient and Hessian of the
% ellipse function
%
%   f(x1,x2) = 0.5*( x1*x1 + 10*x2*x2 ) 
%
% Jean-Philippe Vert, 2006-6-4


f = 0.5*(x(1)*x(1)+10*x(2)*x(2)); 

if nargout>1
    df=[x(1),10*x(2)]';
end

if nargout>2
    ddf = [1,0;0,10];
end
