OrthogonalPolynomialsGegenbauerC Method

Computes the value of a Gegenbauer polynomial.

Definition

Namespace: Meta.Numerics.Functions
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double GegenbauerC(
	int n,
	double alpha,
	double x
)

Parameters

n  Int32
The order, which must be non-negative.
alpha  Double
The weight parameter, which must be non-negative.
x  Double
The argument, which must lie in the closed interval [-1,+1].

Return Value

Double
The vaue of C(alpha)n(x).

Remarks

The Gegenbauer polynomials, also called the ultraspherical polynomials, are orthogonal on the interval [-1,+1] with the weight (1 - x^2)^(alpha - 1/2).

The Legendre (LegendreP(Int32, Double)) and Chebyshev (ChebyshevT(Int32, Double) polynomials are thus special cases of the Gegenbauer polynomials.

Exceptions

ArgumentOutOfRangeExceptionn is negative, or alpha is negative, or x lies outside [-1, +1].

See Also