TEST_INT_HERMITE
Quadrature Tests for Infinite Intervals


TEST_INT_HERMITE is a FORTRAN90 library which defines integration problems over infinite intervals of the form (-oo,+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.

For a given integrand function f(x), the problem is to estimate

        I(f) = integral ( -oo < x < +oo ) w(x) * f(x) dx
      

We consider three variations of the problem, depending on the form of the weight factor w(x):

For option 0, the test integrands have the form:

  1. f1(x) = exp(-x*x) * cos(2*omega*x);
  2. f2(x) = exp(-x*x);
  3. f3(x) = exp(-px)/(1+exp(-qx));
  4. f4(x) = sin ( x^2 );
  5. f5(x) = 1 / (1+x^2) sqrt (4+3x^2) );
  6. f6(x) = exp(-x*x) * x^m;

For option 1, the test integrands have the form:

  1. f1(x) = cos(2*omega*x);
  2. f2(x) = 1
  3. f3(x) = exp(x*x) * exp(-px)/(1+exp(-qx));
  4. f4(x) = exp(x*x) * sin ( x^2 );
  5. f5(x) = exp(x*x) * 1 / (1+x^2) sqrt (4+3x^2) );
  6. f6(x) = x^m;

For option 2, the test integrands have the form:

  1. f1(x) = exp(-x*x/2) * cos(2*omega*x);
  2. f2(x) = exp(-x*x/2);
  3. f3(x) = exp(+x*x/2) * exp(-px)/(1+exp(-qx));
  4. f4(x) = exp(+x*x/2) * sin ( x^2 );
  5. f5(x) = exp(+x*x/2) * 1 / (1+x^2) sqrt (4+3x^2) );
  6. f6(x) = exp(-x*x/2) * x^m;

The library includes not just the integrand, but also the exact value of the integral (or, typically, an estimate of this value), and a title for the problem. Thus, for each integrand function, several routines are supplied. For instance, for function #1, we have the routines:

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 requires you to specify the problem number as an extra input argument:

Finally, some demonstration routines are built in for simple quadrature methods. These routines include

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.

Related Data and Programs:

CLENSHAW_CURTIS is a FORTRAN90 library which can set up a Clenshaw Curtis quadrature grid in multiple dimensions.

HERMITE_RULE, is a FORTRAN90 program which can compute and print a Gauss-Hermite quadrature rule.

INT_EXACTNESS_HERMITE is a FORTRAN90 program which tests the polynomial exactness of Gauss-Hermite quadrature rules.

INTLIB is a FORTRAN90 library which estimates integrals in one dimension.

QUADPACK is a FORTRAN90 library which estimates integrals of functions in one dimension.

QUADRULE is a FORTRAN90 library which defines various quadrature rules.

TEST_INT is a FORTRAN90 library which defines some test integration problems over finite intervals.

TEST_INT_2D is a FORTRAN90 library which defines test integrands for 2D quadrature rules.

TEST_INT_HERMITE is available in a C++ version and a FORTRAN90 version and a MATLAB version.

TEST_INT_LAGUERRE is a FORTRAN90 library which defines test integrands for integration over [-ALPHA,+oo).

TOMS351 is a FORTRAN77 library which estimates an integral using Romberg integration.

TOMS379 is a FORTRAN77 library which estimates an integral.

TOMS418 is a FORTRAN77 library which estimates the integral of a function with a sine or cosine factor.

TOMS424 is a FORTRAN77 library which estimates the integral of a function using Clenshaw-Curtis quadrature.

TOMS468 is a FORTRAN77 library which carries out the "automatic" integration of a function.

Reference:

  1. Philip Davis, Philip Rabinowitz,
    Methods of Numerical Integration,
    Second Edition,
    Dover, 2007,
    ISBN: 0486453391,
    LC: QA299.3.D28.
  2. Robert Piessens, Elise deDoncker-Kapenga, Christian Ueberhuber, David Kahaner,
    QUADPACK: A Subroutine Package for Automatic Integration,
    Springer, 1983,
    ISBN: 3540125531,
    LC: QA299.3.Q36.
  3. William Squire,
    Comparison of Gauss-Hermite and Midpoint Quadrature with Application to the Voigt Function,
    in Numerical Integration: Recent Developments, Software and Applications,
    edited by Patrick Keast, Graeme Fairweather,
    Reidel, 1987, pages 337-340,
    ISBN: 9027725144,
    LC: QA299.3.N38.
  4. Arthur Stroud, Don Secrest,
    Gaussian Quadrature Formulas,
    Prentice Hall, 1966,
    LC: QA299.4G3S7.
  5. Alan Turing,
    A Method for the Calculation of the Zeta Function,
    Proceedings of the London Mathematical Society,
    Volume 48, 1943, pages 180-197.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 19 May 2009.