LAGUERRE_TEST_INT
Quadrature Tests for Semi-Infinite Intervals
LAGUERRE_TEST_INT
is a FORTRAN90 library which
defines integration problems over
semi-infinite intervals of the form [ALPHA,+oo).
The test integrands would normally be used to testing one
dimensional quadrature software. It is possible to invoke a
particular function by index, or to try out all available functions,
as demonstrated in the sample calling program.
The test integrands include:
-
1 / ( x * log(x)^2 );
-
1 / ( x * log(x)^(3/2) );
-
1 / ( x^1.01 );
-
Sine integral;
-
Fresnel integral;
-
Complementary error function;
-
Bessel function;
-
Debye function;
-
Gamma(Z=4) function;
-
1/(1+x*x); (Stroud)
-
1 / ( (1+x) * sqrt(x) ); (Stroud)
-
exp ( - x ) * cos ( x ); (Stroud)
-
sin(x) / x; (Stroud)
-
sin ( exp(-x) + exp(-4x) ); (Stroud)
-
log(x) / ( 1+100*x*x); (QUADPACK)
-
cos(0.5*pi*x) / sqrt(x); (QUADPACK)
-
exp ( - x / 2^beta ) * cos ( x ) / sqrt ( x )
-
x^2 * exp ( - x / 2^beta )
-
x^(beta-1) / ( 1 + 10 x )^2
-
1 / ( 2^beta * ( ( x - 1 )^2 + (1/4)^beta ) * ( x - 2 ) )
The library includes not just the integrand, but also the value of
ALPHA which defines the interval of integration, and the exact value
of the integral (or, typically, an estimate of this value).
Thus, for each integrand function, three subroutines are supplied. For
instance, for function #1, we have the routines:
-
P01_FUN evaluates the integrand for problem 1.
-
P01_ALPHA returns the value of ALPHA for problem 1.
-
P01_EXACT returns the estimated integral for problem 1.
-
P01_TITLE returns a title for problem 1.
So once you have the calling sequences for these routines, you
can easily evaluate the function, or integrate it on the
appropriate interval, or compare your estimate of the integral
to the exact value.
Moreover, since the same interface is used for each function,
if you wish to work with problem 5 instead, you simply change
the "01" to "05" in your routine calls.
If you wish to call all of the functions, then you
simply use the generic interface, which again has three
subroutines, but which requires you to specify the problem
number as an extra input argument:
-
P00_FUN evaluates the integrand for any problem.
-
P00_ALPHA returns the value of ALPHA for any problem.
-
P00_EXACT returns the exact integral for any problem.
-
P00_TITLE returns a title for any problem.
Finally, some demonstration routines are built in for
simple quadrature methods. These routines include
-
P00_EXP_TRANSFORM applies an exponential change of
variables, and then uses a Gauss-Legendre quadrature formula
to estimate the integral for any problem.
-
P00_GAUSS_LAGUERRE uses a Gauss-Laguerre quadrature formula
to estimate the integral for any problem.
-
P00_RAT_TRANSFORM applies a rational change of
variables, and then uses a Gauss-Legendre quadrature formula
to estimate the integral for any problem.
and can be used with any of the sample integrands.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
LAGUERRE_TEST_INT is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
LAGUERRE_POLYNOMIAL,
a FORTRAN90 program which
which evaluates the Laguerre polynomial, the generalized Laguerre polynomials,
and the Laguerre function.
LAGUERRE_RULE,
a FORTRAN90 program which
generates a Gauss-Laguerre quadrature rule on request.
QUADPACK,
a FORTRAN90 library which
estimates integrals of functions in one dimension.
QUADRULE,
a FORTRAN90 library which
defines various quadrature rules.
TEST_INT,
a FORTRAN90 library which
defines some test integration problems over finite intervals.
TEST_INT_2D,
a FORTRAN90 library which
defines test integrands for 2D quadrature rules.
TEST_INT_HERMITE,
a FORTRAN90 library which
defines some test integration problems over infinite intervals.
Reference:
-
Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
-
Robert Piessens, Elise deDoncker-Kapenga,
Christian Ueberhuber, David Kahaner,
QUADPACK: A Subroutine Package for Automatic Integration,
Springer, 1983,
ISBN: 3540125531,
LC: QA299.3.Q36.
-
Arthur Stroud, Don Secrest,
Gaussian Quadrature Formulas,
Prentice Hall, 1966,
LC: QA299.4G3S7.
Source Code:
Examples and Tests:
List of Routines:
-
LAGUERRE_COMPUTE computes a Gauss-Laguerre quadrature rule.
-
LAGUERRE_RECUR finds the value and derivative of a Laguerre polynomial.
-
LAGUERRE_ROOT improves an approximate root of a Laguerre polynomial.
-
LEGENDRE_COMPUTE computes a Gauss-Legendre quadrature rule.
-
P00_ALPHA returns the value of ALPHA for any problem.
-
P00_EXACT returns the exact integral for any problem.
-
P00_EXP_TRANSFORM applies an exponential transform and Gauss-Legendre rule.
-
P00_FUN evaluates the integrand for any problem.
-
P00_GAUSS_LAGUERRE applies a Gauss-Laguerre rule.
-
P00_PROBLEM_NUM returns the number of test integration problems.
-
P00_RAT_TRANSFORM applies a rational transform and Gauss-Legendre rule.
-
P00_TITLE returns the title for any problem.
-
P01_ALPHA returns ALPHA for problem 1.
-
P01_EXACT returns the exact integral for problem 1.
-
P01_FUN evaluates the integrand for problem 1.
-
P01_TITLE returns the title for problem 1.
-
P02_ALPHA returns ALPHA for problem 2.
-
P02_EXACT returns the exact integral for problem 2.
-
P02_FUN evaluates the integrand for problem 2.
-
P02_TITLE returns the title for problem 2.
-
P03_ALPHA returns ALPHA for problem 3.
-
P03_EXACT returns the exact integral for problem 3.
-
P03_FUN evaluates the integrand for problem 3.
-
P03_TITLE returns the title for problem 3.
-
P04_ALPHA returns ALPHA for problem 4.
-
P04_EXACT returns the estimated integral for problem 4.
-
P04_FUN evaluates the integrand for problem 4.
-
P04_TITLE returns the title for problem 4.
-
P05_ALPHA returns ALPHA for problem 5.
-
P05_EXACT returns the estimated integral for problem 5.
-
P05_FUN evaluates the integrand for problem 5.
-
P05_TITLE returns the title for problem 5.
-
P06_ALPHA returns ALPHA for problem 6.
-
P06_EXACT returns the exact integral for problem 6.
-
P06_FUN evaluates the integrand for problem 6.
-
P06_TITLE returns the title for problem 6.
-
P07_ALPHA returns ALPHA for problem 7.
-
P07_EXACT returns the exact integral for problem 7.
-
P07_FUN evaluates the integrand for problem 7.
-
P07_TITLE returns the title for problem 7.
-
P08_ALPHA returns ALPHA for problem 8.
-
P08_EXACT returns the estimated integral for problem 8.
-
P08_FUN evaluates the integrand for problem 8.
-
P08_TITLE returns the title for problem 8.
-
P09_ALPHA returns ALPHA for problem 9.
-
P09_EXACT returns the estimated integral for problem 9.
-
P09_FUN evaluates the integrand for problem 9.
-
P09_TITLE returns the title for problem 9.
-
P10_ALPHA returns ALPHA for problem 10.
-
P10_EXACT returns the estimated integral for problem 10.
-
P10_FUN evaluates the integrand for problem 10.
-
P10_TITLE returns the title for problem 10.
-
P11_ALPHA returns ALPHA for problem 11.
-
P11_EXACT returns the estimated integral for problem 11.
-
P11_FUN evaluates the integrand for problem 11.
-
P11_TITLE returns the title for problem 11.
-
P12_ALPHA returns ALPHA for problem 12.
-
P12_EXACT returns the estimated integral for problem 12.
-
P12_FUN evaluates the integrand for problem 12.
-
P12_TITLE returns the title for problem 12.
-
P13_ALPHA returns ALPHA for problem 13.
-
P13_EXACT returns the estimated integral for problem 13.
-
P13_FUN evaluates the integrand for problem 13.
-
P13_TITLE returns the title for problem 13.
-
P14_ALPHA returns ALPHA for problem 14.
-
P14_EXACT returns the estimated integral for problem 14.
-
P14_FUN evaluates the integrand for problem 14.
-
P14_TITLE returns the title for problem 14.
-
P15_ALPHA returns ALPHA for problem 15.
-
P15_EXACT returns the estimated integral for problem 15.
-
P15_FUN evaluates the integrand for problem 15.
-
P15_TITLE returns the title for problem 15.
-
P16_ALPHA returns ALPHA for problem 16.
-
P16_EXACT returns the estimated integral for problem 16.
-
P16_FUN evaluates the integrand for problem 16.
-
P16_TITLE returns the title for problem 16.
-
P17_ALPHA returns ALPHA for problem 17.
-
P17_EXACT returns the exact integral for problem 17.
-
P17_FUN evaluates the integrand for problem 17.
-
P17_TITLE returns the title for problem 17.
-
P18_ALPHA returns ALPHA for problem 18.
-
P18_EXACT returns the exact integral for problem 18.
-
P18_FUN evaluates the integrand for problem 18.
-
P18_TITLE returns the title for problem 18.
-
P19_ALPHA returns ALPHA for problem 19.
-
P19_EXACT returns the exact integral for problem 19.
-
P19_FUN evaluates the integrand for problem 19.
-
P19_TITLE returns the title for problem 19.
-
P20_ALPHA returns ALPHA for problem 10.
-
P20_EXACT returns the exact integral for problem 20.
-
P20_FUN evaluates the integrand for problem 20.
-
P20_TITLE returns the title for problem 20.
-
R8_GAMMA evaluates Gamma(X) for a real argument.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 26 December 2011.