toms655

toms655, a Python code which computes weights for interpolatory quadrature schemes, by Sylvan Elhay and Jaroslav Kautsky.

Only a small part of this code has been converted to Python!

Thus, the typical use of this code is for the user to specify a quadrature interval, a weight function, and a sequence of abscissas (which may be repeated), and to request the corresponding weight vector so that an interpolatory quadrature rule is produced.

Note that when an abscissa is repeated, this indicates that, at this point, not only the function value but one or more derivatives are to be used in the quadrature formula.

The code is also suitable for the simpler task of computing both the abscissas and weights for a variety of classical Gaussian quadrature rules, including
NameIntervalWeight function
Legendre(a,b)1.0
Chebyshev Type 1(a,b)((b-x)*(x-a))^(-0.5)
Gegenbauer(a,b)((b-x)*(x-a))^alpha
Jacobi(a,b)(b-x)^alpha*(x-a)^beta
Laguerre and Generalized Laguerre(a,+oo)(x-a)^alpha*exp(-b*(x-a))
Hermite and Generalized Hermite(-oo,+oo)|x-a|^alpha*exp(-b*(x-a)^2)
Exponential(a,b)|x-(a+b)/2.0|^alpha
Rational(a,+oo)(x-a)^alpha*(x+b)^beta

The text of many ACM TOMS algorithms is available online through ACM: https://calgo.acm.org/ or NETLIB: https://www.netlib.org/toms/index.html.

Languages:

toms655 is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Reference:

1. 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.
2. Jaroslav Kautsky, Sylvan Elhay,
Calculation of the Weights of Interpolatory Quadratures,
Numerische Mathematik,
Volume 40, Number 3, October 1982, pages 407-422.
3. Roger Martin, James Wilkinson,
The Implicit QL Algorithm,
Numerische Mathematik,
Volume 12, Number 5, December 1968, pages 377-383.

Source Code:

Last revised on 03 February 2020.