gegenbauer#
Gegenbauer polynomials \(C_n^m(x)\) are generalizations of Chebyshev and Legendre polynomials. However, chebyshev polynomials of the first kind are implemented by other methods in the chebyshev
module, and cannot be computed by the functions in this module.
- orthopoly.gegenbauer.gegen_hat(xhat, n, m)#
- Evaluates the degree \(n\), order \(m\) Gegenbauer polynomial (also called “ultraspherical” polynomial) using a three term recurrence relationship. As noted in Appendix A of Boyd, this recurrence relationship is mildly unstable for \(m\) > 0 and the instability worsens for higher \(m\). However, it appears that relative error better than \(10^{-10}\) can be expected if \(m\) is less than about 50. More info is in appendix A of
Boyd, John P. Chebyshev and Fourier spectral methods. Courier Corporation, 2001.
- Parameters:
xhat (array/float) – evaluation point in \([-1,1]\)
n (int) – degree of polynomial
m (int) – order of polynomial (called \(\alpha\) in some sources)
- Returns:
evaluated function, \(C_n^m(\hat{x})\)
- orthopoly.gegenbauer.gegen(x, n, m, xa=-1, xb=1)#
- Evaluates the degree \(n\), order \(m\) Gegenbauer polynomial (also called “ultraspherical” polynomial), over the interval \([x_a,x_b]\), using a three term recurrence relationship. As noted in Appendix A of Boyd, this recurrence relationship is mildly unstable for \(m\) > 0 and the instability worsens for higher \(m\). However, it appears that relative error better than \(10^{-10}\) can be expected if \(m\) is less than about 50.
Boyd, John P. Chebyshev and Fourier spectral methods. Courier Corporation, 2001.
- Parameters:
x (array/float) – evaluation points in \([x_a,x_b]\)
n (int) – degree of polynomial
m (int) – order of polynomial (called \(\alpha\) in some sources)
xa (float) – lower limit of evaluation interval
xb (float) – upper limit of evaluation interval
- Returns:
evaluated function, \(C_n^m(x)\)