Quadrature Rules

**QUADRULE**,
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.

The computer files described and made available on this web page are distributed under the GNU LGPL license.

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

ALPERT_RULE, a MATLAB 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 MATLAB library which defines a multiple dimension Clenshaw Curtis quadrature rule.

LINE_FELIPPA_RULE, a MATLAB library which returns the points and weights of a Felippa quadrature rule over the interior of a line segment in 1D.

QUADMOM, a MATLAB 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).

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.

TEST_INT, a MATLAB library which defines test integrands for 1D quadrature rules.

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.

TRUNCATED_NORMAL_RULE, a MATLAB program which computes a quadrature rule for a normal probability density function (PDF), also called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].

- cdgqf.m computes a Gauss quadrature formula with default A, B and simple knots.
- cgqf.m computes knots and weights of a Gauss quadrature formula.
- chebyshev_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.
- chebyshev1_set.m, sets a Chebyshev Type 1 rule.
- chebyshev2_compute.m computes a Gauss-Chebyshev type 2 quadrature rule.
- chebyshev2_integral.m evaluates a monomial Chebyshev type 2 integral.
- chebyshev2_set.m, sets a Chebyshev Type 2 rule.
- chebyshev3_compute.m, computes a Gauss-Chebyshev type 3 quadrature rule.
- chebyshev3_integral.m evaluates a monomial Chebyshev type 3 integral.
- chebyshev3_set.m, sets a Chebyshev Type 3 rule.
- class_matrix.m computes the Jacobi matrix for a 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_integral.m evaluates the integral of a monomial with Gegenbauer weight.
- gegenbauer_ek_compute.m computes a Gauss-Gegenbauer quadrature rule.
- gegenbauer_ss_compute.m computes a Gauss-Gegenbauer quadrature rule.
- gegenbauer_ss_recur.m finds the value and derivative of a Gegenbauer polynomial.
- gegenbauer_ss_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_probabilist_set.m, sets abscissas and weights for Hermite probabilist quadrature.
- hermite_set.m, sets abscissas and weights for Hermite quadrature with density exp(-x^2).
- hermite_1_set.m, sets abscissas and weights for Hermite quadrature with density 1.
- 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 with density rho(x)=exp(-x).
- laguerre_1_set.m, sets abscissas and weights for Laguerre quadrature with density rho(x)=1.
- 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_ss_compute.m, Gauss-Legendre quadrature by Stroud-Secrest method.
- legendre_ss_recur.m, finds the value and derivative of a Legendre polynomial.
- legendre_ss_root.m, improves an approximate root of a Legendre polynomial.
- legendre_set.m, sets abscissas and weights for Gauss-Legendre quadrature.
- lobatto_compute.m, computes abscissas and weights for Lobatto quadrature.
- lobatto_set.m, sets abscissas and weights for Lobatto quadrature.
- nc_compute_weights.m, computes weights for a Newton-Cotes quadrature rule.
- ncc_compute.m, computes 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_set.m, sets abscissas and weights for Newton-Cotes Open quadrature.
- ncoh_compute.m, computes a Newton-Cotes "open half" quadrature rule.
- ncoh_compute_set.m
- ncoh_set.m, sets abscissas and weights for Newton-Cotes "open-half" quadrature.
- parchk.m checks parameters ALPHA and BETA for classical weight functions.
- patterson_set.m, sets abscissas and weights for Patterson quadrature.
- psi_values.m, returns selected values of the psi function.
- 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.
- scqf.m scales a quadrature formula to a nonstandard interval.
- sgqf.m computes knots and weights of a Gauss Quadrature formula.
- timestamp.m, prints the current YMDHMS date as a time stamp.