# Integration of digamma function

I was trying to perform the contour integral of the digamma function $\oint\limits_C \psi(z)\,dz$ on the neighborhood (a small circle $-k+re^{it}$, $k \in \mathbb{Z}$ ) of $k$, before actually realizing that due to the residue theorem $\operatorname{res}(\psi(z),-k)=\frac{1}{2\pi i}\oint\limits_C \psi(z)\,dz=-1$.

Now I know the answer, nevertheless I'm still curious as how this could be done by directly integrating.

I know that $\int \psi(z)\,dz=\log\Gamma(z)$, so $$\int_{0}^{2\pi} \psi(-k+re^{it})ire^{it}\,dt=\log\Gamma(\frac{k+re^{2 \pi}}{k+re^{0}})$$ but integrating between $0$ and $2\pi$ would just give zero as result (due to the symmetry int he function?) so I divided the integration limits: $$2\int_{0}^{\pi} \psi(-k+re^{it})ire^{it}\,dt=2\log\Gamma(\frac{k+re^{ \pi}}{k+re^{0}})$$ When I do numerical approximations to this I do get the result I'm looking for, i.e. $-2\pi i$, but I do not know how to formalize this calculation on $\lim_{r\rightarrow0}$. Could someone please help me?

You need to be more meticulous if you attempt to use fundamental theorem of calculus for contour integrals.

As an example, because you know $\int\frac1zdz=\ln z$, you can also similarly show $\oint\frac1zdz=0$ over an unit square contour.

Note that evaluating $[f(c+re^{it}]^{2\pi}_{t=0}$ is equivalent to $f(z)$ ‘going around’ $c$ once.

The problem is $\ln\Gamma(z)$ has a branch point at $z=-k$. No matter how you choose the branch cut, going around the branch point is non zero.

Here, I will take $\ln z=\ln|z|+i\arg z$ with $\arg\in[0,2\pi)$.

We have $$\int_{|z+k|=r}\phi(z)dz=[\ln\Gamma(-k+re^{it})]^{2\pi}_0$$

Firstly, we want to make our function easier for analysis: $$\ln\Gamma(-k+re^{it})=\ln\Gamma(1+re^{it})-\ln(re^{it})-\sum^k_{n=1}\ln(re^{it}-n)$$ due to the formula $\ln\Gamma(z)=\ln\Gamma(z+1)-\ln z$.

Except the second term, each term ‘going around’ once would give zero.

(e.g. The first term is $\ln\Gamma(z)$ going around $1$ once; since $\ln\Gamma(z)$ is holomorphic around there, going around once gives $0$.)

Then, clearly, $$[\ln\Gamma(-k+re^{it})]^{2\pi}_0=2\pi i$$

*It might be somewhat unclear to use the term ‘going around’. Please let me know if you don’t understand something.

• Great, thanks I'm still on an early learing stage of analysis, and this was very helpful. – firulander Aug 12 '18 at 14:18
• @firulander You may also want to take a look at my very first question on Math SE: math.stackexchange.com/questions/2559475/… – Szeto Aug 12 '18 at 14:56
• @firulander Everyone starts from zero; do not give up and have fun in complex analysis! – Szeto Aug 12 '18 at 14:57