test_int
test_int,
a FORTRAN90 code 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.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
test_int is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
test_int_test
TEST_INT_2D,
a FORTRAN90 code which
defines test integrands for 2D quadrature rules.
Reference:
-
Kendall Atkinson,
An Introduction to Numerical Analysis,
Prentice Hall, 1989,
ISBN: 0471624896,
LC: QA297.A94.1989.
-
Roger Broucke,
Algorithm 446:
Ten Subroutines for the Manipulation of Chebyshev Series,
Communications of the ACM,
Volume 16, 1973, pages 254-256.
-
Charles Clenshaw, Alan Curtis,
A Method for Numerical Integration on an Automatic Computer,
Numerische Mathematik,
Volume 2, Number 1, December 1960, pages 197-205.
-
Richard Crandall,
Projects in Scientific Computing,
Springer, 2005,
ISBN: 0387950095,
LC: Q183.9.C733.
-
Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
-
Hermann Engels,
Numerical Quadrature and Cubature,
Academic Press, 1980,
ISBN: 012238850X,
LC: QA299.3E5.
-
Leslie Fox, Ian Parker,
Chebyshev Polynomials in Numerical Analysis,
Oxford Press, 1968,
LC: QA297.F65.
-
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.
-
John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thacher,
Christoph Witzgall,
Computer Approximations,
Wiley, 1968,
LC: QA297.C64.
-
David Kahaner,
Comparison of Numerical Quadrature Formulas,
in Mathematical Software,
edited by John Rice,
Academic Press, 1971,
ISBN: 012587250X,
LC: QA1.M766.
-
Prem Kythe, Pratap Puri,
Computational Methods for Linear Integral Equations,
Birkhaeuser, 2002,
ISBN: 0817641920,
LC: QA431.K97.
-
Robert Piessens, Elise deDoncker-Kapenga,
Christian Ueberhuber, David Kahaner,
QUADPACK: A Subroutine Package for Automatic Integration,
Springer, 1983,
ISBN: 3540125531,
LC: QA299.3.Q36.
-
Herbert Salzer, Norman Levine,
Table of a Weierstrass Continuous Nondifferentiable Function,
Mathematics of Computation,
Volume 15, Number 74, April 1961, pages 120-130.
-
Arthur Stroud, Don Secrest,
Gaussian Quadrature Formulas,
Prentice Hall, 1966,
LC: QA299.4G3S7.
Source Code:
Last revised on 03 September 2020.