TEST_INT is a FORTRAN90 library which evaluates test integrands.

The test integrands would normally be used to testing one dimensional quadrature software. It is possible to invoke a particular function by number, or to try out all available functions, as demonstrated in the sample calling program.

The library includes not just the integrand, but also the interval of integration, and the exact value of the integral. Thus, for each integrand function, three subroutines are supplied. For instance, for function #9, we have the routines:

• P09_FUN evaluates the integrand for problem 9.
• P09_LIM returns the integration limits for problem 9.
• P09_EXACT returns the exact integral for problem 9.
So once you have the calling sequences for these routines, you can easily evaluate the function, or integrate it between the appropriate limits, 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 16 instead, you simply change the "09" to "16" 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_LIM returns the integration limits for any problem.
• P00_EXACT returns the exact integral for any problem.

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

• P00_GAUSS_LEGENDRE
• P00_EVEN
• P00_HALTON
• P00_MIDPOINT
• P00_MONTECARLO
• P00_SIMPSON
• P00_TRAPEZOID
and can be used with any of the sample integrands.

### Languages:

TEST_INT is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

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.

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

### Reference:

1. Kendall Atkinson,
An Introduction to Numerical Analysis,
Prentice Hall, 1989,
ISBN: 0471624896,
LC: QA297.A94.1989.
2. Roger Broucke,
Algorithm 446: Ten Subroutines for the Manipulation of Chebyshev Series,
Communications of the ACM,
Volume 16, 1973, pages 254-256.
3. Charles Clenshaw, Alan Curtis,
A Method for Numerical Integration on an Automatic Computer,
Numerische Mathematik,
Volume 2, Number 1, December 1960, pages 197-205.
4. Richard Crandall,
Projects in Scientific Computing,
Springer, 2005,
ISBN: 0387950095,
LC: Q183.9.C733.
5. Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
6. Hermann Engels,
ISBN: 012238850X,
LC: QA299.3E5.
7. Leslie Fox, Ian Parker,
Chebyshev Polynomials in Numerical Analysis,
Oxford Press, 1968,
LC: QA297.F65.
8. John Halton,
On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals,
Numerische Mathematik,
Volume 2, Number 1, December 1960, pages 84-90.
9. John Hart, Ward Cheney, Charles Lawson, Hans Maehly, Charles Mesztenyi, John Rice, Henry Thacher, Christoph Witzgall,
Computer Approximations,
Wiley, 1968,
LC: QA297.C64.
10. David Kahaner,
in Mathematical Software,
edited by John Rice,
ISBN: 012587250X,
LC: QA1.M766.
11. Prem Kythe, Pratap Puri,
Computational Methods for Linear Integral Equations,
Birkhaeuser, 2002,
ISBN: 0817641920,
LC: QA431.K97.
12. Robert Piessens, Elise deDoncker-Kapenga, Christian Ueberhuber, David Kahaner,
QUADPACK: A Subroutine Package for Automatic Integration,
Springer, 1983,
ISBN: 3540125531,
LC: QA299.3.Q36.
13. Herbert Salzer, Norman Levine,
Table of a Weierstrass Continuous Nondifferentiable Function,
Mathematics of Computation,
Volume 15, Number 74, April 1961, pages 120-130.
14. Arthur Stroud, Don Secrest,
Prentice Hall, 1966,
LC: QA299.4G3S7.

### List of Routines:

• BESJ0 computes J Bessel functions of order 0.
• BESY0 computes Y Bessel functions of order 0.
• CALJY0 calculates J and Y Bessel functions of zero order.
• CH_CAP capitalizes a single character.
• CSEVL evaluates a Chebyshev series.
• ERROR_F computes the error function.
• ERROR_FC computes the complementary error function.
• EULER_CONSTANT returns the value of the Euler-Mascheroni constant.
• I4_HUGE returns a "huge" I4.
• I4_TO_HALTON_NUMBER_SEQUENCE: next N elements of a scalar Halton sequence.
• I4VEC_INDICATOR sets an I4VEC to the indicator vector A(I)=I.
• INITS finds the number of Chebyshev terms needed to achieve a given accuracy.
• P00_EVEN uses evenly spaced points to integrate a function.
• P00_EXACT returns the exact integral for any problem.
• P00_FUN evaluates the integrand for any problem.
• P00_GAUSS_LEGENDRE applies a composite Gauss-Legendre rule.
• P00_HALTON applies a Halton sequence rule to integrate a function.
• P00_LIM returns the integration limits for any problem.
• P00_MIDPOINT applies the composite midpoint rule to integrate a function.
• P00_MONTECARLO applies the Monte Carlo rule to integrate a function.
• P00_PROB_NUM returns the number of test integration problems.
• P00_SIMPSON applies the composite Simpson rule to integrate a function.
• P00_TRAPEZOID applies the composite trapezoid rule to integrate a function.
• P01_EXACT returns the exact integral for problem 1.
• P01_FUN evaluates the integrand for problem 1.
• P01_LIM returns the integration limits for problem 1.
• P02_EXACT returns the exact integral for problem 2.
• P02_FUN evaluates the integrand for problem 2.
• P02_LIM returns the integration limits for problem 2.
• P03_EXACT returns the exact integral for problem 3.
• P03_FUN evaluates the integrand for problem 3.
• P03_LIM returns the integration limits for problem 3.
• P04_EXACT returns the estimated integral for problem 4.
• P04_FUN evaluates the integrand for problem 4.
• P04_LIM returns the integration limits for problem 4.
• P05_EXACT returns the estimated integral for problem 5.
• P05_FUN evaluates the integrand for problem 5.
• P05_LIM returns the integration limits for problem 5.
• P06_EXACT returns the exact integral for problem 6.
• P06_FUN evaluates the integrand for problem 6.
• P06_LIM returns the integration limits for problem 6.
• P07_EXACT returns the exact integral for problem 7.
• P07_FUN evaluates the integrand for problem 7.
• P07_LIM returns the integration limits for problem 7.
• P08_EXACT returns the estimated integral for problem 8.
• P08_FUN evaluates the integrand for problem 8.
• P08_LIM returns the integration limits for problem 8.
• P09_EXACT returns the estimated integral for problem 9.
• P09_FUN evaluates the integrand for problem 9.
• P09_LIM returns the integration limits for problem 9.
• P10_EXACT returns the estimated integral for problem 10.
• P10_FUN evaluates the integrand for problem 10.
• P10_LIM returns the integration limits for problem 10.
• P11_EXACT returns the estimated integral for problem 11.
• P11_FUN evaluates the integrand for problem 11.
• P11_LIM returns the integration limits for problem 11.
• P12_EXACT returns the estimated integral for problem 12.
• P12_FUN evaluates the integrand for problem 12.
• P12_LIM returns the integration limits for problem 12.
• P13_EXACT returns the estimated integral for problem 13.
• P13_FUN evaluates the integrand for problem 13.
• P13_LIM returns the integration limits for problem 13.
• P14_EXACT returns the estimated integral for problem 14.
• P14_FUN evaluates the integrand for problem 14.
• P14_LIM returns the integration limits for problem 14.
• P15_EXACT returns the exact integral for problem 15.
• P15_FUN evaluates the integrand for problem 15.
• P15_LIM returns the integration limits for problem 15.
• P16_EXACT returns the exact integral for problem 16.
• P16_FUN evaluates the integrand for problem 16.
• P16_LIM returns the integration limits for problem 16.
• P17_EXACT returns the estimated integral for problem 17.
• P17_FUN evaluates the integrand for problem 17.
• P17_LIM returns the integration limits for problem 17.
• P18_EXACT returns the estimated integral for problem 18.
• P18_FUN evaluates the integrand for problem 18.
• P18_LIM returns the integration limits for problem 18.
• P19_EXACT returns the exact integral for problem 19.
• P19_FUN evaluates the integrand for problem 19.
• P19_LIM returns the integration limits for problem 19.
• P20_EXACT returns the estimated integral for problem 20.
• P20_FUN evaluates the integrand for problem 20.
• P20_LIM returns the integration limits for problem 20.
• P21_EXACT returns the estimated integral for problem 21.
• P21_FUN evaluates the integrand for problem 21.
• P21_LIM returns the integration limits for problem 21.
• P22_EXACT returns the estimated integral for problem 22.
• P22_FUN evaluates the integrand for problem 22.
• P22_LIM returns the integration limits for problem 22.
• P23_EXACT returns the estimated integral for problem 23.
• P23_FUN evaluates the integrand for problem 23.
• P23_LIM returns the integration limits for problem 23.
• P24_EXACT returns the estimated integral for problem 24.
• P24_FUN evaluates the integrand for problem 24.
• P24_LIM returns the integration limits for problem 24.
• P25_EXACT returns the estimated integral for problem 25.
• P25_FUN evaluates the integrand for problem 25.
• P25_LIM returns the integration limits for problem 25.
• P26_EXACT returns the exact integral for problem 26.
• P26_FUN evaluates the integrand for problem 26.
• P26_LIM returns the integration limits for problem 26.
• P27_EXACT returns the exact integral for problem 27.
• P27_FUN evaluates the integrand for problem 27.
• P27_LIM returns the integration limits for problem 27.
• P28_EXACT returns the exact integral for problem 28.
• P28_FUN evaluates the integrand for problem 28.
• P28_LIM returns the integration limits for problem 28.
• P29_EXACT returns the exact integral for problem 29.
• P29_FUN evaluates the integrand for problem 29.
• P29_LIM returns the integration limits for problem 29.
• P30_EXACT returns the exact integral for problem 30.
• P30_FUN evaluates the integrand for problem 30.
• P30_LIM returns the integration limits for problem 30.
• P31_EXACT returns the exact integral for problem 31.
• P31_FUN evaluates the integrand for problem 31.
• P31_LIM returns the integration limits for problem 31.
• P32_EXACT returns the exact integral for problem 32.
• P32_FUN evaluates the integrand for problem 32.
• P32_LIM returns the integration limits for problem 32.
• P33_EXACT returns the exact integral for problem 33.
• P33_FUN evaluates the integrand for problem 33.
• P33_LIM returns the integration limits for problem 33.
• P34_EXACT returns the exact integral for problem 34.
• P34_FUN evaluates the integrand for problem 34.
• P34_LIM returns the integration limits for problem 34.
• P35_EXACT returns the exact integral for problem 35.
• P35_FUN evaluates the integrand for problem 35.
• P35_LIM returns the integration limits for problem 35.
• P36_EXACT returns the exact integral for problem 36.
• P36_FUN evaluates the integrand for problem 36.
• P36_LIM returns the integration limits for problem 36.
• P36_PARAM gets or sets the parameter values for problem 36.
• P36_PARAM_GET returns the parameter values for problem 36.
• P36_PARAM_SET sets the parameter values for problem 36.
• P37_EXACT returns the exact integral for problem 37.
• P37_FUN evaluates the integrand for problem 37.
• P37_LIM returns the integration limits for problem 37.
• P37_PARAM gets or sets the parameter values for problem 37.
• P37_PARAM_GET returns the parameter values for problem 37.
• P37_PARAM_SET sets the parameter values for problem 37.
• P38_EXACT returns the exact integral for problem 38.
• P38_FUN evaluates the integrand for problem 38.
• P38_LIM returns the integration limits for problem 38.
• P38_PARAM gets or sets the parameter values for problem 38.
• P38_PARAM_GET returns the parameter values for problem 38.
• P38_PARAM_SET sets the parameter values for problem 38.
• P39_EXACT returns the exact integral for problem 39.
• P39_FUN evaluates the integrand for problem 39.
• P39_LIM returns the integration limits for problem 39.
• P39_PARAM gets or sets the parameter values for problem 39.
• P39_PARAM_GET returns the parameter values for problem 39.
• P39_PARAM_SET sets the parameter values for problem 39.
• P40_EXACT returns the exact integral for problem 40.
• P40_FUN evaluates the integrand for problem 40.
• P40_LIM returns the integration limits for problem 40.
• P40_PARAM gets or sets the parameter values for problem 40.
• P40_PARAM_GET returns the parameter values for problem 40.
• P40_PARAM_SET sets the parameter values for problem 40.
• P41_EXACT returns the exact integral for problem 41.
• P41_FUN evaluates the integrand for problem 41.
• P41_LIM returns the integration limits for problem 41.
• P41_PARAM gets or sets the parameter values for problem 41.
• P41_PARAM_GET returns the parameter values for problem 41.
• P41_PARAM_SET sets the parameter values for problem 41.
• P42_EXACT returns the exact integral for problem 42.
• P42_FUN evaluates the integrand for problem 42.
• P42_LIM returns the integration limits for problem 42.
• P42_PARAM gets or sets the parameter values for problem 42.
• P42_PARAM_GET returns the parameter values for problem 42.
• P42_PARAM_SET sets the parameter values for problem 42.
• P43_EXACT returns the exact integral for problem 43.
• P43_FUN evaluates the integrand for problem 43.
• P43_LIM returns the integration limits for problem 43.
• P43_PARAM gets or sets the parameter values for problem 43.
• P43_PARAM_GET returns the parameter values for problem 43.
• P43_PARAM_SET sets the parameter values for problem 43.
• P44_EXACT returns the exact integral for problem 44.
• P44_FUN evaluates the integrand for problem 44.
• P44_LIM returns the integration limits for problem 44.
• P44_PARAM gets or sets the parameter values for problem 44.
• P44_PARAM_GET returns the parameter values for problem 44.
• P44_PARAM_SET sets the parameter values for problem 44.
• P45_EXACT returns the exact integral for problem 45.
• P45_FUN evaluates the integrand for problem 45.
• P45_LIM returns the integration limits for problem 45.
• P45_PARAM gets or sets the parameter values for problem 45.
• P45_PARAM_GET returns the parameter values for problem 45.
• P45_PARAM_SET sets the parameter values for problem 45.
• P46_EXACT returns the exact integral for problem 46.
• P46_FUN evaluates the integrand for problem 46.
• P46_LIM returns the integration limits for problem 46.
• P46_PARAM gets or sets the parameter values for problem 46.
• P46_PARAM_GET returns the parameter values for problem 46.
• P46_PARAM_SET sets the parameter values for problem 46.
• P47_EXACT returns the exact integral for problem 47.
• P47_FUN evaluates the integrand for problem 47.
• P47_LIM returns the integration limits for problem 47.
• P48_EXACT returns the exact integral for problem 48.
• P48_FUN evaluates the integrand for problem 48.
• P48_LIM returns the integration limits for problem 48.
• P49_EXACT returns the exact integral for problem 49.
• P49_FUN evaluates the integrand for problem 49.
• P49_LIM returns the integration limits for problem 49.
• P50_EXACT returns the exact integral for problem 50.
• P50_FUN evaluates the integrand for problem 50.
• P50_LIM returns the integration limits for problem 50.
• P51_EXACT returns the exact integral for problem 51.
• P51_FUN evaluates the integrand for problem 51.
• P51_LIM returns the integration limits for problem 51.
• P52_EXACT returns the exact integral for problem 52.
• P52_FUN evaluates the integrand for problem 52.
• P52_LIM returns the integration limits for problem 52.
• P53_EXACT returns the exact integral for problem 53.
• P53_FUN evaluates the integrand for problem 53.
• P53_LIM returns the integration limits for problem 53.
• P54_EXACT returns the exact integral for problem 54.
• P54_FUN evaluates the integrand for problem 54.
• P54_LIM returns the integration limits for problem 54.
• P55_EXACT returns the exact integral for problem 55.
• P55_FUN evaluates the integrand for problem 55.
• P55_LIM returns the integration limits for problem 55.
• P55_PARAM sets or gets real scalar parameters for problem 55.
• P56_EXACT returns the estimated integral for problem 56.
• P56_FUN evaluates the integrand for problem 56.
• P56_LIM returns the integration limits for problem 56.
• P57_EXACT returns the exact integral for problem 57.
• P57_FUN evaluates the integrand for problem 57.
• P57_LIM returns the integration limits for problem 57.
• R89SIFG evaluate terms needed in an approximation to SI(X) for 4 <= |X|.
• R89UPAK rewrites a real value X as Y * 2**N where 0.5 <= |Y| < 1.
• R8_CI computes an approximation to the value of the cosine integral.
• R8_GAMMA returns the value of the Gamma function at X.
• R8_GAMMA_LOG calculates the natural logarithm of GAMMA ( X ) for positive X.
• R8_HUGE returns a large R8.
• R8_SECH evaluates the hyperbolic secant, while avoiding COSH overflow.
• R8_SI computes an approximation to the value of the sine integral.
• S_EQI is a case insensitive comparison of two strings for equality.
• 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.