QUADRULE is a FORTRAN90 library which sets up a variety of quadrature rules, used to approximate the integral of a function over various domains in 1D.

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.

### Languages:

QUADRULE is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

### Related Programs:

ALPERT_RULE, a FORTRAN90 library which can set up an Alpert quadrature rule for functions which are regular, log(x) singular, or 1/sqrt(x) singular.

CLENSHAW_CURTIS_RULE, a FORTRAN90 program which defines a Clenshaw Curtis quadrature rule.

INT_EXACTNESS, a FORTRAN90 program which checks the polynomial exactness of a 1-dimensional quadrature rule for a finite interval.

INT_EXACTNESS_LAGUERRE, a FORTRAN90 program which checks the polynomial exactness of a 1-dimensional quadrature rule for a semi-infinite interval.

INT_EXACTNESS_LEGENDRE, a FORTRAN90 program which tests the polynomial exactness of Gauss-Legendre quadrature rules.

INTLIB, a FORTRAN90 library which contains a variety of routines for numerical estimation of integrals in 1D.

KRONROD, a FORTRAN90 library which can compute a Gauss and Gauss-Kronrod pair of quadrature rules of arbitrary order, by Robert Piessens, Maria Branders.

LINE_NCO_RULE, a FORTRAN90 library which computes a Newton Cotes Open (NCO) quadrature rule, using equally spaced points, over the interior of a line segment in 1D.

LOGNORMAL_RULE, a FORTRAN90 program which can compute and print a quadrature rule for functions of a variable whose logarithm is normally distributed.

PATTERSON_RULE, a FORTRAN90 program which returns the points and weights of a 1D Gauss-Patterson quadrature rule of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.

PATTERSON_RULE_COMPUTE, a FORTRAN90 program which computes the points and weights of a 1D Gauss-Patterson quadrature rule of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.

QUADMOM, a FORTRAN90 library which computes a Gaussian quadrature rule for a weight function rho(x) based on the Golub-Welsch procedure that only requires knowledge of the moments of rho(x).

QUADPACK, a FORTRAN90 library which contains a variety of routines for numerical estimation of 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 FORTRAN90 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.

QUADRATURE_WEIGHTS, a FORTRAN90 library which illustrates techniques for computing the weights of a quadrature rule, assuming that the points have been specified.

STROUD, a FORTRAN90 library which contains quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_INT, a FORTRAN90 library which contains a number of functions that may be used as test integrands for quadrature rules in 1D.

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 FORTRAN90 library which computes the weights for interpolatory quadrature rule;
this library is commonly called IQPACK.
This is a version of ACM TOMS algorithm 655.

TRUNCATED_NORMAL_RULE, a FORTRAN90 program which computes a quadrature rule for a normal distribution that has been truncated to [A,+oo), (-oo,B] or [A,B].

### List of Routines:

