laguerre_exactness, a MATLAB code which investigates the polynomial exactness of a Gauss-Laguerre quadrature rule for the infinite interval [0,+oo) with weight function e^(-x).
Gauss Laguerre quadrature assumes that the integrand we are considering has a form like:
I(f) = Integral ( 0 ≤ x < +oo ) f(x) * e^{-x} dx
The n-point Gauss-Laguerre quadrature rule approximates the integral by
Q(f,n) = sum ( 1 <= i <= n ) w(i) * f(x(i))
To test the polynomial exactness of a Gauss-Laguerre quadrature rule of one of these forms, the program starts at d = 0, and then proceeds to d = 1, 2, and so on up to a maximum degree D_MAX specified by the user. At each value of d, the program generates the appropriate corresponding integrand function x^d), applies the quadrature rule to it, and determines the quadrature error. The program uses a scaling factor on each monomial so that the exact integral should always be 1; therefore, each reported error can be compared on a fixed scale.
The program is very flexible and interactive. The quadrature rule is defined by three files, to be read at input, and the maximum degree to be checked is specified by the user as well.
Note that the three files that define the quadrature rule are assumed to have related names, of the form
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
laguerre_exactness is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
exactness, a MATLAB code which investigates the exactness of quadrature rules that estimate the integral of a function with a density, such as 1, exp(-x) or exp(-x^2), over an interval such as [-1,+1], [0,+oo) or (-oo,+oo).
hermite_exactness, a MATLAB code which tests the polynomial exactness of gauss-hermite quadrature rules.
laguerre_polynomial, a MATLAB code which which evaluates the laguerre polynomial, the generalized laguerre polynomials, and the laguerre function.
laguerre_rule, a MATLAB code which generates a gauss-laguerre quadrature rule on request.
laguerre_test_integrands, a MATLAB code which defines test integrands for integration over [a,+oo).
legendre_exactness, a MATLAB code which tests the monomial exactness of quadrature rules for the legendre problem of integrating a function with density 1 over the interval [-1,+1].