Jacobi Polynomials

 Orthogonal Polynomials Home Jacobi Polynomials
Jacobi polynomials, Pn(α,β), α > -1, β > -1, are orthogonal with support interval [-1,1] with weight function
w(x) =
 0 for x ≤ -1 (1 - x) α(1 + x) β for -1 < x < 1 0 for x ≥ 1
and normalized by the requirement that Pn(α,β)(1) = Γ(n + α + 1) / [ n! Γ(α + 1) ].

Pn(α,β) satisfies the three-term recurrence relation
 A Pn+1(α,β)(x) = B(x) Pn(α,β)(x) - C Pn-1(α,β)(x) for n ≥ 1
where
 A = 2 (n + 1) (n + γ + 1) (2n + γ) B(x) = (2n + γ + 1) [(2n + γ + 2) (2n + γ) x + α² - β² ] C = 2(n + α) (n + β) (2n + γ + 2) γ = α + β
with starting values
 P0(α,β)(x) = 1, P1(α,β)(x) = [ (γ + 2) x + (α - β) ] / 2.

Function List

• double Jacobi_Pn( double x, double alpha, double beta, int n )

This function returns Pn(α,β)(x) where Pn(α,β)(x) is described above.

• long double xJacobi_Pn( long double x, long double alpha, long double beta, int n )

This function returns Pn(α,β)(x) where Pn(α,β)(x) is described above.

• void Jacobi_Pn_Sequence( double P[ ], double x, double alpha, double beta, int max_n )

This function returns Pn(α,β)(x), for n = 0, 1, …, max_n in the array P[ ] where Pn(α,β)(x) is described above. Note that P[ ] should be declared as double P[N] where N ≥ max_n + 1.

• void xJacobi_Pn_Sequence( long double P[ ], long double x, long double alpha, long double beta, int max_n )

This function returns Pn(α,β)(x), for n = 0, 1, …, max_n in the array P[ ] where Pn(α,β)(x) is described above. Note that P[ ] should be declared as long double P[N] where
N ≥ max_n + 1.

• double Jacobi_Pn_Series( double x, double alpha, double beta, double a[ ], int degree )

This function returns Σk=0na[k] Pk(α,β)(x) where n = degree and Pk(α,β)(x) for k = 0, …, n is described above.

• long double xJacobi_Pn_Series( long double x, long double alpha, long double beta, long double a[ ], int degree )

This function returns Σk=0na[k] Pk(α,β)(x) where n = degree and Pk(α,β)(x) for k = 0, …, n is described above.

Source Code

C source code is available for these routines: