function value = cube_f ( x, n )

%*****************************************************************************80
%
%% cube_f() evaluates the Cube function.
%
%  Discussion:
%
%    The function is the sum of the squares of two functions.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 July 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(N), the evaluation point.
%
%    integer N, the number of variables.
%
%  Output:
%
%    real VALUE, the function value.
%
  fx1 = 10.0 * ( x(2) - x(1) ^ 3 );
  fx2 = 1.0 - x(1);

  value = fx1 ^ 2 + fx2 ^ 2;

  return
end
