function q = rectangle_gauss ( n1, n2 )

%*****************************************************************************80
%
%% rectangle_gauss estimates an integral over a rectangle using a Gauss product.
%
%  Input:
%
%    integer n1, n2: the number of points in the x and y Gauss rules.
%
%  Output:
%
%    real q: the integral estimate.
%
  a = 1.0;
  b = 5.0;
  c = 2.0;
  d = 3.0;

  [ x, u ] = gauss_ab ( n1, a, b );
  [ y, v ] = gauss_ab ( n2, c, d );

  q = 0.0;
  for i = 1 : n1
    for j = 1 : n2
      q = q + u(i) * v(j) * sinexp(x(i),y(j));
    end
  end
  
  fprintf ( 1, '  Using %d x %d points, integral estimate is %g\n', n1, n2, q );

  return
end

