function integral = disk_monomial_integral ( r, e )

%*****************************************************************************80
%
%% disk_monomial_integral() returns monomial integrals in disk of radius R.
%
%  Discussion:
%
%    The integration region is 
%
%      X^2 + Y^2 <= R^2.
%
%    The monomial is F(X,Y) = X^E(1) * Y^E(2).
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    04 November 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real r: the radius of the disk.
%
%    integer e(2): the nonnegative exponents of X and Y.
%
%  Output:
%
%    real integral: the integral.
%
  if ( any ( e(1:2) < 0 ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'disk01_monomial_integral(): Fatal error!\n' );
    fprintf ( 1, '  All exponents must be nonnegative.\n' );
    error ( 'disk01_monomial_integral(): Fatal error!' );
  end

  if ( any ( mod ( e(1:2), 2 ) == 1 ) )

    integral = 0.0;

  else

    integral = 2.0;

    for i = 1 : 2
      arg = 0.5 * ( e(i) + 1 );
      integral = integral * gamma ( arg );
    end

    arg = 0.5 * ( sum ( e(1:2) + 1 ) );
    integral = integral / gamma ( arg );

  end
%
%  The surface integral is now adjusted to give the volume integral.
%
  s = sum ( e(1:2) ) + 2;

  integral = integral * r ^ s / s;

  return
end

