bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / special / _orthogonal / chebys
function
scipy.special._orthogonal:chebys
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_orthogonal.py:2901
Signature
def chebys(n, monic = False)Summary
Chebyshev polynomial of the second kind on .
Extended Summary
Defined as where is the nth Chebyshev polynomial of the second kind.
Parameters
n: intDegree of the polynomial.
monic: bool, optionalIf True, scale the leading coefficient to be 1. Default is False.
Returns
S: orthopoly1dChebyshev polynomial of the second kind on .
Notes
The polynomials are orthogonal over with weight function .
Examples
Evaluate the Chebyshev polynomial of the second kind :math:`S_3` at :math:`x = 1`:import numpy as np from scipy.special import chebys, chebyu✓
np.isclose(chebys(3)(1), -1.0)
✗np.True_The polynomial :math:`S_n` is a scaled Chebyshev polynomial of the second kind:
x = np.linspace(-2, 2, 5) np.allclose(chebys(3)(x), chebyu(3)(x/2))✓
TruePlot :math:`S_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, chebys(n)(x), label=rf"$S_{n}$") ax.set_title(r"Chebyshev polynomials $S_n$") ax.set_xlabel("x") ax.legend(loc="best")✗
<matplotlib.legend.Legend object at 0x7f3f687d9160>
plt.show()
✓
See also
- chebyu
Chebyshev polynomial of the second kind
Aliases
scipy.special.chebys