archimedes.quadrature.golub_welsch¶

archimedes.quadrature.golub_welsch(
alpha: ndarray,
beta: ndarray,
) → tuple[ndarray, ndarray]¶

Gauss nodes/weights from monic recurrence coefficients.

Given monic three-term recurrence coefficients (alpha, beta) (see recurrence_coeffs()), the Gauss nodes are the eigenvalues of the symmetric tridiagonal Jacobi matrix with diagonal alpha and off-diagonal sqrt(beta[1:]); the quadrature weights are beta[0] times the squared first component of each corresponding normalized eigenvector [1].

Parameters:
  • alpha (array_like) – Monic recurrence coefficients, each shape (n,). beta[0] is the total mass of the measure (its zeroth moment); the rest of beta and all of alpha are the recursion coefficients themselves.

  • beta (array_like) – Monic recurrence coefficients, each shape (n,). beta[0] is the total mass of the measure (its zeroth moment); the rest of beta and all of alpha are the recursion coefficients themselves.

Returns:

nodes, weights – Gauss quadrature nodes (ascending) and weights.

Return type:

ndarray, shape (n,)

References