function g = p23_g ( n, x )

%*****************************************************************************80
%
%% p23_g evaluates the gradient for problem 23.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 December 2000
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of variables.
%
%    real X(N), the values of the variables.
%
%  Output:
%
%    real G(N), the gradient of the objective function.
%
  g = zeros ( n, 1 );

  g(1) = 400.0 * ( x(1) * x(1) - x(2) ) * x(1) - 2.0 + 2.0 * x(1);
  g(2) = - 200.0 * ( x(1) * x(1) - x(2) );

  return
end
