Polygamma Function

Author

Eric W. Weisstein
December 2, 2008

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

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

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

Typesetting

PolyGamma[n,x]//TraditionalForm

<<Utilities`Typesetting`

PolyGamma[n,x]//TraditionalForm

Plots

<<Utilities`Plot`

PlotDiscontinuous[PolyGamma[0,x],{x,Sequence@@Range[-5,0],5},PlotRange->20{-1,1}]

Show[{
Plot[Evaluate[Table[PolyGamma[n,x],{n,0,5}]],Evaluate[{x,Sequence@@#}],AxesLabel->TraditionalForm/@{x,PolyGamma[n,x]},
PlotStyle->{Black,Red,Yellow,Green,Blue,Purple},
DisplayFunction->Identity,PlotRange->{Automatic,{-20,20}}],
Graphics[{AbsoluteDashing[{5,8}],Line[{{First[#],-20},{First[#],20}}]}]}&/@Append[Partition[Range[-2,0],2,1],{0,5}],DisplayFunction->$DisplayFunction]

Clausen Function Relationships

Psi[0,r_Rational]:=Module[{p=Numerator[r],q=Denominator[r]},
		-EulerGamma-Log[2q]-Pi/2 Cot[p Pi/q]+
		2 Sum[Cos[2Pi p k/q]Log[Sin[Pi k/q]],{k,Ceiling[q/2]-1}]]

Psi[r_Rational]:=Psi[0,r]

Psi[0,r_]:=Psi[r]
Psi[r_]:=PolyGamma[r]

Psi[n_Integer?Positive,r_Rational]:=Module[{p=Numerator[r],q=Denominator[r]},
		 -1/2 dCotan[n,p/q]-(-q)^n n! SCl[n,r]
]

 dCotan[n_,x_]:=Module[{y}, Pi D[Cot[Pi y],{y,n}] /. y->x];

SCl[n_Integer?EvenQ /; n>0,r_Rational]:=Module[{p=Numerator[r],q=Denominator[r],k},
		Sum[Cos[2Pi k p/q]Cl[n+1,2Pi k/q],{k,0,q-1}]
]

SCl[n_Integer?OddQ /; n>0,r_Rational]:=Module[{p=Numerator[r],q=Denominator[r],k},Sum[Sin[2Pi k p/q]Cl[n+1,2Pi k/q],{k,0,q-1}]
]

cl[1,x_]:=-Log[2Sin[x/2]]
cl[2,x_]:=Pi^2/6-Pi x/2+x^2/4
cl[3,x_]:=Pi^2 x/6-Pi x^2/4+x^3/12
cl[4,x_]:=Pi^4/90-Pi^2 x^2/12+Pi x^3/12-x^4/48
cl[5,x_]:=Pi^4 x/90-Pi^2 x^3/36+Pi x^4/48-x^5/240

Ncl[n_Integer?OddQ,x_]:=Module[{k},NSum[Cos[k x]/k^n,{k,Infinity},Method->Fit]]
Ncl[n_Integer?EvenQ,x_]:=Module[{k},NSum[Sin[k x]/k^n,{k,Infinity},Method->Fit]]

Psi[2,1/6]

{-182Zeta[3]-12 (π^3)/Sqrt[3],PolyGamma[2,1/6]}//N

{-182Zeta[3]+12 (π^3)/Sqrt[3],PolyGamma[2,5/6]}//N

Do[
	If[GCD[i,j]==1,Print[{k,i,j}," ",Psi[k,i/j]//FullSimplify, " ",{Psi[k,i/j] /. Cl->cl,PolyGamma[k,i/j]}//N]],
	{k,0,3},{j,4},{i,j-1}
]

Table[{Ncl[n,.32],cl[n,.32]},{n,5}]

FullSimplify[Sum[Cos[n x]/n^2,{n,Infinity}]]

Half-Integers

{PolyGamma[1/2],-EulerGamma-2 Log[2]}//N

Table[{PolyGamma[n+1/2],-EulerGamma-2Log[2]+2Sum[1/(2k-1),{k,n}]} ,{n,3}]

FullSimplify[-2Log[2]+2Sum[1/(2k-1),{k,n}]]

Sums

(∑_n^∞)(z/(n (n+z)))-ℽ==(PolyGamma2[0, z+1])

-EulerGamma+Sum[z/n/(n+z),{n,Infinity}]

(((∑_(k=0)^(m-1))(PolyGamma2[n, (k/m)+z]))/(m^(n+1)))+log(m) (DiscreteDeltaSeq[n,0])==(PolyGamma2[n, m z])

DiscreteDelta[n,0]Log[m]+(1/(m^(n+1)))Sum[PolyGamma[n,z+(k/m)],{k,0,m-1}]

Subtract@@@Flatten[Table[{DiscreteDelta[n,0]Log[m]+(1/(m^(n+1)))Sum[PolyGamma[n,z+(k/m)],{k,0,m-1}],PolyGamma[n,m z]},{n,0,5},{m,5}],1]//FullSimplify//Union

Special Values and Identities

ψ(1)==-γ

PolyGamma[1]

(Subscript[ψ, 0])(z)==ψ(z)

Table[PolyGamma[0,#]-PolyGamma[#]&[Random[]],{10}]

-(ψ^((0)))((((-1)^(1/3))/2))-(ψ^((0)))(-(1/2) (((-1))^(2/3)))+(ψ^((0)))((1/2) (1+((-1)^(1/3))))+(ψ^((0)))((1/2) (1-(((-1))^(2/3))))-2 π sech((((Sqrt[3]) π)/2))==0

expr=(1/6)*(-PolyGamma[0,(1/2)*(-1)^(1/3)]-
PolyGamma[0,(-(1/2))*(-1)^(2/3)]+
PolyGamma[0,(1/2)*(1+(-1)^(1/3))]+
PolyGamma[0,(1/2)*(1-(-1)^(2/3))]-
2*Pi*Sech[(Sqrt[3]*Pi)/2]);

FullSimplify[RootReduce//@expr]

(Subscript[ψ, n])(z)==(((-1))^(n+1)) n! (ζ(n+1)-(Subscript[H, z-1]^((n+1))))/;n∈ℤ∧n>0

v6

Table[Subtract@@{(-1)^(n+1)*n!*(Zeta[n+1]-HarmonicNumber[z-1,n+1]),PolyGamma[n,z]},{n,5}]//FullSimplify

Table[{(-1)^(n+1)*n!*(Zeta[n+1]-HarmonicNumber[z-1,n+1]),PolyGamma[n,z]},{n,5}]//FullSimplify

FullSimplify[(-1)^(n+1)*n!*(Zeta[n+1]-HarmonicNumber[z-1,n+1]),n>0&&n∈Integers]

FullSimplify[Subtract@@{PolyGamma[n,z],(-1)^(n+1)*n!*(Zeta[n+1]-HarmonicNumber[z-1,n+1])},n>0&&n∈Integers]

Psi Definition

Simplify[D[Log[Gamma[z]],{z,n+1}],n∈Integers]

Table[D[Log[Gamma[z]],{z,n+1}],{n,0,3}]

Table[D[Gamma'[z]/Gamma[z],{z,n}],{n,0,3}]

Table[D[PolyGamma[0,z],{z,n}],{n,0,3}]

(-1)^(n+1)n!Sum[1/(z+k)^(n+1),{k,0,∞}]

FullSimplify[(((-1))^(1+n)) n! Zeta[1+n,z],n∈Integers&&n>0]

F Definition

FullSimplify[Table[D[Log[z!],{z,n+1}],{n,0,3}]]

Formulas

Multiplication Formula

Map[Subtract@@#&,Table[
{DiscreteDelta[n,0]Log[m]+(1/(m^(n+1)))Sum[PolyGamma[n,z+(k/m)],{k,0,m-1}],PolyGamma[n,m z]},
{n,5},{m,5}],{2}]//FullSimplify