Twist Function

Twist Function Setup

(*n-tuple*)
n=4;
Print[StringForm["``-tuple",n]]
φ=-c0 h (E^(-n α))((((z^n)-(E^(n α)))((E^(n α))(z^n)-1))/(z((((z^n)-1))^2)))//FullSimplify
ApartTwist=Apart[φ,z];
Print[StringForm["ω(z)=(``)dz",ApartTwist]]
ω=φ Dt[z];
tω=ω/.z->(1/z)//Simplify;
tφ=((tω)/(Dt[z]));
Print[StringForm["z->(1/z): ω((1/z))=(``)dz",tφ]]
IAtφI=Collect[(1/(Asymptotic[Apart[tφ],z->0])),z];
Print[StringForm["(Subscript[Lim, z -> 0]) ω((1/z))=(``)dz",(1/(IAtφI))]]

Poles & Zeros

ExpIAtφI=Exponent[IAtφI//Simplify,z];
PolesF=FunctionPoles[φ,z];
If[ExpIAtφI>0,PolesI={{∞,ExpIAtφI}},PolesI={}];
Poles=Join[PolesF,PolesI];
Print[StringForm["Poles[{pole,multiplicity}]=``",Poles]]
NumberPoles=Sum[Poles[[n,2]],{n,1,Length[Poles]}];
Print[StringForm["#Poles=``",NumberPoles]]
ZerosF=Solve[Numerator[Together[φ]]==0,z][[All,1,2]];
If[ExpIAtφI<0,ZerosI=Table[∞,{-ExpIAtφI}],ZerosI={}];
Zeros=Join[ZerosF,ZerosI];
Print[StringForm["Zeros=``",Zeros]]
NumberZeros=Length[Zeros];
Print[StringForm["#Zeors=``",NumberZeros]]
NPmNZ=NumberPoles-NumberZeros;
Print[StringForm["#Poles-#Zeros=``",NPmNZ]]

Coefficients (Subscript[ℓ, r,p])

Do[ℓ[r,p]=Residue[(z^p) φ,{z,PolesF[[r,1]]}]//Simplify,{r,1,Length[PolesF]},{p,0,Poles[[r,2]]-1}];
Do[Print[StringForm["@ p=``: ℓ[``,``]=``",Poles[[r,1]],r,p,ℓ[r,p]]],{r,1,Length[PolesF]},{p,0,Poles[[r,2]]-1}]
ℓI[0]=Sum[-ℓ[r,0],{r,1,Length[PolesF]}]//Simplify;
Do[ℓI[p]=Coefficient[(1/(IAtφI)),(1/(z^(p+1)))],{p,1,PolesI[[1,2]]-1}];
Print[StringForm["@ p=∞: ℓ[∞,0]=``",ℓI[0]]]
Do[Print[StringForm["@ p=∞: ℓ[∞,``]=``",p,ℓI[p]]],{p,1,PolesI[[1,2]]-1}]

Defect Sum

DefectF[r_]:=Sum[((ℓ[r,p])/(p!))Dt[A.δA,{,p}]at[Poles[[r,1]]],{p,0,Poles[[r,2]]-1}];
DefectI=Sum[((ℓI[p])/(p!))Dt[A.δA,{,p}]at[∞],{p,0,Poles[[-1,2]]-1}];
SumDefect=Sum[DefectF[r],{r,1,Length[PolesF]}]+DefectI//Simplify;
Print[StringForm["(∑_(r = 1)^N)(Subscript[D, r])=``",SumDefect]]