-
Notifications
You must be signed in to change notification settings - Fork 43
Description
It would be nice to have support for generating Gauss–Kronrod points and weights for the weight functions in FastGaussQuadrature, at least when they exist, in order to have an error estimate from the resulting quadrature rule.
JuliaMath/QuadGK.jl/pull/83 should land shortly, and provides an implementation of an O(n²) algorithm by Laurie (1997) that takes as input a SymTridiagonal Jacobi matrix J for a weight function, and outputs a "Kronrod–Jacobi matrix" QuadGK.kronrodjacobi(J, n) whose eigenvalues/eigenvectors yield an order-n Gauss–Kronrod rule (exactly as an ordinary Jacobi matrix yields the Gaussian quadrature rule). Arbitrary-precision arithmetic is supported.
The two caveats are (a) it's O(n²), and (b) a Gauss–Kronrod rule may not always exist for all weight functions. (If real points and weights don't exist, kronrodjacobi throws an error.) Even if the Kronrod rule exists, it may include quadrature points that lie outside of the original interval.