bundles / scipy latest / scipy / special / _orthogonal / chebyc
function
scipy.special._orthogonal:chebyc
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_orthogonal.py:2703
Signature
def chebyc(n, monic = False)Summary
Chebyshev polynomial of the first kind on .
Extended Summary
Defined as , where is the nth Chebyshev polynomial of the first kind.
Parameters
n: intDegree of the polynomial.
monic: bool, optionalIf True, scale the leading coefficient to be 1. Default is False.
Returns
C: orthopoly1dChebyshev polynomial of the first kind on .
Notes
The polynomials are orthogonal over with weight function .
Examples
Evaluate the Chebyshev polynomial :math:`C_3` at :math:`x = 1`:import numpy as np from scipy.special import chebyc, chebyt✓
np.isclose(chebyc(3)(1), -2.0)
✗np.True_The polynomial :math:`C_n` is a scaled Chebyshev polynomial of the first kind:
x = np.linspace(-2, 2, 5) np.allclose(chebyc(3)(x), 2 * chebyt(3)(x/2))✓
TruePlot :math:`C_n` for several values of :math:`n`:
import matplotlib.pyplot as plt x = np.linspace(-2, 2, 400) fig, ax = plt.subplots()✓
for n in range(4): ax.plot(x, chebyc(n)(x), label=rf"$C_{n}$") ax.set_title(r"Chebyshev polynomials $C_n$") ax.set_xlabel("x") ax.legend(loc="best")✗
<matplotlib.legend.Legend object at 0x7f3f60ccf380>
plt.show()
✓
See also
- chebyt
Chebyshev polynomial of the first kind.
Aliases
scipy.special.chebyc