chebyu(n, monic=False)
Defined to be the solution of
(1 - x^2)\frac{d^2}{dx^2}U_n - 3x\frac{d}{dx}U_n + n(n + 2)U_n = 0;
U_n is a polynomial of degree n.
The polynomials U_n are orthogonal over [-1, 1] with weight function (1 - x^2)^{1/2}.
Degree of the polynomial.
If True, scale the leading coefficient to be 1. Default is False.
Chebyshev polynomial of the second kind.
Chebyshev polynomial of the second kind.
chebyt
import numpy as np
import matplotlib.pyplot as plt
from scipy.linalg import det
from scipy.special import chebyu
x = np.arange(-1.0, 1.0, 0.01)
fig, ax = plt.subplots()
ax.set_ylim(-2.0, 2.0)
ax.set_title(r'Chebyshev polynomial $U_3$')
ax.plot(x, chebyu(3)(x), label=rf'$U_3$')
for p in np.arange(-1.0, 1.0, 0.1):
ax.plot(p,
det(np.array([[2*p, 1, 0], [1, 2*p, 1], [0, 1, 2*p]])),
'rx')
plt.legend(loc='best')
plt.show()
from scipy.special import chebyt
x = np.arange(-1.0, 1.0, 0.01)
np.allclose(chebyu(3)(x), 2 * chebyt(2)(x) * chebyu(1)(x))
x = np.arange(-1.0, 1.0, 0.01)
fig, ax = plt.subplots()
ax.set_ylim(-1.5, 1.5)
ax.set_title(r'Chebyshev polynomials $U_n$')
for n in np.arange(1,5):
ax.plot(x, chebyu(n)(x), label=rf'$U_n={n}$')
plt.legend(loc='best')
plt.show()
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them