function errors_test11 ( )

%*****************************************************************************80
%
%% errors_test11() seeks the minimum value of a function over an interval.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 August 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Exercise 11                                |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  P(X) =                                     |\n' );
  fprintf ( 1, '|      2124476931 * X^4                       |\n' );
  fprintf ( 1, '|    - 1226567328 * X^3                       |\n' );
  fprintf ( 1, '|    -  708158977 * X^2                       |\n' );
  fprintf ( 1, '|    +  408855776 * X                         |\n' );
  fprintf ( 1, '|    +    1.0E-27                             |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  P(X) is positive for X >= 0.               |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Use a minimizer to seek the minimum        |\n' );
  fprintf ( 1, '|  value of P(X) in (0.56, 0.59).             |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '\n' );

  a = 0.56;
  b = 0.59;

  r = fminbnd ( @f11, a, b );
  f = f11 ( r );

  fprintf ( 1, '  FMINBND finds a minimizer at X = %20.16g\n', r );
  fprintf ( 1, '  with function value P(X) = %20.16g\n', f );

  return
end
