SANDIA_RULES
Quadrature Rules of Gaussian Type


SANDIA_RULES is a MATLAB library which generates a variety of quadrature rules of various orders.

This library is used, in turn, by several other libraries, including SPARSE_GRID_MIXED and SGMGA. This means that a program that calls any of those libraries must have access to a copy of SANDIA_RULES as well.

Name Usual domain Weight function
Gauss-Legendre [-1,+1] 1
Clenshaw-Curtis [-1,+1] 1
Fejer Type 2 [-1,+1] 1
Gauss-Chebyshev 1 [-1,+1] 1/sqrt(1-x2)
Gauss-Chebyshev 2 [-1,+1] sqrt(1-x2)
Gauss-Gegenbauer [-1,+1] (1-x2)alpha
Gauss-Jacobi [-1,+1] (1-x)alpha (1+x)beta
Gauss-Laguerre [0,+oo) e-x
Generalized Gauss-Laguerre [0,+oo) xalpha e-x
Gauss-Hermite (-oo,+oo) e-x*x
Generalized Gauss-Hermite (-oo,+oo) |x|alpha e-x*x
Hermite Genz-Keister (-oo,+oo) e-x*x
Newton-Cotes-Closed [-1,+1] 1
Newton-Cotes-Open [-1,+1] 1
Newton-Cotes-Open-Half [-1,+1] 1

For example, a Gauss-Gegenbauer quadrature rule is used to approximate:

        Integral ( -1 <= x <= +1 ) f(x) (1-x^2)^alpha dx
      
where alpha is a real parameter chosen by the user.

The approximation to the integral is formed by computing a weighted sum of function values at specific points:

        Sum ( 1 <= i <= n ) w(i) * f(x(i))
      
The quantities x are the abscissas of the quadrature rule, the values w are the weights of the quadrature rule, and the number of terms n in the sum is the order of the quadrature rule.

As a matter of convenience, most of the quadrature rules are available through three related functions:

In some cases, it is possible to compute points or weights separately; in other cases, the point and weight functions actually call the underlying function for the entire rule, and then discard the unrequested information.

Some of these quadrature rules expect a parameter ALPHA, and perhaps also a parameter BETA, in order to fully define the rule. Therefore, the argument lists of these functions vary. They always include the input quantity ORDER, but may have one or two additional inputs. In order to offer a uniform interface, there is also a family of functions with a standard set of input arguments, ORDER, NP, and P. Here NP is parameter counter, and P is the parameter value vector P. Using this interface, it is possible to call all the quadrature functions with the same argument list. The uniform interface functions can be identified by the suffix _NP that appears in their names. Generally, these functions "unpack" the parameter vector where needed, and then call the corresponding basic function. Of course, for many rules NP is zero and P may be a null pointer.

Licensing:

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

Languages:

SANDIA_RULES is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

CHEBYSHEV1_RULE, a MATLAB program which can compute and print a Gauss-Chebyshev type 1 quadrature rule.

CHEBYSHEV2_RULE, a MATLAB program which can compute and print a Gauss-Chebyshev type 2 quadrature rule.

GEGENBAUER_RULE, a MATLAB program which can compute and print a Gauss-Gegenbauer quadrature rule.

GEN_HERMITE_RULE, a MATLAB program which can compute and print a generalized Gauss-Hermite quadrature rule.

GEN_LAGUERRE_RULE, a MATLAB program which can compute and print a generalized Gauss-Laguerre quadrature rule.

HERMITE_RULE, a MATLAB program which can compute and print a Gauss-Hermite quadrature rule.

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

JACOBI_RULE, a MATLAB program which can compute and print a Gauss-Jacobi quadrature rule.

LAGUERRE_RULE, a MATLAB program which can compute and print a Gauss-Laguerre quadrature rule.

LEGENDRE_RULE, a MATLAB program which can compute and print a Gauss-Legendre quadrature rule.

PRODUCT_RULE, a MATLAB program which constructs a product rule from 1D factor rules.

QUADRULE, a MATLAB library which defines 1-dimensional quadrature rules.

SGMGA, a MATLAB library which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension.

SPARSE_GRID_MIXED, a MATLAB library which creates a sparse grid dataset based on a mixed set of 1D factor rules.

Reference:

  1. Milton Abramowitz, Irene Stegun,
    Handbook of Mathematical Functions,
    National Bureau of Standards, 1964,
    ISBN: 0-486-61272-4,
    LC: QA47.A34.
  2. William Cody,
    An Overview of Software Development for Special Functions,
    in Numerical Analysis Dundee, 1975,
    edited by GA Watson,
    Lecture Notes in Mathematics 506,
    Springer, 1976.
  3. Philip Davis, Philip Rabinowitz,
    Methods of Numerical Integration,
    Second Edition,
    Dover, 2007,
    ISBN: 0486453391,
    LC: QA299.3.D28.
  4. 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.
  5. 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.
  6. John Hart, Ward Cheney, Charles Lawson, Hans Maehly, Charles Mesztenyi, John Rice, Henry Thatcher, Christoph Witzgall,
    Computer Approximations,
    Wiley, 1968,
    LC: QA297.C64.
  7. Knut Petras,
    Smolyak Cubature of Given Polynomial Degree with Few Nodes for Increasing Dimension,
    Numerische Mathematik,
    Volume 93, Number 4, February 2003, pages 729-753.
  8. Arthur Stroud, Don Secrest,
    Gaussian Quadrature Formulas,
    Prentice Hall, 1966,
    LC: QA299.4G3S7.
  9. Shanjie Zhang, Jianming Jin,
    Computation of Special Functions,
    Wiley, 1996,
    ISBN: 0-471-11963-6,
    LC: QA351.C45

Source Code:

Examples and Tests:

You can go up one level to the MATLAB source codes.


Last revised on 23 October 2011.