function gegenbauer_cc1_test ( )

%*****************************************************************************80
%
%% gegenbauer_cc1_test() tests GEGENBAUER_CC1.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    08 January 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'gegenbauer_cc1_test():\n' );
  fprintf ( 1, '  GEGENBAUER_CC1 estimates the Gegenbauer integral of\n' );
  fprintf ( 1, '  a function f(x) using a Clenshaw-Curtis type approach\n' );
  fprintf ( 1, '  based on the extreme points of Tn(x).\n' );

  lambda = 0.75;
  a = 2.0;
  n = 6;

  value = gegenbauer_cc1 ( n, lambda, @ ( x ) cos ( a * x ) );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Value = %g\n', value );
  exact = gamma ( lambda + 0.5 ) * sqrt ( pi ) * besselj ( lambda, a ) / ( 0.5 * a ) ^ lambda;
  fprintf ( 1, '  Exact = %g\n', exact );

  return
end
