test_int
test_int,
a MATLAB 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 and
a Python version.
Related Data and Programs:
test_int_test
test_int_2d,
a MATLAB 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:
-
csevl.m,
evaluates a Chebyshev series.
-
euler_constant.m,
returns the value of the Euler-Mascheroni constant.
-
get_prob_num.m
returns the number of test integration problems.
-
i4_log_2.m,
returns the integer part of the logarithm base 2 of an integer;
-
i4_to_halton_number_sequence.m,
computes the next N elements of a scalar Halton sequence.
-
i4vec_indicator.m,
sets an I4VEC to the indicator vector.
-
inits.m,
determines the number of terms needed in a Chebyshev series.
-
p00_even.m
uses evenly spaced points to integrate a function.
-
p00_exact.m
returns the exact integral for any problem.
-
p00_fun.m
evaluates the integrand for any problem.
-
p00_gauss_legendre.m
applies a composite Gauss-Legendre rule.
-
p00_halton.m
applies a Halton sequence rule to integrate a function.
-
p00_lim.m
returns the integration limits for any problem.
-
p00_midpoint.m
applies the composite midpoint rule to integrate a function.
-
p00_montecarlo.m
applies the Monte Carlo rule to integrate a function.
-
p00_simpson.m
applies the composite Simpson rule to integrate a function.
-
p00_trapezoid.m
applies the composite trapezoid rule to integrate a function.
-
p01_exact.m
returns the exact integral for problem 1.
-
p01_fun.m
evaluates the integrand for problem 1.
-
p01_lim.m
returns the integration limits for problem 1.
-
p02_exact.m
returns the exact integral for problem 2.
-
p02_fun.m
evaluates the integrand for problem 2.
-
p02_lim.m
returns the integration limits for problem 2.
-
p03_exact.m
returns the exact integral for problem 4.
-
p03_fun.m
evaluates the integrand for problem 4.
-
p03_lim.m
returns the integration limits for problem 4.
-
p04_exact.m
returns the exact integral for problem 4.
-
p04_fun.m
evaluates the integrand for problem 4.
-
p04_lim.m
returns the integration limits for problem 4.
-
p05_exact.m
returns the exact integral for problem 5.
-
p05_fun.m
evaluates the integrand for problem 5.
-
p05_lim.m
returns the integration limits for problem 5.
-
p06_exact.m
returns the exact integral for problem 6.
-
p06_fun.m
evaluates the integrand for problem 6.
-
p06_lim.m
returns the integration limits for problem 6.
-
p07_exact.m
returns the exact integral for problem 7.
-
p07_fun.m
evaluates the integrand for problem 7.
-
p07_lim.m
returns the integration limits for problem 7.
-
p08_exact.m
returns the exact integral for problem 8.
-
p08_fun.m
evaluates the integrand for problem 8.
-
p08_lim.m
returns the integration limits for problem 8.
-
p09_exact.m
returns the exact integral for problem 9.
-
p09_fun.m
evaluates the integrand for problem 9.
-
p09_lim.m
returns the integration limits for problem 9.
-
p10_exact.m
returns the exact integral for problem 10.
-
p10_fun.m
evaluates the integrand for problem 10.
-
p10_lim.m
returns the integration limits for problem 10.
-
p11_exact.m
returns the exact integral for problem 11.
-
p11_fun.m
evaluates the integrand for problem 11.
-
p11_lim.m
returns the integration limits for problem 11.
-
p12_exact.m
returns the exact integral for problem 12.
-
p12_fun.m
evaluates the integrand for problem 12.
-
p12_lim.m
returns the integration limits for problem 12.
-
p13_exact.m
returns the exact integral for problem 13.
-
p13_fun.m
evaluates the integrand for problem 13.
-
p13_lim.m
returns the integration limits for problem 13.
-
p14_exact.m
returns the exact integral for problem 14.
-
p14_fun.m
evaluates the integrand for problem 14.
-
p14_lim.m
returns the integration limits for problem 14.
-
p15_exact.m
returns the exact integral for problem 15.
-
p15_fun.m
evaluates the integrand for problem 15.
-
p15_lim.m
returns the integration limits for problem 15.
-
p16_exact.m
returns the exact integral for problem 16.
-
p16_fun.m
evaluates the integrand for problem 16.
-
p16_lim.m
returns the integration limits for problem 16.
-
p17_exact.m
returns the exact integral for problem 17.
-
p17_fun.m
evaluates the integrand for problem 17.
-
p17_lim.m
returns the integration limits for problem 17.
-
p18_exact.m
returns the exact integral for problem 18.
-
p18_fun.m
evaluates the integrand for problem 18.
-
p18_lim.m
returns the integration limits for problem 18.
-
p19_exact.m
returns the exact integral for problem 19.
-
p19_fun.m
evaluates the integrand for problem 19.
-
p19_lim.m
returns the integration limits for problem 19.
-
p20_exact.m
returns the exact integral for problem 20.
-
p20_fun.m
evaluates the integrand for problem 20.
-
p20_lim.m
returns the integration limits for problem 20.
-
p21_exact.m
returns the exact integral for problem 21.
-
p21_fun.m
evaluates the integrand for problem 21.
-
p21_lim.m
returns the integration limits for problem 21.
-
p22_exact.m
returns the exact integral for problem 22.
-
p22_fun.m
evaluates the integrand for problem 22.
-
p22_lim.m
returns the integration limits for problem 22.
-
p23_exact.m
returns the exact integral for problem 23.
-
p23_fun.m
evaluates the integrand for problem 23.
-
p23_lim.m
returns the integration limits for problem 23.
-
p24_exact.m
returns the exact integral for problem 24.
-
p24_fun.m
evaluates the integrand for problem 24.
-
p24_lim.m
returns the integration limits for problem 24.
-
p25_exact.m
returns the exact integral for problem 25.
-
p25_fun.m
evaluates the integrand for problem 25.
-
p25_lim.m
returns the integration limits for problem 25.
-
p26_exact.m
returns the exact integral for problem 26.
-
p26_fun.m
evaluates the integrand for problem 26.
-
p26_lim.m
returns the integration limits for problem 26.
-
p27_exact.m
returns the exact integral for problem 27.
-
p27_fun.m
evaluates the integrand for problem 27.
-
p27_lim.m
returns the integration limits for problem 27.
-
p28_exact.m
returns the exact integral for problem 28.
-
p28_fun.m
evaluates the integrand for problem 28.
-
p28_lim.m
returns the integration limits for problem 28.
-
p29_exact.m
returns the exact integral for problem 29.
-
p29_fun.m
evaluates the integrand for problem 29.
-
p29_lim.m
returns the integration limits for problem 29.
-
p30_exact.m
returns the exact integral for problem 30.
-
p30_fun.m
evaluates the integrand for problem 30.
-
p30_lim.m
returns the integration limits for problem 30.
-
p31_exact.m
returns the exact integral for problem 31.
-
p31_fun.m
evaluates the integrand for problem 31.
-
p31_lim.m
returns the integration limits for problem 31.
-
p32_exact.m
returns the exact integral for problem 32.
-
p32_fun.m
evaluates the integrand for problem 32.
-
p32_lim.m
returns the integration limits for problem 32.
-
p33_exact.m
returns the exact integral for problem 33.
-
p33_fun.m
evaluates the integrand for problem 33.
-
p33_lim.m
returns the integration limits for problem 33.
-
p34_exact.m
returns the exact integral for problem 34.
-
p34_fun.m
evaluates the integrand for problem 34.
-
p34_lim.m
returns the integration limits for problem 34.
-
p35_exact.m
returns the exact integral for problem 35.
-
p35_fun.m
evaluates the integrand for problem 35.
-
p35_lim.m
returns the integration limits for problem 35.
-
p36_exact.m
returns the exact integral for problem 36.
-
p36_fun.m
evaluates the integrand for problem 36.
-
p36_lim.m
returns the integration limits for problem 36.
-
p36_param.m
stores parameters for problem 36.
-
p36_param_get.m
gets parameters for problem 36.
-
p36_param_set.m
sets parameters for problem 36.
-
p37_exact.m
returns the exact integral for problem 37.
-
p37_fun.m
evaluates the integrand for problem 37.
-
p37_lim.m
returns the integration limits for problem 37.
-
p37_param.m
stores parameters for problem 37.
-
p37_param_get.m
gets parameters for problem 37.
-
p37_param_set.m
sets parameters for problem 37.
-
p38_exact.m
returns the exact integral for problem 38.
-
p38_fun.m
evaluates the integrand for problem 38.
-
p38_lim.m
returns the integration limits for problem 38.
-
p38_param.m
stores parameters for problem 38.
-
p38_param_get.m
gets parameters for problem 38.
-
p38_param_set.m
sets parameters for problem 38.
-
p39_exact.m
returns the exact integral for problem 39.
-
p39_fun.m
evaluates the integrand for problem 39.
-
p39_lim.m
returns the integration limits for problem 39.
-
p39_param.m
stores parameters for problem 39.
-
p39_param_get.m
gets parameters for problem 39.
-
p39_param_set.m
sets parameters for problem 39.
-
p40_exact.m
returns the exact integral for problem 40.
-
p40_fun.m
evaluates the integrand for problem 40.
-
p40_lim.m
returns the integration limits for problem 40.
-
p40_param.m
stores parameters for problem 40.
-
p40_param_get.m
gets parameters for problem 40.
-
p40_param_set.m
sets parameters for problem 40.
-
p41_exact.m
returns the exact integral for problem 41.
-
p41_fun.m
evaluates the integrand for problem 41.
-
p41_lim.m
returns the integration limits for problem 41.
-
p41_param.m
stores parameters for problem 41.
-
p41_param_get.m
gets parameters for problem 41.
-
p41_param_set.m
sets parameters for problem 41.
-
p42_exact.m
returns the exact integral for problem 42.
-
p42_fun.m
evaluates the integrand for problem 42.
-
p42_lim.m
returns the integration limits for problem 42.
-
p42_param.m
stores parameters for problem 42.
-
p42_param_get.m
gets parameters for problem 42.
-
p42_param_set.m
sets parameters for problem 42.
-
p43_exact.m
returns the exact integral for problem 43.
-
p43_fun.m
evaluates the integrand for problem 43.
-
p43_lim.m
returns the integration limits for problem 43.
-
p43_param.m
stores parameters for problem 43.
-
p43_param_get.m
gets parameters for problem 43.
-
p43_param_set.m
sets parameters for problem 43.
-
p44_exact.m
returns the exact integral for problem 44.
-
p44_fun.m
evaluates the integrand for problem 44.
-
p44_lim.m
returns the integration limits for problem 44.
-
p44_param.m
stores parameters for problem 44.
-
p44_param_get.m
gets parameters for problem 44.
-
p44_param_set.m
sets parameters for problem 44.
-
p45_exact.m
returns the exact integral for problem 45.
-
p45_fun.m
evaluates the integrand for problem 45.
-
p45_lim.m
returns the integration limits for problem 45.
-
p45_param.m
stores parameters for problem 45.
-
p45_param_get.m
gets parameters for problem 45.
-
p45_param_set.m
sets parameters for problem 45.
-
p46_exact.m
returns the exact integral for problem 46.
-
p46_fun.m
evaluates the integrand for problem 46.
-
p46_lim.m
returns the integration limits for problem 46.
-
p46_param.m
stores parameters for problem 46.
-
p46_param_get.m
gets parameters for problem 46.
-
p46_param_set.m
sets parameters for problem 46.
-
p47_exact.m
returns the exact integral for problem 47.
-
p47_fun.m
evaluates the integrand for problem 47.
-
p47_lim.m
returns the integration limits for problem 47.
-
p48_exact.m
returns the exact integral for problem 48.
-
p48_fun.m
evaluates the integrand for problem 48.
-
p48_lim.m
returns the integration limits for problem 48.
-
p49_exact.m
returns the exact integral for problem 49.
-
p49_param.m
stores parameters for problem 49.
-
p49_param_get.m
gets parameters for problem 49.
-
p49_param_set.m
sets parameters for problem 49.
-
p49_fun.m
evaluates the integrand for problem 49.
-
p49_lim.m
returns the integration limits for problem 49.
-
p50_exact.m
returns the exact integral for problem 50.
-
p50_fun.m
evaluates the integrand for problem 50.
-
p50_lim.m
returns the integration limits for problem 50.
-
p50_param.m
stores parameters for problem 50.
-
p50_param_get.m
gets parameters for problem 50.
-
p50_param_set.m
sets parameters for problem 50.
-
p51_exact.m
returns the exact integral for problem 51.
-
p51_fun.m
evaluates the integrand for problem 51.
-
p51_lim.m
returns the integration limits for problem 51.
-
p51_param.m
stores parameters for problem 51.
-
p51_param_get.m
gets parameters for problem 51.
-
p51_param_set.m
sets parameters for problem 51.
-
p52_exact.m
returns the exact integral for problem 52.
-
p52_fun.m
evaluates the integrand for problem 52.
-
p52_lim.m
returns the integration limits for problem 52.
-
p52_param.m
stores parameters for problem 52.
-
p52_param_get.m
gets parameters for problem 52.
-
p52_param_set.m
sets parameters for problem 52.
-
p53_exact.m
returns the exact integral for problem 53.
-
p53_fun.m
evaluates the integrand for problem 53.
-
p53_lim.m
returns the integration limits for problem 53.
-
p53_param.m
stores parameters for problem 53.
-
p53_param_get.m
gets parameters for problem 53.
-
p53_param_set.m
sets parameters for problem 53.
-
p54_exact.m
returns the exact integral for problem 54.
-
p54_fun.m
evaluates the integrand for problem 54.
-
p54_lim.m
returns the integration limits for problem 54.
-
p54_param.m
stores parameters for problem 54.
-
p54_param_get.m
gets parameters for problem 54.
-
p54_param_set.m
sets parameters for problem 54.
-
p55_exact.m
returns the exact integral for problem 55.
-
p55_fun.m
evaluates the integrand for problem 55.
-
p55_lim.m
returns the integration limits for problem 55.
-
p55_param.m
stores parameters for problem 55.
-
p56_exact.m
returns the exact integral for problem 56.
-
p56_fun.m
evaluates the integrand for problem 56.
-
p56_lim.m
returns the integration limits for problem 56.
-
p56_param.m
stores parameters for problem 56.
-
p56_param_get.m
gets parameters for problem 56.
-
p56_param_set.m
sets parameters for problem 56.
-
p57_exact.m
returns the exact integral for problem 57.
-
p57_fun.m
evaluates the integrand for problem 57.
-
p57_lim.m
returns the integration limits for problem 57.
-
p57_param.m
stores parameters for problem 57.
-
p57_param_get.m
gets parameters for problem 57.
-
p57_param_set.m
sets parameters for problem 57.
-
r8_ci.m,
evaluates the Cosine Integral function CI(X).
-
r8_si.m,
evaluates the Sine Integral function SI(X).
-
r8_tiny.m,
returns a "tiny" R8;
-
r8vec_uniform_ab.m,
returns a pseudorandom R8VEC.
-
r89sifg.m,
evaluates terms needed to approximate the Sine Integral function SI(X).
-
s_eqi.m,
compares two strings for equality, ignoring case and trailing blanks;
Last revised on 05 May 2021.