gegenbauerC

Gegenbauer (ultraspherical) polynomial.

Category: Mathematics > Polynomials

Syntax

C = gegenbauerC(n, a, x)

Gegenbauer polynomial C_n^(a)(x).

Description

The Gegenbauer polynomials are orthogonal on [-1, 1] with weight (1 - x^2)^(a - 1/2). They generalize two classic families: a = 1 gives the Chebyshev polynomials of the second kind and a = 1/2 gives the Legendre polynomials.

The first terms are C_0 = 1 and C_1 = 2*a*x, with the three-term recurrence n*C_n = 2*(n + a - 1)*x*C_(n-1) - (n + 2*a - 2)*C_(n-2).

Input arguments

n
Degree, a nonnegative integer.
a
Parameter of the family; may be symbolic.
x
Point(s) of evaluation or a symbolic variable.

Output arguments

C
Numbers with the size of x, or a symbolic polynomial.

Example

Special cases

syms x
gegenbauerC(3, 1, x)
gegenbauerC(2, 0.5, x)
gegenbauerC(2, 1, [0 0.5 1])
Output
ans = 8*x^3 - 4*x
ans = (3*x^2)/2 - 1/2
ans = 1×3

    -1     0     3

See also

chebyshevU legendreP jacobiP hermiteH