function exp_gauss ( n )

%*****************************************************************************80
%
%% exp_gauss uses Gauss quadrature to estimate integral e^(-x^2)(x) dx
%
  a = 0.0;
  b = 3.0;
  [ x, w ] = gauss_ab ( n, a, b );
  q_gauss = w' * expo ( x );
  q_exact = expo_int ( a, b );
  e = q_exact - q_gauss;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'exp_gauss:\n' );
  fprintf ( 1, '  Gauss quadrature of e^(-x^2)\n' );
  fprintf ( 1, '  Interval = [%g,%g]\n', a, b );
  fprintf ( 1, '  N = %d\n', n );
  fprintf ( 1, '  I(e^(-x^2)(),a,b) = %g\n', q_exact );
  fprintf ( 1, '  G(e^(-x^2)(),a,b) = %g\n', q_gauss );
  fprintf ( 1, '  E = I-G          = %g\n', e );

  return
end

