fn

chebyshev_polynomial_v

Tensor
chebyshev_polynomial_v(x: Tensor, n: int)
source

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)/(1x)\sqrt{(1 + x)/(1 - x)} and arise in problems with one Dirichlet and one Neumann boundary condition along the interval.

Parameters

xTensor
Argument tensor; any floating-point dtype.
nint
Non-negative polynomial degree.

Returns

Tensor

Vn(x)V_n(x) element-wise, same shape and dtype as x.

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)=2x1,Vk+1(x)=2xVk(x)Vk1(x).V_0(x) = 1, \quad V_1(x) = 2x - 1, \quad V_{k+1}(x) = 2x\, V_k(x) - V_{k-1}(x).

Raises ValueError for n < 0.

Examples

>>> import lucid
>>> from lucid.special import chebyshev_polynomial_v
>>> chebyshev_polynomial_v(lucid.tensor([-1.0, 0.0, 1.0]), n=2)
Tensor([-3.0000, -1.0000, 1.0000])