function [f,df] = fff(x);

% FFF  Non-linear function and its gradient
%
% This is an example of a non-linear function whose root cannot be
% found analytically.

f = cos(x) - x;
if nargout > 1,  % only compute gradient if asked for
  df = -sin(x) - 1;
end
