This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / special / _orthogonal / sh_chebyt

function

scipy.special._orthogonal:sh_chebyt

source: build-install/usr/lib/python3.14/site-packages/scipy/special/_orthogonal.py:3090

Signature

def sh_chebyt(n, monic = False)

Summary

Shifted Chebyshev polynomial of the first kind.

Extended Summary

Defined as for the nth Chebyshev polynomial of the first kind.

Parameters

n : int

Degree of the polynomial.

monic : bool, optional

If True, scale the leading coefficient to be 1. Default is False.

Returns

T : orthopoly1d

Shifted Chebyshev polynomial of the first kind.

Notes

The polynomials are orthogonal over with weight function .

Examples

Evaluate the shifted Chebyshev polynomial of the first kind :math:`T^*_3` at :math:`x = 0.75`:
import numpy as np
from scipy.special import chebyt, sh_chebyt
✓
np.isclose(sh_chebyt(3)(0.75), -1.0)
✗
np.True_
The polynomial :math:`T^*_n` is the Chebyshev polynomial :math:`T_n` shifted from :math:`[-1, 1]` to :math:`[0, 1]`:
x = np.linspace(0, 1, 5)
np.allclose(sh_chebyt(3)(x), chebyt(3)(2*x - 1))
✓
True
Plot :math:`T^*_n` for several values of :math:`n`:
import matplotlib.pyplot as plt
x = np.linspace(0, 1, 400)
fig, ax = plt.subplots()
✓
for n in range(4):
    ax.plot(x, sh_chebyt(n)(x), label=rf"$T^*_{n}$")
ax.set_title(r"Shifted Chebyshev polynomials $T^*_n$")
ax.set_xlabel("x")
ax.legend(loc="best")
✗
<matplotlib.legend.Legend object at 0x7f3f5917fa10>
plt.show()
✓
fig-2833b98bf1577fdc.png

Aliases

  • scipy.special.sh_chebyt