function chebyshev_even1_test ( )

%*****************************************************************************80
%
%% chebyshev_even1_test() tests chebyshev_even1().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    07 January 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'chebyshev_even1_test():\n' );
  fprintf ( 1, '  chebyshev_even1() computes the even Chebyshev coefficients\n' );
  fprintf ( 1, '  of a function F, using the extreme points of Tn(x).\n' );

  a2_exact = [ ...
    0.4477815660, ...
   -0.7056685603, ...
    0.0680357987, ...
   -0.0048097159 ];

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

  a2 = chebyshev_even1 ( n, @ ( x ) cos ( a * x ) );

  s = floor ( n / 2 );
  r8vec2_print ( s + 1, a2, a2_exact, '  Computed and Exact Coefficients:' );

  return
end
