Digamma Function

Author

Eric W. Weisstein
September 19, 2008

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

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

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

Plots

<<Utilities`Plot`

Real Axis

PlotDiscontinuous[PolyGamma[z],{z,Sequence@@Range[-5,0],5},PlotRange->{Automatic,20{-1,1}},
VerticalAsymptotes->Range[-5,0],
AxesLabel->TraditionalForm/@{x,PolyGamma[0,z]}]

Complex Plane

ComplexPlot3D[PolyGamma[z],{z,-5,5},PlotPoints->100]//Timing

ComplexContourPlot[PolyGamma[z],{z,-5,5}]//Timing

Special Values

(PolyGamma[(1/2)])==-ln(4)-ℽ

PolyGamma[1/2]//FunctionExpand

(PolyGamma[1])==-ℽ

PolyGamma[1]

Integer Values

Through[{Numerator,Denominator}[Table[PolyGamma[0,n],{n,10}]+EulerGamma]]

Table[HarmonicNumber[n],{n,10}]

Integrals

(∫_0^1)(∫_0^1)(((1-x) (((x y))^(u-1)))/((1-x y) (-log(x y))))dydx==log(u)-(ψ^((0)))(u)

V6.0

Integrate[((1-x)/((1-x y)(-Log[x y])))(((x y))^(u-1)),{x,0,1},{y,0,1}]//Timing

Integrate1D[f_,{x_,0,1},{y_,0,1}]:=Integrate[Integrate[(f/Y)/.{x->X/Y,y->Y},{Y,X,1},Assumptions->0<X<1],{X,0,1}]

Integrate1D[((1-x)/((1-x y)(-Log[x y])))(((x y))^(u-1)),{x,0,1},{y,0,1}]//Timing

Sums

2 (∑_n^(⌊q/2⌋))ln(sin(((π n)/q))) cos(((2 π n p)/q))-ln(2 q)-(1/2) π cot(((π p)/q))-ℽ==(PolyGamma[(p/q)])

-EulerGamma-Log[2q]-(1/2)π Cot[((π p)/q)]+2Sum[Cos[((2π p n)/q)]Log[Sin[((π n)/q)]],{n,Floor[q/2]}]

l=Select[Sort/@RandomInteger[{1,5},{10,2}],CoprimeQ@@#&&Unequal@@#&]

Subtract@@@Table[{PolyGamma[p/q],-EulerGamma-Log[2q]-(1/2)π Cot[((π p)/q)]+2Sum[Cos[((2π p n)/q)]Log[Sin[((π n)/q)]],{n,Floor[q/2]},Method->"Procedural"]}/.{p->l[[i,1]],q->l[[i,2]]},{i,Length[l]}]//FunctionExpand//FullSimplify//Union

<<Utilities`Simplify`

{#,LogExpand[FunctionExpand[PolyGamma[#]]]}&/@{1/2,1/3,2/3,1/4,3/4,1/6,5/6,1}//ColumnForm

FunctionExpand[PolyGamma[1/7]]

FullSimplify[FunctionExpand[PolyGamma[1/8]]]

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

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

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

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

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

TimeConstraint[Log[z]+(1/(2z))-Sum[((BernoulliB[2n])/(2n (z^(2n)))),{n,∞}],60]//Timing

{Log[z]+(1/(2z))-Sum[((BernoulliB[2n])/(2n (z^(2n)))),{n,100}],PolyGamma[z+1]}/.z->1000.

((∑_k^(n-1))(1/k))-ℽ==(PolyGamma2[0, n])

-EulerGamma+Sum[(1/k),{k,n-1}]

FullSimplify[%]

(∑_(n=0)^∞)(1/(((n+z))^2))==(PolyGamma2[1, z])

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

(∑_(n=0)^∞)(((∑_(k=0)^n)(((-1))^k) (({{n}, {k}})) log(k+u))/(n+1))

Sum[(1/(n+1))Sum[(((-1))^k)Binomial[n,k]Log[u+k],{k,0,n}],{n,0,∞}]

Series[PolyGamma[0,z],{z,0,4}]

FunctionExpand[%]

V7

Sum[(1/(n+1))Sum[(((-1))^k)Binomial[n,k]Log[u+k],{k,0,n}],{n,0,∞}]

(∑_(k=0)^∞)((((-1))^k)/(k z+1))==((HurwitzLerchPhi[-1, 1, (1/z)])/z)==(((PolyGamma2[0, ((z+1)/(2 z))])-(PolyGamma2[0, (1/(2 z))]))/(2 z))

V6

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

Table[((-PolyGamma[0,(1/(2 z))]+PolyGamma[0,((1+z)/(2 z))])/(2 z)),{z,5}]//FunctionExpand//FullSimplify//PowerExpand//ColumnForm//TraditionalForm

V7

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

FunctionExpand[%]//FullSimplify

(∑_(k=0)^∞)((((-1))^k)/(k+1))==ln(2)

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

(∑_(k=0)^∞)((((-1))^k)/(2 k+1))==(π/4)

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

(∑_(k=0)^∞)((((-1))^k)/(3 k+1))==(1/9) (ln(8)+(Sqrt[3]) π)

Sum[((((-1))^k)/(3k+1)),{k,0,∞}]//FullSimplify

(∑_(k=0)^∞)((((-1))^k)/(4 k+1))==((2 ln(1+(Sqrt[2]))+π)/(4 (Sqrt[2])))

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

FullSimplify[%]

FunctionExpand[%]

Identities

(PolyGamma[1-z])-(PolyGamma[z])==π cot(π z)

FullSimplify[PolyGamma[1-z]-PolyGamma[z]]

(PolyGamma[z+1])-(PolyGamma[z])==(1/z)

FullSimplify[PolyGamma[z+1]-PolyGamma[z]]

ln(2)+((PolyGamma[z+(1/2)])/2)+((PolyGamma[z])/2)==(PolyGamma2[0, 2 z])

FullSimplify[PolyGamma[z]/2+PolyGamma[z+1/2]/2+Log[2]]

Series

Series[PolyGamma[z],{z,0,5}]//Normal

FunctionExpand[%]

ser=SeriesCoefficient[PolyGamma[z],{z,0,n}]

Sum[ser z^n,{n,0,5}]

Table[PolyGamma[n,1],{n,0,10}]

FunctionExpand[%]

Table[{PolyGamma[n,1],Zeta[n+1]},{n,4}]

FunctionExpand[%]

FunctionExpand[PolyGamma[n,1],n>0&&n∈Integers]

Sum[((PolyGamma[n,1])/(n!))(z^n),{n,0,5}]

Sum[((PolyGamma[n,1])/(n!))(z^n),{n,0,∞}]//InputForm

ser=SeriesCoefficient[PolyGamma[z],{z,0,n}]//InputForm

{PolyGamma[z]+(1/z),Sum[((PolyGamma[n,1])/(n!))(z^n),{n,0,50}]}/.z->.7

GeneratingFunction[((PolyGamma[n,1])/(n!)),n,z]

ser=SeriesCoefficient[PolyGamma[z],{z,0,n}]

Sum[ser z^n,{n,-∞,∞}]

FullSimplify[%]

Subtract@@@Table[{-(1/z)+PolyGamma[0,1+z],PolyGamma[z]}/.z->RandomComplex[],{100}]//Chop//Union