Binet's Log Gamma Formulas

Author

Eric W. Weisstein
September 20, 2016

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/BinetsLogGammaFormulas.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BinetsLogGammaFormulas.html.

©2016 Wolfram Research, Inc. except for portions noted otherwise

First Integral

Integrate[((1/2)-(1/t)+(1/((E^t)-1)))((E^(-t z))/t),{t,0,∞}]

Integrate[(1/2-1/t+1/(E^t-1))Exp[-t z]/t,{t,0,Infinity}]//InputForm

Table[{LogGamma[z],(z-1/2)Log[z]-z+Log[2Pi]/2+NIntegrate[(1/2-1/t+1/(E^t-1))Exp[-t z]/t,{t,0,Infinity}]},{z,.1,1,.1}]

Second Integral

Integrate[ArcTan[t/z]/(Exp[2Pi t]-1),{t,0,Infinity}]

Integrate[ArcTan[t/z]/(Exp[2Pi t]-1),{t,0,Infinity},Assumptions->Re[z]>0]

Table[{LogGamma[z],(z-1/2)Log[z]-z+Log[2Pi]/2+2NIntegrate[ArcTan[t/z]/(Exp[2Pi t]-1),{t,0,Infinity}]},{z,.1,1,.1}]

Continued Fraction

Formulation

Entity["ContinuedFractionResult","Algorithm:CoefficientsOfStieltjesFractionForBinetsFunction"]["TypesetDefinition"]

Algorithm 1

Clear[q,a,c];
q[-1]=0;
q[0]=c[0];
q[p_]:=q[p]=u q[p-1]-a[p-1]q[p-2];
c[p_]:=Abs[BernoulliB[2p+2]]/(2p+1)/(2p+2);
a[0]=c[0];
a[p_]:=a[p]=Sum[
DiscreteDelta[Mod[j,2]]c[j/2]Coefficient[u^p q[p],u,j],
{j,0,Exponent[u^p q[p],u]}]/c[0]/Product[a[j],{j,0,p-1}]

Algorithm 2

Clear[q,a,c];
q[-1]=0;
q[0]=c[0];
q[p_]:=q[p]=u q[p-1]-a[p-1]q[p-2];
c[p_]:=Abs[BernoulliB[2p+2]]/(2p+1)/(2p+2);
a[0]=c[0];
a[p_]:=a[p]=Sum[
DiscreteDelta[Mod[j,2]]c[j/2]Coefficient[u^p q[p],u,j],
{j,0,2p}]/c[0]/Product[a[j],{j,0,p-1}]

Table[a[i],{i,0,5}]

Table[q[i],{i,0,3}]//Expand//Column//TraditionalForm

Algorithm 3

Clear[q,a,c];
q[-1,u_]=0;
q[0,u_]=c[0];
q[p_,u_]:=q[p,u]=u q[p-1,u]-a[p-1]q[p-2,u];
c[p_]:=Abs[BernoulliB[2p+2]]/(2p+1)/(2p+2);
a[0]=c[0];
a[p_]:=a[p]=(1/(c[0]Product[a[j],{j,0,p-1}]))*
Sum[
c[j]Coefficient[u^p q[p,u],u,2j],
{j,Ceiling[p/2],p},Method->"Procedural"]

Table[a[i],{i,0,5}]

Table[q[i,u],{i,0,5}]//Expand//Column

With[{p=3},Table[c[j]Coefficient[u^p q[p,u],u,2j],{j,0,p}]]

Total[%]

Table[c[j],{j,0,3}]

CoefficientList[u^3q[3,u],u]

Reverse[CoefficientList[q[3,u],u]].Table[c[j],{j,0,3}]

Algorithm 4

Clear[q,a,c];
q[-1,u_]=0;
q[0,u_]=c[0];
q[p_,u_]:=q[p,u]=u q[p-1,u]-a[p-1]q[p-2,u];
c[p_]:=Abs[BernoulliB[2p+2]]/(2p+1)/(2p+2);
a[0]=c[0];
a[p_]:=a[p]=(1/(c[0]Product[a[j],{j,0,p-1}]))*
Sum[
c[j/2]Coefficient[u^p q[p,u],u,j],
{j,0,2p,2},Method->"Procedural"]

Table[a[i],{i,0,5}]

ser=ContinuedFractionK[aa[k],z,{k,0,20}]/.aa->a;

ser-(LogGamma[z]+z-(z-1/2)Log[z]-1/2Log[2Pi])/.z->3+4I//N

ser-(LogGamma[z]+z-(z-1/2)Log[z]-1/2Log[2Pi])/.z->1+10I//N