# LAGUERRE_EXACTNESS Exactness of Gauss-Laguerre Quadrature Rules

LAGUERRE_EXACTNESS is a FORTRAN90 program 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

• prefix_x.txt
• prefix_w.txt
• prefix_r.txt
When running the program, the user only enters the common prefix part of the file names, which is enough information for the program to find all three files.

For information on the form of these files, see the QUADRATURE_RULES_LAGUERRE directory listed below.

### Languages:

LAGUERRE_EXACTNESS is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

CUBE_EXACTNESS, a FORTRAN90 library which investigates the polynomial exactness of quadrature rules over the interior of a cube in 3D.

EXACTNESS, a FORTRAN90 library 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 FORTRAN90 program which tests the polynomial exactness of Gauss-Hermite quadrature rules.

INT_EXACTNESS, a FORTRAN90 program which tests the polynomial exactness of a quadrature rule for a finite interval.

INT_EXACTNESS_CHEBYSHEV1, a FORTRAN90 program which tests the polynomial exactness of Gauss-Chebyshev type 1 quadrature rules.

INT_EXACTNESS_CHEBYSHEV2, a FORTRAN90 program which tests the polynomial exactness of Gauss-Chebyshev type 2 quadrature rules.

INT_EXACTNESS_GEGENBAUER, a FORTRAN90 program which tests the polynomial exactness of Gauss-Gegenbauer quadrature rules.

INT_EXACTNESS_GEN_HERMITE, a FORTRAN90 program which tests the polynomial exactness of generalized Gauss-Hermite quadrature rules.

INT_EXACTNESS_GEN_LAGUERRE, a FORTRAN90 program which tests the polynomial exactness of generalized Gauss-Laguerre quadrature rules.

INT_EXACTNESS_JACOBI, a FORTRAN90 program which tests the polynomial exactness of Gauss-Jacobi quadrature rules.

LAGUERRE_POLYNOMIAL, a FORTRAN90 program which which evaluates the Laguerre polynomial, the generalized Laguerre polynomials, and the Laguerre function.

LAGUERRE_RULE, a FORTRAN90 program which generates a Gauss-Laguerre quadrature rule on request.

LAGUERRE_TEST_INT, a FORTRAN90 library which defines test integrands for integration over [A,+oo).

LEGENDRE_EXACTNESS, a FORTRAN90 program which tests the monomial exactness of quadrature rules for the Legendre problem of integrating a function with density 1 over the interval [-1,+1].

### Reference:

1. Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.

### List of Routines:

• MAIN is the main program for LAGUERRE_EXACTNESS.
• CH_CAP capitalizes a single character.
• CH_EQI is a case insensitive comparison of two characters for equality.
• CH_TO_DIGIT returns the value of a base 10 digit.
• FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
• FILE_ROW_COUNT counts the number of row records in a file.
• GET_UNIT returns a free FORTRAN unit number.
• LAGUERRE_INTEGRAL evaluates a monomial integral associated with L(n,x).