• CDGQF computes a Gauss quadrature formula with default A, B and simple knots.
• CGQF computes knots and weights of a Gauss quadrature formula.
• CHEBYSHEV_SET sets abscissas and weights for Chebyshev quadrature.
• CHEBYSHEV1_COMPUTE computes a Gauss-Chebyshev type 1 quadrature rule.
• CHEBYSHEV1_INTEGRAL evaluates the Chebyshev type 1 integral of a monomial.
• CHEBYSHEV1_SET sets a Chebyshev Type 1 quadrature rule.
• CHEBYSHEV2_COMPUTE computes a Gauss-Chebyshev type 2 quadrature rule.
• CHEBYSHEV2_INTEGRAL evaluates a monomial Chebyshev type 2 integral.
• CHEBYSHEV2_SET sets a Chebyshev Type 2 quadrature rule.
• CHEBYSHEV3_COMPUTE computes a Gauss-Chebyshev type 3 quadrature rule.
• CHEBYSHEV3_INTEGRAL evaluates the Chebyshev type 3 integral of a monomial.
• CHEBYSHEV3_SET sets a Chebyshev Type 3 quadrature rule.
• CLASS_MATRIX computes the Jacobi matrix for a 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_INTEGRAL: integral of a monomial with Gegenbauer weight.
• GEGENBAUER_EK_COMPUTE computes a Gauss-Gegenbauer quadrature rule.
• GEGENBAUER_SS_COMPUTE computes a Gauss-Gegenbauer quadrature rule.
• GEGENBAUER_SS_RECUR: value and derivative of a Gegenbauer polynomial.
• GEGENBAUER_SS_ROOT improves an approximate root of a Gegenbauer polynomial.
• GEN_HERMITE_DR_COMPUTE computes a generalized Gauss-Hermite rule.
• GEN_HERMITE_EK_COMPUTE computes a generalized Gauss-Hermite quadrature rule.
• GEN_HERMITE_INTEGRAL evaluates a monomial generalized Hermite integral.
• GEN_LAGUERRE_EK_COMPUTE: generalized Gauss-Laguerre quadrature rule.
• GEN_LAGUERRE_INTEGRAL evaluates a monomial genearlized Laguerre integral.
• GEN_LAGUERRE_SS_COMPUTE: generalized Gauss-Laguerre quadrature rule.
• GEN_LAGUERRE_SS_RECUR evaluates a generalized Laguerre polynomial.
• GEN_LAGUERRE_SS_ROOT seeks roots of a generalized Laguerre polynomial.
• HERMITE_EK_COMPUTE computes a Gauss-Hermite quadrature rule.
• HERMITE_GK16_SET sets a Hermite Genz-Keister 16 rule.
• HERMITE_GK18_SET sets a Hermite Genz-Keister 18 rule.
• HERMITE_GK22_SET sets a Hermite Genz-Keister 22 rule.
• HERMITE_GK24_SET sets a Hermite Genz-Keister 24 rule.
• HERMITE_INTEGRAL evaluates a monomial Hermite integral.
• HERMITE_SET sets abscissas and weights for Hermite quadrature.
• HERMITE_1_SET sets abscissas and weights for Hermite quadrature.
• HERMITE_SS_COMPUTE computes a Gauss-Hermite quadrature rule.
• HERMITE_SS_RECUR finds the value and derivative of a Hermite polynomial.
• HERMITE_SS_ROOT improves an approximate root of a Hermite polynomial.
• IMTQL2 computes all eigenvalues/vectors of a symmetric tridiagonal matrix.
• IMTQLX diagonalizes a symmetric tridiagonal matrix.
• JACOBI_EK_COMPUTE: Elhay-Kautsky method for Gauss-Jacobi quadrature rule.
• JACOBI_INTEGRAL evaluates the integral of a monomial with Jacobi weight.
• JACOBI_SS_COMPUTE computes a Gauss-Jacobi quadrature rule.
• JACOBI_SS_RECUR finds the value and derivative of a Jacobi polynomial.
• JACOBI_SS_ROOT improves an approximate root of a Jacobi polynomial.
• KRONROD_SET sets abscissas and weights for Gauss-Kronrod quadrature.
• LAGUERRE_EK_COMPUTE: Laguerre quadrature rule by the Elhay-Kautsky method.
• LAGUERRE_INTEGRAL evaluates a monomial Laguerre integral.
• LAGUERRE_SET sets abscissas and weights for Laguerre quadrature.
• LAGUERRE_1_SET sets abscissas and weights for Laguerre quadrature.
• LAGUERRE_SS_COMPUTE computes a Gauss-Laguerre quadrature rule.
• LAGUERRE_SS_RECUR finds the value and derivative of a Laguerre polynomial.
• LAGUERRE_SS_ROOT improves an approximate root of a Laguerre polynomial.
• LAGUERRE_SUM carries out Laguerre quadrature over [ A, +oo ).
• LEGENDRE_DR_COMPUTE: Gauss-Legendre quadrature by Davis-Rabinowitz method.
• LEGENDRE_EK_COMPUTE: Legendre quadrature rule by the Elhay-Kautsky method.
• LEGENDRE_GW_COMPUTE: Legendre quadrature rule by the Golub-Welsch method.
• LEGENDRE_INTEGRAL evaluates a monomial Legendre integral.
• LEGENDRE_SET sets abscissas and weights for Gauss-Legendre quadrature.
• LEGENDRE_SS_COMPUTE: Gauss-Legendre quadrature by Stroud-Secrest method.
• LEGENDRE_SS_RECUR: value and derivative of a scaled Legendre polynomial.
• LEGENDRE_SS_ROOT: improve approximate root of scaled Legendre polynomial.
• LOBATTO_COMPUTE computes a Lobatto quadrature rule.
• LOBATTO_SET sets abscissas and weights for Lobatto quadrature.
• NC_COMPUTE_WEIGHTS computes weights for a Newton-Cotes quadrature rule.
• NCC_COMPUTE: Newton-Cotes Closed quadrature rule.
• NCC_SET sets abscissas and weights for Newton-Cotes closed 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 Newton-Cotes "open half" quadrature.
• PARCHK checks parameters ALPHA and BETA for classical weight functions.
• PATTERSON_SET sets abscissas and weights for Gauss-Patterson quadrature.
• PSI_VALUES returns some values of the Psi or Digamma function.
• PYTHAG computes SQRT ( A * A + B * B ) carefully.
• R8_EPSILON returns the R8 roundoff unit.
• R8_FACTORIAL computes the factorial of N.
• R8_FACTORIAL2 computes the double factorial function of N.
• R8_GAMMA evaluates Gamma(X) for a real argument.
• R8_HYPER_2F1 evaluates the hypergeometric function F(A,B,C,X).
• R8_PSI evaluates the function Psi(X).
• R8VEC_LINSPACE creates a vector of linearly spaced values.
• R8VEC_PRINT prints an R8VEC.
• R8VEC_REVERSE reverses the elements of an R8VEC.