# TOMS672 Maximally Accurate Extensions of Quadrature Rules

TOMS672 is a FORTRAN90 library which computes a quadrature rule which is a maximally accurate extension of a given quadrature rule.

That is, we suppose we have a quadrature rule that uses N points, and that we wish to compute a new quadrature rule, which uses N+M points. The new rule is required to include the original N points of the old rule.

This kind of procedure is analogous to the process by which the nested Gauss-Patterson rules were developed. Thus, one use of the software is to try to develop nested families of rules for other weight functions, or starting from other initial rules.

In certain cases, this algorithm may be able to extend the given rule in a way which produces a rule with the maximum possible precision. (However, it is also possible that the extension cannot be made.)

By calling this algorithm repeatedly, it is possible to compute a family of nested quadrature rules of any order. Nested rules can be efficient when function evaluations are expensive, and a series of integral estimates must be made to estimate accuracy, or to detect convergence.

The original, true, correct version of ACM TOMS Algorithm 672 is available through ACM: http://www.acm.org/pubs/calgo or NETLIB: http://www.netlib.org/toms/index.html.

### Languages:

TOMS672 is available in a FORTRAN77 version and a FORTRAN90 version.

### Related Data and Programs:

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

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

PATTERSON_RULE, a FORTRAN90 program which returns a Gauss-Patterson quadrature rule of specified order.

QUADRATURE_RULES a dataset directory which contains sets of files that define quadrature rules over various 1D intervals or multidimensional hypercubes.

QUADRULE a FORTRAN90 library which defines quadrature rules on a variety of intervals with different weight functions.

### Reference:

1. Gene Golub, Thomas Robertson,
A generalized Bairstow Algorithm,
Communications of the ACM,
Volume 10, Number 6, June 1967, pages 371-373.
2. Thomas Patterson,
Mathematics of Computation,
Volume 22, Number 104, October 1968, pages 847-856.
3. Thomas Patterson,
An algorithm for generating interpolatory quadrature rules of the highest degree of precision with preassigned nodes for general weight functions,
Transactions on Mathematical Software,
Volume 15, Number 2, June 1989, pages 123-136.
4. Thomas Patterson,
Algorithm 672: EXTEND: generation of interpolatory quadrature rules of the highest degree of precision with preassigned nodes for general weight functions,
Transactions on Mathematical Software,
Volume 15, Number 2, June 1989, pages 137-143.

### List of Routines:

• ASSIGN generates the polynomial whose roots are the preassigned nodes.
• BAIR seeks roots of a polynomial.
• CHECK tests a computed quadrature rule.
• DGEFA factors a real general matrix.
• DGESL solves a real general linear system A * X = B.
• EPROD expands a product of two orthogonal polynomials.
• GENER calculates the polynomial defining the optimal new nodes.
• IDAMAX indexes the array element of maximum absolute value.
• LFACT removes a linear factor from a polynomial expansion.
• NEWTON applies Newton's method for a single root of a polynomial.
• QFACT divides a polynomial by a quadratic factor.
• ROOTS calculates roots of a quadratic factor.
• RSORT carries out a simple ripple sort.
• SOLVE calculates roots of an orthogonal polynomial expansion.
• TRANSF scales a polynomial expansion with respect to the moments.