Function Repository Resource:

# OrthogonalPolynomialSum

Evaluate a finite orthogonal polynomial series

Contributed by: Jan Mangaldan
 ResourceFunction["OrthogonalPolynomialSum"][f,poly,x,{i,imin,imax}] evaluates the sum , where pi(x) is an orthogonal polynomial represented by poly. ResourceFunction["OrthogonalPolynomialSum"][cof,poly,x] evaluates the sum , where ci is the (i+1)th element of the list cof.

## Details

The argument poly can be any of the following:
 "ChebyshevFirst" Chebyshev polynomial of the first kind ChebyshevT[i,x] "ChebyshevSecond" Chebyshev polynomial of the second kind ChebyshevU[i,x] "Hermite" Hermite polynomial HermiteH[i,x] "Laguerre" Laguerre polynomial LaguerreL[i,x] "Legendre" Legendre polynomial LegendreP[i,x] {"Gegenbauer",m} Gegenbauer polynomial GegenbauerC[i,m,x] {"Laguerre",a} associated Laguerre polynomial LaguerreL[i,a,x] {"Jacobi",a,b} Jacobi polynomial JacobiP[i,a,b,x]
Strings in specifications like "Legendre" and {"Jacobi",a,b} can be replaced with the corresponding symbols, as in LegendreP and {JacobiP,a,b}.
ResourceFunction["OrthogonalPolynomialSum"] uses Clenshaw summation to evaluate the sum.

## Examples

### Basic Examples (2)

Evaluate a finite Laguerre sum:

 In[1]:=
 Out[1]=

Compare with the result of Sum:

 In[2]:=
 Out[2]=

### Scope (3)

Evaluate a finite Jacobi sum with symbolic coefficients and parameters:

 In[3]:=
 Out[3]=

Compare with an explicit summation:

 In[4]:=
 Out[4]=

Evaluate a partial sum of a Gegenbauer series:

 In[5]:=
 Out[5]=

Compare with an explicit summation:

 In[6]:=
 Out[6]=

Evaluate a finite Hermite sum with coefficients supplied from a list:

 In[7]:=
 Out[7]=

Compare with an explicit evaluation:

 In[8]:=
 Out[8]=

### Properties and Relations (3)

Generate random coefficients of a Legendre series:

 In[9]:=

Evaluating the Legendre series with OrthogonalPolynomialSum is faster than using LegendreP:

 In[10]:=
 Out[10]=
 In[11]:=
 Out[11]=

The result obtained through OrthogonalPolynomialSum also has a slightly smaller error:

 In[12]:=
 Out[12]=
 In[13]:=
 Out[13]=
 In[14]:=
 Out[14]=

## Version History

• 1.0.0 – 05 April 2021