Skip to content
fn

chebyshev_polynomial_v

→Tensor
chebyshev_polynomial_v(x: TensorOrScalar, n: TensorOrScalar)

Chebyshev polynomial of the third kind, Vn(x)V_n(x).

The V polynomials are orthogonal on [−1,1][-1, 1] with weight (1+x)/(1−x)\sqrt{(1 + x)/(1 - x)} and arise in problems with one Dirichlet and one Neumann boundary condition along the interval.

Parameters

xTensor | Scalar
Where VnV_n is evaluated, of any real dtype.
nTensor | Scalar
Degree of VnV_n, for every element or one per element; truncated toward zero, and a negative degree gives 0.

Returns

Tensor

Vn(x)V_n(x) element-wise, broadcast over x and n.

Notes

Half-angle definition

Vn(cos⁡θ)=cos⁡((n+12)θ)cos⁡(θ/2),V_n(\cos\theta) = \frac{\cos((n + \tfrac{1}{2})\theta)} {\cos(\theta/2)},

with the recurrence

V0(x)=1,V1(x)=2x−1,Vk+1(x)=2x Vk(x)−Vk−1(x).V_0(x) = 1, \quad V_1(x) = 2x - 1, \quad V_{k+1}(x) = 2x\, V_k(x) - V_{k-1}(x).

Examples

>>> import lucid
>>> from lucid.special import chebyshev_polynomial_v
>>> chebyshev_polynomial_v(lucid.tensor([-1.0, 0.0, 1.0]), n=2)
tensor([5., -1., 1.])

Used by 1