function fsolve_test01 ( )

%*****************************************************************************80
%
%% fsolve_test01 tests fsolve() on a scalar function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'fsolve_test01():\n' );
  fprintf ( 1, '  Use fsolve() to solve 1 nonlinear equation.\n' );

  options = optimoptions ( 'fsolve', 'Display', 'off' );

  x0 = 0.0;
  fx0 = f1 ( x0 );
  r8vec2_print ( x0, fx0, '  Initial X and F(X)' );

  x = fsolve ( @f1, x0, options );
  fx = f1 ( x );
  r8vec2_print ( x, fx, '  Final X and F(X)' );

  return
end

