# Prove a tough limit involving the digamma function

Here I have a limit to which I arrived while working on a seperate integral through Mellin Transforms. $$\lim\limits_{s\to -1^{-}}\Big[\psi_{(0)}(s)-\frac{\pi}{2}\tan\left(\frac{\pi s}{2}\right)\Big]$$ Here, we have $$\psi_{(0)}(s)$$ which represents the digamma function. I graphed the whole thing on Desmos to see what it looked like approaching $$-1$$, and it seems very likely that the limit approaches $$1-\gamma$$ Here, $$\gamma$$ is the Euler-Mascheroni constant. I would like to know if there is a concrete way of evaluating this limit. I tried doing some work with it: $$=\lim\limits_{x\to 0}\Big[\psi_{(0)}(x-1)-\frac{\pi}{2}\tan\left(\frac{\pi}{2}(x-1)\right)\Big]$$ $$=\lim\limits_{x\to 0}\Big[\frac{1}{1-x}+\psi_{(0)}(x)-\frac{\pi}{2}\tan\left(\frac{\pi}{2}(x-1)\right)\Big]$$ I don't really know where to go from here. I figure maybe a Taylor expansion could do the trick. However, the expansions for both the digamma and tangent functions are largely unrelated, it seems. I'm curious to see a solution to this problem, and wish you all good luck!

A natural extension of this question would be to find: $$\lim\limits_{s\to (-1-2k)^{-}}\Big[\psi_{(0)}(s)-\frac{\pi}{2}\tan\left(\frac{\pi s}{2}\right)\Big]\,\,\forall\,\,k\in Z^{+}$$ This generalized limit might be the bane of my existance.

Starting with the series expansion at $$s=0$$, which is $$\Gamma(s) = \frac1s + \gamma + O(|s|),$$ and repeatedly using the functional equation $$\Gamma(s+1)=s\Gamma(s)$$, one can prove by induction that the series expansion at $$s=-k$$ ($$k$$ a nonnegative integer) is $$\Gamma(s) = \frac{(-1)^k}{k!} \bigg( \frac1{s+k} + H_k - \gamma + O(|s+k|) \bigg),$$ where $$H_k = \sum_{j=1}^k \frac1j$$ is the $$k$$th harmonic number. Therefore $$\Gamma'(s) = \frac{(-1)^k}{k!} \bigg( {-}\frac1{(s+k)^2} + O(1) \bigg),$$ from which we calculate (by long division) that $$\psi_{(0)}(s) = \frac{\Gamma'(s)}{\Gamma(s)} = -\frac1{s+k} + H_n - \gamma + O(|s+k|).$$ Since $$\tan$$ is an odd function (and is itself a logarithmic derivative of $$\sin$$), its series expansion at odd negative integers $$-k$$ is going to be simply $$-1/(s+k) + O(|s+k|)$$. Therefore the series expansion of their difference is $$\psi_{(0)}(s) - \frac\pi2 \tan\bigg( \frac{\pi s}2 \bigg) = H_n - \gamma + O(|s+k|),$$ which gives you the desired limits.
Let $$t=s+1\to 0^-$$, then $$\psi_{(0)}(s)-\frac{\pi}{2}\tan\left(\frac{\pi s}{2}\right)=\psi_{(0)}(t-1)+\frac{\pi/2}{\tan\left(\frac{\pi t}{2}\right)}=\psi_{(0)}(t-1)+\frac{1}{t}+o(1).$$ Now recall that $$\psi_0(1+x)-\psi_0(x)=\frac{1}{x}$$ which implies $$\psi_{(0)}(t-1)=\psi_{(0)}(t)-\frac{1}{t-1}=\psi_{(0)}(t+1)-\frac{1}{t}-\frac{1}{t-1}.$$ Therefore, as $$s\to 1^-$$, we have that $$t\to 0^-$$, and
$$\psi_{(0)}(s)-\frac{\pi}{2}\tan\left(\frac{\pi s}{2}\right)=\psi_{(0)}(t+1)-\frac{1}{t-1}+o(1)\to \psi_{(0)}(1)+1=1-\gamma.$$