XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Gegenbauer_sub()

Sub Gegenbauer_sub ( Ret As  Double,
N As  Long,
Lambda As  Double,
X As  Double,
Optional Info As  Long 
)

Gegenbauer polynomial Cn(λ)(x) (Subroutine version)

Purpose
Computes the Gegenbauer polynomial.
The Gegenbauer polynomial Cn(λ)(x) is an orthogonal polynomial defined on the interval [-1, 1] with a weight function w(x) = (1 - x^2)^(λ - 1/2). It is the special case of the Jacobi polynomial with α = β = λ - 1/2.
The Gegenbauern polynomial satisfies the following three term recurrence relation.
C0(λ)(x) = 1
C1(λ)(x) = 2λx
Cn(λ)(x) = (1/n)(2x(n + λ - 1)C(n - 1)(λ)(x) - (n + 2λ - 2)C(n - 2)(λ)(x))
Parameters
[out]RetGegenbauer polynomial Cn(λ)(x).
[in]NDegree of polynomial n. (N >= 0)
[in]LambdaParameter λ.
[in]XArgument x.
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument N had an illegal value. (N < 0)
= 1: Floating point range error.
Reference
boost/math/special_functions