Function Repository Resource:

SchettPolynomial

Source Notebook

Compute the Schett polynomial

Contributed by: Shenghui Yang

ResourceFunction["SchettPolynomial"][n]

computes the nth Schett polynomial with formal variables.

ResourceFunction["SchettPolynomial"][n,{u,v,w}]

computes the nth Schett polynomial with user specified symbols for variable.

ResourceFunction["SchettPolynomial"][n,"CoefficientMatrix"]

expresses the coefficients of nth Schett polynomial in compact matrix form.

ResourceFunction["SchettPolynomial"]["Reset"]

clears the memory used for efficiency.

Details

Alois Schett introduced the recurrence polynomial starting from S0=x and the recurrence relation Sn=D(Sn-1), where D(x)=y·z,D(y)=z·x,D(z)=x·y and the Leibniz rule applies.
The coefficients of the Schett polynomial are contained in the Taylor series of the Jacobi elliptic functions JacobiCN, JacobiSN and JacobiDN.
The coefficients of Schett polynomial are proven to count certain type of permutations.
The recurrence uses caching to speed up computation and avoid repetitive operation. Use SchettRecurrence["Reset"] to clean the memorization and release memory.

Examples

Basic Examples (2) 

The fifth Schett polynomial:

In[1]:=
ResourceFunction["SchettPolynomial"][5]
Out[1]=

The fifth Schett polynomial with specified variables:

In[2]:=
ResourceFunction["SchettPolynomial"][5, {x1, x2, x3}]
Out[2]=

Scope (1) 

Some coefficients of nthSchett recurrence grows as rapidly as n!. For large index, it is convenient to use SparseArray to represent the polynomial:

In[3]:=
ResourceFunction["SchettPolynomial"][75] // Short
Out[3]=
In[4]:=
ResourceFunction["SchettPolynomial"][75, "CoefficientMatrix"]
Out[4]=

Applications (1) 

The Schett recurrence formula significantly speeds up the computation for high order terms in Taylor series for Jacobi elliptic functions:

In[5]:=
AbsoluteTiming[
 ResourceFunction["SchettPolynomial"][200, "CoefficientMatrix"];]
Out[5]=
In[6]:=
AbsoluteTiming[{Series[JacobiSN[u, k], {u, 0, 200}], Series[JacobiCN[u, k], {u, 0, 200}]};]
Out[6]=

Properties and Relations (4) 

The sum of the coefficients in Sn is equal to n!:

In[7]:=
{ResourceFunction["SchettPolynomial"][5], ResourceFunction["SchettPolynomial"][6], ResourceFunction["SchettPolynomial"][7]}
Out[7]=
In[8]:=
{% /. {\[FormalX] -> 1, \[FormalY] -> 1, \[FormalZ] -> 1}, {5!, 6!, 7!}}
Out[8]=

The coefficient of the Taylor series for JacobiSN is contained in the first column of the compact coefficient matrix for the Schett polynomial:

In[9]:=
Transpose[
    Normal[ResourceFunction["SchettPolynomial"][#, "CoefficientMatrix"]]][[1]] & /@ Range[2, 15, 2]
Out[9]=
In[10]:=
Series[JacobiSN[u, k], {u, 0, 15}]
Out[10]=

The denominators in the Taylor series are factorials of odd numbers:

In[11]:=
{3, 5, 7, 9, 11, 13, 15}!
Out[11]=

The coefficient of Taylor series for JacobiCN is contained in the first row of the compact coefficient matrix:

In[12]:=
Normal[ResourceFunction["SchettPolynomial"][#, "CoefficientMatrix"]][[
   1]] & /@ Range[2, 15, 2]
Out[12]=
In[13]:=
Series[JacobiCN[u, k], {u, 0, 15}]
Out[13]=

The denominators in the Taylor series are factorials of even numbers:

In[14]:=
{2, 4, 6, 8, 10, 12, 14}!
Out[14]=

The coefficient of Taylor series for JacobiDN is contained in the first row of the compact coefficient matrix:

In[15]:=
Reverse /@ (Normal[
      ResourceFunction["SchettPolynomial"][#, "CoefficientMatrix"]][[
     1]] & /@ Range[3, 15, 2])
Out[15]=
In[16]:=
Series[JacobiDN[u, k], {u, 0, 15}]
Out[16]=

The denominators in the Taylor series are just factorials of even numbers:

In[17]:=
{2, 4, 6, 8, 10, 12, 14}!
Out[17]=

Possible Issues (3) 

The coefficient matrix is not defined for indices less than 2:

In[18]:=
ResourceFunction["SchettPolynomial"][1, "CoefficientMatrix"]
Out[18]=

The (i,j)th term in the coefficient matrix does not represent the coefficient of xiyjzn-i-j in the corresponding polynomial:

In[19]:=
sa1 = ResourceFunction["SchettPolynomial"][8, "CoefficientMatrix"];
sa1 // Normal
Out[20]=
In[21]:=
ResourceFunction["SchettPolynomial"][8]
Out[21]=

Instead, a general index conversion formula is applied: (i,j) x2j-1y2i-2zn+4-2i-2j for even n and (i,j) x2j-2y2i-1zn+4-2i-2j for odd n. For instance, 408 in S8 above occurs at {1,2} and {4,2}. The exponent for the term in the polynomial is:

In[22]:=
{{2*#2 - 1, 2*#1 - 2, 8 + 4 - 2*#1 - 2*#2} &[1, 2], {2*#2 - 1, 2*#1 - 2, 8 + 4 - 2*#1 - 2*#2} &[4, 2]}
Out[22]=

In this example one finds that 408 is the coefficient for x3y0z6 and x3y6z0.


SchettPolynomial use memoization to speed up computation and the memory is not automatically released. Use "Reset" to free up memory space:

In[23]:=
ResourceFunction["SchettPolynomial"]["Reset"]

Publisher

Shenghui Yang

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 12 January 2024

Source Metadata

Related Resources

Author Notes

In Dumont's paper the result is 0-index. One of the main technical detail in the paper is to align the result to 1-indexed array. A typo in Dumont's recurrence formula is also fixed in the code to generate correct result.

License Information