function varargout = constraints1(x)

varargout{1} = sum(x.^2) - 2;

if nargout > 1
    varargout{2} = 2*x;
end

if nargout > 2
    varargout{3} = 2*eye(length(x));
end

end