function value = butcher_min_fun ( x )

%*****************************************************************************80
%
%% butcher_min_fun() returns the function in the butcher problem.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 February 2019
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Cesar Munoz, Anthony Narkawicz,
%    Formalization of Bernstein polynomials and applications to global 
%    optimization,
%    Journal of Automated Reasoning,
%    Volume 51, Number 2, 2013, pages 151-196.
%
%  Input:
%
%    real X, the points.
%
%  Output:
%
%    real VALUE, the value of the function at X.
%
  value = ( ...
      x(6) .* x(2) .^2 ...
    + x(5) .* x(3) .^2 ...
    - x(1) .* x(4) .^2 ...
    + x(4) .^3 ...
    + x(4) .^2 ...
    - 1.0 / 3.0 * x(1) ...
    + 4.0 / 3.0 * x(4)  );
 
  return
end
