Mathematica for Sections 6.3 and 6.4 (evaluated)

$VersionNumber

Section 6.3

a[m_,2][z_]:=(1/Binomial[m+1,3])(w[0,2][z]-((m-1)/2)w[0,1]'[z]-((m-1)/(2m))w[0,1][z]^2)

d[m_,2][z_]:=(1/(m(m-1)))w[0,1][z]

K[m_,2,i_,j_][z_]:=0/;i≤-1

K[m_,2,0,j_][z_]:=1

K[m_,2,i_,j_][z_]:=(Sum[(D[K[m,2,i-1,k][z],z]-(m-1)*d[m,2][z]*K[m,2,i-1,k][z]+(m+2-i-k)(2-i-k)a[m,2][z]*K[m,2,i-2,k][z]),{k,j+1,m}])/;i≥1

w[0,0][z_]=1;

X[j1_,j2_][z_]:=Apply[w,Sort[{j1,j2}]][z]

L[m_,2,i1_,i2_][z_]:=Sum[K[m,2,i1-j1,j1][z]*K[m,2,i2-j2,j2][z]*X[j1,j2][z],{j1,0,i1},{j2,0,i2}]

H[m_,2,e1_,e2_,h1_,h2_]:=(Binomial[m-h1,e1-h1]*Product[e1-r,{r,1,e1-h1}])(Binomial[m-h2,e2-h2]*Product[e2-r,{r,1,e2-h2}])

M[m_,2,e1_,e2_,h1_,i_][z_]:=H[m,2,e1,e2,h1,i-h1]*L[m,2,h1,i-h1][z]

A[e1_,e2_,i_]:=-1/(e1+e2+i-1)/;i≥1

B[e1_,e2_,i_]:=(e1+e2-i)/(e1+e2+i-2)/;i≥1

inv[m_,2,e1_,e2_,h1_,0][z_]:=0

inv[m_,2,e1_,e2_,h1_,1][z_]:=0

inv[m_,2,e1_,e2_,h1_,i_][z_]:=(M[m,2,e1,e2,h1,i][z]+A[e1,e2,i-1]*D[inv[m,2,e1,e2,h1,i-1][z],z]+B[e1,e2,i-1]*a[m,2][z]*inv[m,2,e1,e2,h1,i-2][z])/;i≥2

basicInv[m_,2,e1_,e2_][z_]:=Sum[inv[m,2,e1,e2,h1,e1+e2][z],{h1,0,e1}]

list[e1_,e2_]:=Table[D[w[j1,j2][z],{z,k}],{j2,1,e2},{j1,0,Min[j2,e1]},{k,0,e1+e2-j1-j2}]//Flatten

Collect[basicInv[m,2,1,1][z],list[1,1],Factor]

Collect[basicInv[m,2,1,2][z],list[1,2],Factor]

Collect[basicInv[m,2,2,2][z],list[2,2],Factor]

Section 6.4

b[m_,2][z_]:=((1/(Binomial[m+1,3])) (w[0,2][z]-((m-2)/3)w[0,1]'[z]-((3m-1)(m-2)/(6m(m-1)))w[0,1][z]^2))

d[m_,2][z_]:=(1/(m(m-1)))w[0,1][z]

U[m_,2,i_,j_][z_]:=0/;i≤-1

U[m_,2,0,j_][z_]:=1

U[m_,2,i_,j_][z_]:=(Sum[D[U[m,2,i-1,k][z],z]+2(i-1+k-m)d[m,2][z]*U[m,2,i-1,k][z]+(m-i-k+2)(2-i-k)b[m,2][z]*U[m,2,i-2,k][z],{k,j+1,m}])/;i≥1

w[0,0][z_]=1;

X[j1_,j2_][z_]:=Apply[w,Sort[{j1,j2}]][z]

V[m_,2,i1_,i2_][z_]:=Sum[U[m,2,i1-j1,j1][z]*U[m,2,i2-j2,j2][z]*X[j1,j2][z],{j1,0,i1},{j2,0,i2}]

W[m_,2,e1_,e2_,h1_,i_][z_]:=H[m,2,e1,e2,h1,i-h1]*V[m,2,h1,i-h1][z]

jnv[m_,2,e1_,e2_,h1_,0][z_]:=0

jnv[m_,2,e1_,e2_,h1_,1][z_]:=0

jnv[m_,2,e1_,e2_,h1_,i_][z_]:=(W[m,2,e1,e2,h1,i][z]+A[e1,e2,i-1]*(D[jnv[m,2,e1,e2,h1,i-1][z],z]+2(i-1)*d[m,2][z]*jnv[m,2,e1,e2,h1,i-1][z])+B[e1,e2,i-1]*b[m,2][z]*jnv[m,2,e1,e2,h1,i-2][z])/;i≥2

basicJnv[m_,2,e1_,e2_][z_]:=Sum[jnv[m,2,e1,e2,h1,e1+e2][z],{h1,0,e1}]

diff[l1_,l2_]:=Together[basicInv[m,2,e1,e2][z]-basicJnv[m,2,e1,e2][z]]

Do[Print["diff[",e1,", ",e2,"] = ",diff[e1,e2]],{e2,1,3},{e1,0,e2}]