orthax.orthroots

orthax.orthroots(c, rec)Source

Compute the roots of an orthogonal series.

Return the roots (a.k.a. “zeros”) of the polynomial

\[p(x) = \sum_i c[i] * P_i(x).\]
Parameters:
  • c (1-D array_like) – 1-D array of coefficients.

  • rec (AbstractRecurrenceRelation) – Recurrence relation for the family of orthogonal polynomials

Returns:

out (ndarray) – Array of the roots of the series.

Notes

The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the complex plane may have large errors due to the numerical instability of the series for such values. Roots with multiplicity greater than 1 will also show larger errors as the value of the series near such points is relatively insensitive to errors in the roots. Isolated roots near the origin can be improved by a few iterations of Newton’s method.