orthopoly - Maple Programming Help

orthopoly

 P
 Legendre and Jacobi polynomials

 Calling Sequence P(n, a, b, x) P(n, x)

Parameters

 n - non-negative integer x - algebraic expression a, b - rational numbers greater than -1 or nonrational algebraic expressions

Description

 • The P(n, a, b, x) function computes the nth Jacobi polynomial with parameters a and b evaluated at x.
 In the case of only two arguments, P(n, x) computes the nth Legendre (spherical) polynomial which is equal to P(n, 0, 0, x).
 • These polynomials are orthogonal on the interval $\left[-1,1\right]$ with respect to the weight function $w\left(x\right)={\left(1-x\right)}^{a}{\left(1+x\right)}^{b}$ when a and b are greater than -1. They satisfy:

${\int }_{-1}^{1}w\left(t\right)P\left(m,a,b,t\right)P\left(n,a,b,t\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆt=\left\{\begin{array}{cc}0& n\ne m\\ \frac{{2}^{a+b+1}\mathrm{\Gamma }\left(a+n+1\right)\mathrm{\Gamma }\left(n+b+1\right)}{\left(2n+a+b+1\right)n!\mathrm{\Gamma }\left(n+a+b+1\right)}& n=m\end{array}\right\$

 The Jacobi polynomials are undefined for negative integer values of a or b.
 • Jacobi polynomials satisfy the following recurrence relation:

$P\left(0,a,b,x\right)=1,$

$P\left(1,a,b,x\right)=\frac{1}{2}a-\frac{1}{2}b+\left(1+\frac{1}{2}a+\frac{1}{2}b\right)x,$

$P\left(n,a,b,x\right)=\frac{1}{2}\frac{\left(2n+a+b-1\right)\left({a}^{2}-{b}^{2}+\left(2n+a+b-2\right)\left(2n+a+b\right)x\right)P\left(n-1,a,b,x\right)}{n\left(n+a+b\right)\left(2n+a+b-2\right)}-\frac{\left(n+a-1\right)\left(n+b-1\right)\left(2n+a+b\right)P\left(n-2,a,b,x\right)}{n\left(n+a+b\right)\left(2n+a+b-2\right)},\mathrm{for n>1.}$

Examples

 > $\mathrm{with}\left(\mathrm{orthopoly}\right):$
 > $P\left(3,x\right)$
 $\frac{{5}}{{2}}{}{{x}}^{{3}}{-}\frac{{3}}{{2}}{}{x}$ (1)
 > $P\left(30,\frac{1}{3}\right)$
 $\frac{{18024734042221}}{{205891132094649}}$ (2)
 > $P\left(4,1,\frac{3}{4},x\right)$
 ${-}\frac{{115}}{{4}}{+}\frac{{135}}{{4}}{}{x}{+}\frac{{4185}}{{64}}{}{\left({x}{-}{1}\right)}^{{2}}{+}\frac{{48825}}{{1024}}{}{\left({x}{-}{1}\right)}^{{3}}{+}\frac{{380835}}{{32768}}{}{\left({x}{-}{1}\right)}^{{4}}$ (3)
 > $P\left(7,-\frac{2}{3},\frac{7}{4},\frac{1}{2}\right)$
 ${-}\frac{{7258990337}}{{38654705664}}$ (4)