QUADRULE
Quadrature Rules
QUADRULE is a C++ library,
using double precision arithmetic,
which sets up a variety of
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.
Related Programs:
CLENSHAW_CURTIS
is a C++ library which
sets up a Clenshaw Curtis quadrature grid in multiple dimensions.
DUNAVANT
is a C++ library which
defines Dunavant rules for quadrature on a triangle.
FEKETE
is a C++ library of routines for defining
a Fekete rule for quadrature or interpolation over a triangle.
FELIPPA
is a MATHEMATICA library which
defines quadrature rules for lines, triangles, quadrilaterals,
pyramids, wedges, tetrahedrons and hexahedrons.
INTLIB
is a FORTRAN90 library of routines for numerical estimation of integrals.
KEAST
is a C++ library which defines a number of quadrature rules
for a tetrahedron.
NCC_TETRAHEDRON
is a C++ library defining Newton-Cotes closed quadrature
rules on a tetrahedron.
NCC_TRIANGLE
is a C++ library defining Newton-Cotes closed quadrature
rules on a triangle.
NCO_TETRAHEDRON
is a C++ library defining Newton-Cotes open quadrature
rules on a tetrahedron.
NCO_TRIANGLE
is a C++ library defining Newton-Cotes open quadrature
rules on a triangle.
NINT_EXACTNESS
is a C++ program which demonstrates how to measure the
polynomial exactness of a multidimensional quadrature rule.
NINT_EXACTNESS_TRI
is an executable C++ program which investigates the polynomial
exactness of a quadrature rule for the triangle.
NINTLIB
is a C++ library containing a variety
of routines for numerical estimation of integrals in multiple dimensions.
PRODUCT_RULE
is an executable C++ program which
can create a multidimensional quadrature rule as a product of
one dimensional rules.
QUADPACK
is a FORTRAN90 library containing a variety of routines for
numerical estimation of integrals in 1D.
QUADRATURE_RULES
is a dataset directory which
contains sets of files that define quadrature
rules over various 1D intervals or multidimensional hypercubes.
QUADRATURE_RULES_TET
is a dataset directory of triples of files defining various quadrature
rules on tetrahedrons.
QUADRATURE_RULES_TRI
is a collection of quadrature rules to be applied to triangular
regions.
QUADRATURE_TEST
an executable 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 is also available in
a FORTRAN90 version
and
a MATLAB version.
STROUD
is a C++ library which
defines quadrature rules for a variety of unusual areas, surfaces and volumes in 2D,
3D and N-dimensions.
TEST_INT
is a FORTRAN90 library of routines defining a
number of functions that may be used as test integrands for
quadrature rules.
TEST_NINT
is a C++ library containing a
number of functions that may be used as test integrands for
quadrature rules in multiple dimensions.
TEST_TRI_INT
is a C++ library of functions that can be used to test algorithms
for quadrature over a triangle.
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 for the "automatic" integration of a function.
WANDZURA is a C++ library of routines
for defining Wandzura rules for quadrature
on a triangle.
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.
-
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,
to appear.
-
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:
Examples and Tests:
List of Routines:
-
BASHFORTH_SET sets abscissas and weights for Adams-Bashforth quadrature.
-
BDF_SET sets weights for backward differentiation ODE weights.
-
BDFC_SET sets weights for backward differentiation corrector quadrature.
-
BDFP_SET sets weights for backward differentiation predictor quadrature.
-
BDF_SUM carries out explicit backward difference quadrature on [0,1].
-
CH_CAP capitalizes a single character.
-
CHEB_SET sets abscissas and weights for Chebyshev quadrature.
-
CHEBYSHEV1_COMPUTE computes a Gauss-Chebyshev type 1 quadrature rule.
-
CHEBYSHEV1_INTEGRAL evaluates a monomial Chebyshev type 1 integral.
-
CHEBYSHEV2_COMPUTE computes a Gauss-Chebyshev type 2 quadrature rule.
-
CHEBYSHEV2_INTEGRAL evaluates a monomial Chebyshev type 2 integral.
-
CHEBYSHEV3_COMPUTE computes a Gauss-Chebyshev type 3 quadrature rule.
-
CLENSHAW_CURTIS_COMPUTE computes a Clenshaw Curtis quadrature rule.
-
CLENSHAW_CURTIS_SET sets a Clenshaw-Curtis quadrature rule.
-
FEJER1_COMPUTE computes a Fejer type 1 quadrature rule.
-
FEJER1_SET sets abscissas and weights for Fejer type 1 quadrature.
-
FEJER2_COMPUTE computes a Fejer type 2 quadrature rule.
-
FEJER2_SET sets abscissas and weights for Fejer type 2 quadrature.
-
GEGENBAUER_COMPUTE computes a Gauss-Gegenbauer quadrature rule.
-
GEGENBAUER_INTEGRAL evaluates the integral of a monomial with Gegenbauer weight.
-
GEGENBAUER_RECUR finds the value and derivative of a Gegenbauer polynomial.
-
GEGENBAUER_ROOT improves an approximate root of a Gegenbauer polynomial.
-
GEN_HERMITE_COMPUTE computes a generalized Gauss-Hermite rule.
-
GEN_HERMITE_INTEGRAL evaluates a monomial generalized Hermite integral.
-
GEN_LAGUERRE_COMPUTE computes a generalized Gauss-Laguerre quadrature rule.
-
GEN_LAGUERRE_INTEGRAL evaluates a monomial generalized Laguerre integral.
-
GEN_LAGUERRE_RECUR evaluates a generalized Laguerre polynomial.
-
GEN_LAGUERRE_ROOT improves a root of a generalized Laguerre polynomial.
-
HERMITE_COMPUTE computes a Gauss-Hermite quadrature rule.
-
HERMITE_INTEGRAL evaluates a monomial Hermite integral.
-
HERMITE_RECUR finds the value and derivative of a Hermite polynomial.
-
HERMITE_ROOT improves an approximate root of a Hermite polynomial.
-
HERMITE_SET sets abscissas and weights for Hermite quadrature.
-
I4_FACTORIAL2 computes the double factorial function N!!
-
I4_MIN returns the smaller of two I4's.
-
I4_POWER returns the value of I^J.
-
JACOBI_COMPUTE computes a Gauss-Jacobi quadrature rule.
-
JACOBI_INTEGRAL evaluates the integral of a monomial with Jacobi weight.
-
JACOBI_RECUR finds the value and derivative of a Jacobi polynomial.
-
JACOBI_ROOT improves an approximate root of a Jacobi polynomial.
-
KRONROD_SET sets abscissas and weights for Gauss-Kronrod quadrature.
-
LAGUERRE_COMPUTE computes a Gauss-Laguerre quadrature rule.
-
LAGUERRE_INTEGRAL evaluates a monomial Laguerre integral.
-
LAGUERRE_RECUR evaluates a Laguerre polynomial.
-
LAGUERRE_ROOT improves a root of a Laguerre polynomial.
-
LAGUERRE_SET sets abscissas and weights for Laguerre quadrature.
-
LAGUERRE_SUM carries out Laguerre quadrature over [ A, +oo ).
-
LEGENDRE_COMPUTE computes a Gauss-Legendre quadrature rule.
-
LEGENDRE_INTEGRAL evaluates a monomial Legendre integral.
-
LEGENDRE_RECUR finds the value and derivative of a Legendre polynomial.
-
LEGENDRE_SET sets abscissas and weights for Gauss-Legendre quadrature.
-
LEGENDRE_SET_COS: Gauss-Legendre rules for COS(X)*F(X) on [-PI/2,PI/2].
-
LEGENDRE_SET_COS2: Gauss-Legendre rules for COS(X)*F(X) on [0,PI/2].
-
LEGENDRE_SET_LOG sets a Gauss-Legendre rule for - LOG(X) * F(X) on [0,1].
-
LEGENDRE_SET_SQRTX_01 sets Gauss-Legendre rules for SQRT(X)*F(X) on [0,1].
-
LEGENDRE_SET_SQRTX2_01: Gauss-Legendre rules for F(X)/SQRT(X) on [0,1].
-
LEGENDRE_SET_X0_01 sets a Gauss-Legendre rule for F(X) on [0,1].
-
LEGENDRE_SET_X1 sets a Gauss-Legendre rule for ( 1 + X ) * F(X) on [-1,1].
-
LEGENDRE_SET_X1_01 sets a Gauss-Legendre rule for X * F(X) on [0,1].
-
LEGENDRE_SET_X2 sets Gauss-Legendre rules for ( 1 + X )^2*F(X) on [-1,1].
-
LEGENDRE_SET_X2_01 sets a Gauss-Legendre rule for X**2 * F(X) on [0,1].
-
LOBATTO_COMPUTE computes a Lobatto quadrature rule.
-
LOBATTO_SET sets abscissas and weights for Lobatto quadrature.
-
LOG_GAMMA calculates the natural logarithm of GAMMA(X).
-
MOULTON_SET sets weights for Adams-Moulton quadrature.
-
NC_COMPUTE computes a Newton-Cotes quadrature rule.
-
NCC_COMPUTE computes a Newton-Cotes closed quadrature rule.
-
NCC_SET sets abscissas and weights for closed Newton-Cotes quadrature.
-
NCO_COMPUTE computes a Newton-Cotes open quadrature rule.
-
NCO_SET sets abscissas and weights for open Newton-Cotes quadrature.
-
NCOH_COMPUTE computes a Newton-Cotes "open half" quadrature rule.
-
NCOH_SET sets abscissas and weights for "open half" Newton-Cotes rules.
-
PATTERSON_SET sets abscissas and weights for Gauss-Patterson quadrature.
-
R8_ABS returns the absolute value of an R8.
-
R8_EPSILON returns the R8 roundoff unit.
-
R8_FACTORIAL computes the factorial of N, also denoted "N!".
-
R8_FACTORIAL2 computes the double factorial function N!!
-
R8_GAMMA evaluates Gamma(X) for a real argument.
-
R8_PSI evaluates the function Psi(X).
-
R8_HUGE returns a "huge" R8.
-
R8_HYPER_2F1 evaluates the hypergeometric function 2F1(A,B,C,X).
-
R8_MAX returns the maximum of two R8's.
-
R8VEC_COPY copies an R8VEC.
-
R8VEC_DOT computes the dot product of a pair of R8VEC's.
-
R8VEC_REVERSE reverses the elements of an R8VEC.
-
RADAU_COMPUTE computes a Radau quadrature rule.
-
RADAU_SET sets abscissas and weights for Radau quadrature.
-
RULE_ADJUST maps a quadrature rule from [A,B] to [C,D].
-
S_EQI reports whether two strings are equal, ignoring case.
-
SUM_SUB carries out a composite quadrature rule.
-
SUMMER carries out a quadrature rule over a single interval.
-
SUMMER_GK carries out Gauss-Kronrod quadrature over a single interval.
-
SUM_SUB_GK carries out a composite Gauss-Kronrod rule.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 04 March 2008.