function fsolve_test02 ( )

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

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

  x0 = [ 3.0; 0.0 ];
  fx0 = f2 ( x0 );
  r8vec2_print ( x0, fx0, '  Initial X and F(X)' );

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

  return
end

