QUADRULE
Quadrature Rules
QUADRULE
is a MATLAB library which
sets quadrature rules, used to approximate the integral of a function
over various domains.
QUADRULE returns the abscissas and weights for a variety of
one dimensional quadrature rules for approximating the integral
of a function. The best rule is generally Gauss-Legendre quadrature,
but other rules offer special features, including the ability to
handle certain weight functions, to approximate an integral
on an infinite integration region, or to estimate the approximation
error.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
QUADRULE is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATHEMATICA version and
a MATLAB version.
Related Data and Programs:
CLENSHAW_CURTIS_RULE,
a MATLAB library which
defintes a multiple dimension Clenshaw Curtis quadrature rule.
INTLIB,
a FORTRAN90 library which
carries out numerical estimation of integrals in 1D.
QUADPACK,
a FORTRAN90 library which
numerically estimates integrals in 1D.
QUADRATURE_RULES,
a dataset directory which
contains sets of files that define quadrature
rules over various 1D intervals or multidimensional hypercubes.
QUADRATURE_TEST,
a MATLAB program which
reads the definition of a
multidimensional quadrature rule from three files, applies
the rule to a number of test integrals, and prints the results.
QUADRULE_FAST,
a MATLAB library which
defines efficient versions of a few 1D quadrature rules.
TANH_QUAD,
a MATLAB library which
sets up the tanh quadrature rule;
TEST_INT,
a MATLAB library which
defines test integrands for 1D quadrature rules.
TOMS351,
a FORTRAN77 library which
estimates an integral using Romberg integration.
TOMS379,
a FORTRAN77 library which
estimates an integral.
TOMS418,
a FORTRAN77 library which
estimates the integral of a function with a sine or cosine factor.
TOMS424,
a FORTRAN77 library which
estimates the integral of a function using Clenshaw-Curtis quadrature.
TOMS468,
a FORTRAN77 library which
carries out the "automatic" integration of a function.
TOMS655,
a MATLAB library which
computes the weights for interpolatory quadrature rule;
this library is commonly called IQPACK;
this is a MATLAB version of ACM TOMS algorithm 655.
Reference:
-
Milton Abramowitz, Irene Stegun,
Handbook of Mathematical Functions,
National Bureau of Standards, 1964,
ISBN: 0-486-61272-4,
LC: QA47.A34.
-
Claudio Canuto, Yousuff Hussaini, Alfio Quarteroni, Thomas Zang,
Spectral Methods in Fluid Dynamics,
Springer, 1993,
ISNB13: 978-3540522058,
LC: QA377.S676.
-
Charles Clenshaw, Alan Curtis,
A Method for Numerical Integration on an Automatic Computer,
Numerische Mathematik,
Volume 2, Number 1, December 1960, pages 197-205.
-
Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
-
Sylvan Elhay, Jaroslav Kautsky,
Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of
Interpolatory Quadrature,
ACM Transactions on Mathematical Software,
Volume 13, Number 4, December 1987, pages 399-415.
-
Hermann Engels,
Numerical Quadrature and Cubature,
Academic Press, 1980,
ISBN: 012238850X,
LC: QA299.3E5.
-
Gwynne Evans,
Practical Numerical Integration,
Wiley, 1993,
ISBN: 047193898X,
LC: QA299.3E93.
-
Simeon Fatunla,
Numerical Methods for Initial Value Problems in Ordinary
Differential Equations,
Academic Press, 1988,
ISBN: 0122499301,
LC: QA372.F35.
-
Walter Gautschi,
Numerical Quadrature in the Presence of a Singularity,
SIAM Journal on Numerical Analysis,
Volume 4, Number 3, September 1967, pages 357-362.
-
Alan Genz, Bradley Keister,
Fully symmetric interpolatory rules for multiple integrals
over infinite regions with Gaussian weight,
Journal of Computational and Applied Mathematics,
Volume 71, 1996, pages 299-309.
-
Florian Heiss, Viktor Winschel,
Likelihood approximation by numerical integration on sparse grids,
Journal of Econometrics,
Volume 144, 2008, pages 62-80.
-
Francis Hildebrand,
Introduction to Numerical Analysis,
Dover, 1987,
ISBN13: 978-0486653631,
LC: QA300.H5.
-
Zdenek Kopal,
Numerical Analysis,
John Wiley, 1955,
LC: QA297.K6.
-
Vladimir Krylov,
Approximate Calculation of Integrals,
Dover, 2006,
ISBN: 0486445798,
LC: QA311.K713.
-
Prem Kythe, Michael Schaeferkotter,
Handbook of Computational Methods for Integration,
Chapman and Hall, 2004,
ISBN: 1-58488-428-2,
LC: QA299.3.K98.
-
Leon Lapidus, John Seinfeld,
Numerical Solution of Ordinary Differential Equations,
Mathematics in Science and Engineering, Volume 74,
Academic Press, 1971,
ISBN: 0124366503,
LC: QA3.M32.v74
-
Thomas Patterson,
The Optimal Addition of Points to Quadrature Formulae,
Mathematics of Computation,
Volume 22, Number 104, October 1968, pages 847-856.
-
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.
-
Lloyd Trefethen,
Is Gauss Quadrature Better Than Clenshaw-Curtis?,
SIAM Review,
Volume 50, Number 1, March 2008, pages 67-87.
-
Joerg Waldvogel,
Fast Construction of the Fejer and Clenshaw-Curtis
Quadrature Rules,
BIT Numerical Mathematics,
Volume 43, Number 1, 2003, pages 1-18.
-
Stephen Wolfram,
The Mathematica Book,
Fourth Edition,
Cambridge University Press, 1999,
ISBN: 0-521-64314-7,
LC: QA76.95.W65.
-
Daniel Zwillinger, editor,
CRC Standard Mathematical Tables and Formulae,
30th Edition,
CRC Press, 1996,
ISBN: 0-8493-2479-3,
LC: QA47.M315.
Source Code:
-
bashforth_set.m,
sets abscissas and weights for Adams-Bashforth quadrature.
-
bdf_set.m,
sets weights for backward differentiation ODE weights.
-
bdfc_set.m,
sets weights for backward differentiation corrector quadrature.
-
bdfp_set.m,
sets weights for backward differentiation predictor quadrature.
-
bdf_sum.m,
carries out an explicit backward difference quadrature rule for [0,1].
-
cheb_set.m,
sets abscissas and weights for Chebyshev quadrature.
-
chebyshev1_compute.m
computes a Gauss-Chebyshev type 1 quadrature rule.
-
chebyshev1_integral.m
evaluates a monomial Chebyshev type 1 integral.
-
chebyshev2_compute.m
computes a Gauss-Chebyshev type 2 quadrature rule.
-
chebyshev2_integral.m
evaluates a monomial Chebyshev type 2 integral.
-
chebyshev3_compute.m,
computes a Gauss-Chebyshev type 3 quadrature rule.
-
clenshaw_curtis_compute.m,
computes a Clenshaw-Curtis quadrature rule.
-
clenshaw_curtis_set.m,
sets up Clenshaw-Curtis quadrature.
-
fejer1_compute.m,
computes a Fejer type 1 quadrature rule.
-
fejer1_set.m,
sets a Fejer type 1 quadrature rule.
-
fejer2_compute.m,
computes a Fejer type 2 quadrature rule.
-
fejer2_set.m,
sets a Fejer type 2 quadrature rule.
-
gegenbauer_compute.m
computes a Gauss-Gegenbauer quadrature rule.
-
gegenbauer_integral.m
evaluates the integral of a monomial with Gegenbauer weight.
-
gegenbauer_recur.m
finds the value and derivative of a Gegenbauer polynomial.
-
gegenbauer_root.m
improves an approximate root of a Gegenbauer polynomial.
-
gen_hermite_dr_compute.m,
computes a generalized Gauss-Hermite quadrature rule.
-
gen_hermite_ek_compute.m,
computes a generalized Gauss-Hermite quadrature rule.
-
gen_hermite_integral.m,
evaluates a monomial generalized Hermite integral.
-
gen_laguerre_ek_compute.m,
computes a generalized Gauss-Laguerre quadrature rule.
-
gen_laguerre_integral.m,
evaluates a monomial generalized Laguerre integral.
-
gen_laguerre_ss_compute.m,
computes a generalized Gauss-Laguerre quadrature rule.
-
gen_laguerre_ss_recur.m,
finds the value and derivative of a generalized Laguerre polynomial.
-
gen_laguerre_ss_root.m,
improves an approximate root of a generalized Laguerre polynomial.
-
hermite_ek_compute.m,
computes a Gauss-Hermite quadrature rule.
-
hermite_gk16_set.m,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk18_set.m,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk22_set.m,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk24_set.m,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_integral.m,
returns the value of a Hermite integral.
-
hermite_set.m,
sets abscissas and weights for Hermite quadrature.
-
hermite_ss_compute.m,
computes a Gauss-Hermite quadrature rule.
-
hermite_ss_recur.m,
finds the value and derivative of a Hermite polynomial.
-
hermite_ss_root.m,
improves an approximate root of a Hermite polynomial.
-
imtqlx.m
diagonalizes a symmetric tridiagonal matrix.
-
jacobi_ek_compute.m,
computes a Gauss-Jacobi quadrature rule.
-
jacobi_integral.m,
evaluates the integral of a monomial with Jacobi weight.
-
jacobi_ss_compute.m,
computes a Gauss-Jacobi quadrature rule.
-
jacobi_ss_recur.m,
finds the value and derivative of a Jacobi polynomial.
-
jacobi_ss_root.m,
improves an approximate root of a Jacobi polynomial.
-
kronrod_set.m,
sets abscissas and weights for Gauss-Kronrod quadrature.
-
laguerre_ek_compute.m,
computes a Gauss-Laguerre quadrature rule.
-
laguerre_integral.m,
evaluates a monomial Laguerre integral.
-
laguerre_set.m,
sets abscissas and weights for Laguerre quadrature.
-
laguerre_ss_compute.m,
computes a Gauss-Laguerre quadrature rule.
-
laguerre_ss_recur.m,
finds the value and derivative of a Laguerre polynomial.
-
laguerre_ss_root.m,
improves an approximate root of a Laguerre polynomial.
-
laguerre_sum.m,
carries out Laguerre quadrature over [ A, +oo ).
-
legendre_dr_compute.m,
Gauss-Legendre quadrature by Davis-Rabinowitz method.
-
legendre_ek_compute.m,
Gauss-Legendre quadrature by Elhay-Kautsky method.
-
legendre_integral.m,
evaluates a monomial Legendre integral.
-
legendre_recur.m,
finds the value and derivative of a Legendre polynomial.
-
legendre_set.m,
sets abscissas and weights for Gauss-Legendre quadrature.
-
legendre_set_cos.m,
sets a Gauss-Legendre rule for COS(X) * F(X) on [-PI/2,PI/2].
-
legendre_set_cos2.m,
sets a Gauss-Legendre rule for COS(X) * F(X) on [0,PI/2].
-
legendre_set_log.m,
sets a Gauss-Legendre rule for - LOG(X) * F(X) on [0,1].
-
legendre_set_sqrtx_01.m,
sets a Gauss-Legendre rule for SQRT(X) * F(X) on [0,1].
-
legendre_set_sqrtx2_01.m,
sets a Gauss-Legendre rule for F(X) / SQRT(X) on [0,1].
-
legendre_set_x0_01.m,
sets a Gauss-Legendre rule for F(X) on [0,1].
-
legendre_set_x1.m,
sets a Gauss-Legendre rule for ( 1 + X ) * F(X) on [-1,1].
-
legendre_set_x1_01.m,
sets a Gauss-Legendre rule for X * F(X) on [0,1].
-
legendre_set_x2.m,
sets a Gauss-Legendre rule for ( 1 + X )**2 * F(X) on [-1,1].
-
legendre_set_x2_01.m,
sets a Gauss-Legendre rule for X**2 * F(X) on [0,1].
-
lobatto_compute.m,
computes abscissas and weights for Lobatto quadrature.
-
lobatto_set.m,
sets abscissas and weights for Lobatto quadrature.
-
moulton_set.m,
sets weights for Adams-Moulton quadrature.
-
nc_compute.m,
computes a Newton-Cotes quadrature rule.
-
ncc_compute.m,
computes a Newton-Cotes Closed quadrature rule.
-
ncc_compute_points.m,
points of a Newton-Cotes Closed quadrature rule.
-
ncc_compute_weights.m,
weights of a Newton-Cotes Closed quadrature rule.
-
ncc_set.m,
sets abscissas and weights for Newton-Cotes Closed quadrature.
-
nco_compute.m,
computes a Newton-Cotes Open quadrature rule.
-
nco_compute_points.m,
points of a Newton-Cotes Open quadrature rule.
-
nco_compute_weights.m,
weights of a Newton-Cotes Open quadrature rule.
-
nco_set.m,
sets abscissas and weights for Newton-Cotes Open quadrature.
-
ncoh_compute.m,
computes a Newton-Cotes "open half" quadrature rule.
-
ncoh_compute_points.m,
computes points for a Newton-Cotes "open half" quadrature rule.
-
ncoh_compute_weights.m,
computes weights for a Newton-Cotes "open half" quadrature rule.
-
ncoh_set.m,
sets abscissas and weights for Newton-Cotes "open-half" quadrature.
-
patterson_set.m,
sets abscissas and weights for Patterson quadrature.
-
r8_factorial.m,
evaluates the factorial function.
-
r8_factorial2.m,
evaluates the double factorial function.
-
r8_hyper_2f1.m,
evaluates the hypergeometric function F(A,B,C,X).
-
r8_psi.m,
evaluates the Psi function.
-
r8_sign.m
returns the sign of an R8.
-
r8vec_reverse.m,
reverses the elements of an R8VEC.
-
radau_compute.m,
computes abscissas and weights for Radau quadrature.
-
radau_set.m,
sets abscissas and weights for Radau quadrature.
-
rule_adjust.m,
maps a quadrature rule from [A,B] to [C,D].
-
summer.m,
carries out a quadrature rule over a single interval.
-
summer_gk.m,
carries out Gauss-Kronrod quadrature over a single interval.
-
sum_sub.m,
carries out a composite quadrature rule.
-
sum_sub_gk.m,
carries out a composite Gauss-Kronrod rule.
-
timestamp.m,
prints the current YMDHMS date as a time stamp.
Examples and Tests:
-
quadrule_test.m,
calls all the tests;
-
quadrule_test_output.txt,
the output from a rule of all the tests;
-
quadrule_test01.m,
tests BASHFORTH_SET and SUMMER;
-
quadrule_test02.m,
tests BDFC_SET and BDF_SUM;
-
quadrule_test03.m,
tests BDFP_SET and BDF_SUM;
-
quadrule_test04.m,
tests CHEB_SET and SUM_SUB.
-
quadrule_test05.m,
tests CHEBYSHEV1_COMPUTE and SUMMER.
-
quadrule_test06.m,
tests CHEBYSHEV2_COMPUTE and SUMMER.
-
quadrule_test07.m,
tests CHEBYSHEV3_COMPUTE and SUMMER.
-
quadrule_test0725.m,
tests CLENSHAW_CURTIS_COMPUTE.
-
quadrule_test075.m,
tests CLENSHAW_CURTIS_SET and SUMMER.
-
quadrule_test076.m,
compares FEJER1_SET and FEJER1_COMPUTE.
-
quadrule_test078.m,
compares FEJER2_SET and FEJER2_COMPUTE.
-
quadrule_test08.m,
tests HERMITE_COMPUTE and SUMMER.
-
quadrule_test085.m,
tests HERMITE_COMPUTE and HERMITE_INTEGRAL.
-
quadrule_test087.m,
tests HERMITE_SET.
-
quadrule_test09.m,
tests HERMITE_SET and SUMMER.
-
quadrule_test095.m,
tests HERMITE_GK16_SET.
-
quadrule_test096.m,
tests HERMITE_GK**_SET.
-
quadrule_test10.m,
tests JACOBI_EK_COMPUTE and SUM_SUB.
-
quadrule_test105.m,
tests JACOBI_EK_COMPUTE and JACOBI_SS_COMPUTE.
-
quadrule_test108.m,
tests JACOBI_EK_COMPUTE.
-
quadrule_test11.m,
tests KRONROD_SET, LEGENDRE_SET and SUMMER_GK.
-
quadrule_test12.m,
tests KRONROD_SET, LEGENDRE_SET and SUM_SUB_GK.
-
quadrule_test13.m,
tests LAGUERRE_EK_COMPUTE and LAGUERRE_SUM.
-
quadrule_test14.m,
tests LAGUERRE_EK_COMPUTE and LAGUERRE_SUM.
-
quadrule_test15.m,
tests GEN_LAGUERRE_EK_COMPUTE.
-
quadrule_test16.m,
tests GEN_LAGUERRE_EK_COMPUTE.
-
quadrule_test165.m,
tests GEN_LAGUERRE_EK_COMPUTE.
-
quadrule_test17.m,
tests LAGUERRE_SET and LAGUERRE_SUM.
-
quadrule_test18.m,
tests LEGENDRE_EK_COMPUTE and LEGENDRE_SET.
-
quadrule_test185.m,
tests LEGENDRE_EK_COMPUTE.
-
quadrule_test19.m,
tests LEGENDRE_EK_COMPUTE and SUM_SUB.
-
quadrule_test20.m,
tests LEGENDRE_EK_COMPUTE and SUM_SUB.
-
quadrule_test21.m,
tests LEGENDRE_SET and SUM_SUB.
-
quadrule_test22.m,
tests LEGENDRE_SET, LEGENDRE_SET_X0_01 and RULE_ADJUST.
-
quadrule_test23.m,
tests LEGENDRE_SET_COS and SUM_SUB.
-
quadrule_test24.m,
tests LEGENDRE_SET_SQRTX_01 and SUM_SUB.
-
quadrule_test25.m,
tests LEGENDRE_SET_SQRTX2_01 and SUM_SUB.
-
quadrule_test26.m,
tests LEGENDRE_SET_COS2 and SUM_SUB.
-
quadrule_test27.m,
tests LEGENDRE_SET_LOG and SUM_SUB.
-
quadrule_test28.m,
tests LEGENDRE_SET_X0_01 and SUM_SUB.
-
quadrule_test29.m,
tests LEGENDRE_SET_X1 and SUM_SUB.
-
quadrule_test30.m,
tests LEGENDRE_SET_X1, LEGENDRE_SET_X1_01 and RULE_ADJUST.
-
quadrule_test31.m,
tests LEGENDRE_SET_X1_01 and SUM_SUB.
-
quadrule_test32.m,
tests LEGENDRE_SET_X2 and SUM_SUB
-
quadrule_test33.m,
tests LEGENDRE_SET_X2, LEGENDRE_SET_X2_01 and RULE_ADJUST.
-
quadrule_test34.m,
tests LEGENDRE_SET_X2_01 and SUM_SUB
-
quadrule_test345.m,
tests LOBATTO_COMPUTE and LOBATTO_SET.
-
quadrule_test35.m,
tests LOBATTO_SET and SUM_SUB.
-
quadrule_test36.m,
tests MOULTON_SET and SUMMER.
-
quadrule_test37.m,
tests NCC_SET and SUM_SUB.
-
quadrule_test38.m,
tests NCC_COMPUTE and SUM_SUB.
-
quadrule_test39.m,
tests NCO_SET and SUM_SUB.
-
quadrule_test40.m,
tests NCO_COMPUTE and SUM_SUB.
-
quadrule_test401.m,
tests NCOH_SET and SUM_SUB.
-
quadrule_test402.m,
tests NCOH_COMPUTE and SUM_SUB.
-
quadrule_test403.m,
tests PATTERSON_SET and SUM_SUB.
-
quadrule_test404.m,
tests RADAU_COMPUTE and RADAU_SET.
-
quadrule_test41.m,
tests RADAU_SET and SUM_SUB.
-
f1sd1.m,
evaluates the function 1.0D+00/ sqrt ( 1.1 - x**2 ).
-
fxsd1.m,
evaluates the function x / sqrt ( 1.1 - x**2 ).
-
fx2sd1.m,
evaluates the function x**2 / sqrt ( 1.1 - x**2 ).
-
func.m,
evaluates a function of X, as chosen by the user.
-
func_set.m,
sets the function to be returned by FUNC.
-
fname.m,
returns the name of the function that will be evaluated in FUNC.
You can go up one level to
the MATLAB source codes.
Last revised on 02 May 2011.