Great difficulty in finding the residues of $\frac{\mathrm{Log}\Gamma\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)+1}$

$\newcommand{\log}{\operatorname{Log}}\newcommand{\res}{\operatorname{Res}}\newcommand{\d}{\mathrm{d}}$Let $\Lambda(z)=\log\Gamma(z)$, $a\gt0$, let $\psi$ denote digamma.

It is written here, Page 49, equation 47:

$$\pi\cdot\Im\left[\res_{z=\pi i}\frac{\Lambda\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)+1}\right]=\psi\left(\frac{1}{2}+\frac{a}{2\pi}\right)$$

To motivate the calculation of this hard residue, it is shown in that paper that knowledge of this residue indirectly solves the integral:

$$\int_1^\infty\frac{\ln\ln x}{(x+1)^2}\,\d x=\frac{1}{2}\int_0^\infty\frac{\ln x}{\cosh x +1}\,\d x$$

And finds it to be equal to:

$$\frac{1}{2}\left\{\ln2\pi+\lim_{a\to0+}\pi\cdot\Im\left[\res_{z=\pi i}\frac{\Lambda\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)+1}\right]\right\}=\frac{1}{2}\left(-\gamma+\ln\frac{\pi}{2}\right)$$

Which is equivalently the limit of Malmsten’s integral as $\varphi\to0$.

Formally, I can attempt to find, as the singularity is an order two pole (the reader should note that the following working is mistaken):

$$\begin{align}\lim_{z\to\pi i}\frac{\d}{\d z}(z-\pi i)^2\frac{\Lambda\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)+1}&=\lim_{z\to\pi i}\frac{2(z-\pi i)\Lambda\left(\frac{z+ai}{2\pi i}\right)+\frac{1}{2\pi i}(z-\pi i)^2\psi\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)+1}-\frac{\sinh(z)(z-\pi i)^2\Lambda\left(\frac{z+ai}{2\pi i}\right)}{(\cosh(z)+1)^2}\\&=\lim_{z\to\pi i}\frac{2\Lambda\left(\frac{z+ai}{2\pi i}\right)+\frac{2}{\pi i}(z-\pi i)\psi\left(\frac{z+ai}{2\pi i}\right)-\frac{1}{4\pi^2}(z-\pi i)^2\psi'\left(\frac{z+ai}{2\pi i}\right)}{\sinh(z)}\\&-\frac{\cosh(z)(z-\pi i)^2\Lambda\left(\frac{z+ai}{2\pi i}\right)+2\sinh(z)(z-\pi i)\Lambda\left(\frac{z+ai}{2\pi i}\right)+\frac{1}{2\pi i}\sinh(z)(z-\pi i)^2\psi\left(\frac{z+ai}{2\pi i}\right)}{2\sinh(z)(\cosh(z)+1)}\\&=\lim_{z\to\pi i}\frac{\frac{2}{\pi i}\psi\left(\frac{z+ai}{2\pi i}\right)-\frac{1}{\pi^2}(z-\pi i)\psi'\left(\frac{z+ai}{2\pi i}\right)-\frac{1}{4\pi^2}(z-\pi i)^2\psi''\left(\frac{z+ai}{2\pi i}\right)}{\cosh(z)}\\&-\frac{\sinh(z)(z-\pi i)^2\Lambda\left(\frac{z+ai}{2\pi i}\right)+2\cosh(z)(z-\pi i)\Lambda\left(\frac{z+ai}{2\pi i}\right)+\frac{1}{2\pi i}\cosh(z)(z-\pi i)^2\psi\left(\frac{z+ai}{2\pi i}\right)}{2\cosh(z)(\cosh(z)+1)+2\sinh^2(z)}\\&-\frac{\Lambda\left(\frac{z+ai}{2\pi i}\right)+\frac{1}{\pi i}(z-\pi i)\psi\left(\frac{z+ai}{2\pi i}\right)-\frac{1}{8\pi^2}(z-\pi i)^2\psi'\left(\frac{z+ai}{2\pi i}\right)}{\sinh(z)}\\&=-\frac{2}{\pi i}\psi\left(\frac{1}{2}+\frac{a}{2\pi}\right)-\lim_{z\to\pi i}[\cdots]\end{align}$$

But now there is a problem. The latter "$\cdots$" contains a ratio which cannot be resolved by L'Hopital (dominator $\sinh$, numerator non-zero). This is also a horribly complicated expression, and I am assuming that the author would have mentioned it if it is was this difficult. There must surely be some more straightforward way...

Any advice? I've never done residue calculations this difficult before.

I have found other residues from integral earlier in the paper by using small epsilon and Taylor series arguments, but they avail me nought here.

Edit: I see I have misused L'Hopital again, on the third line! The numerator goes not to zero.


Solution 1:

You can use $$ \Lambda\! \left( {\frac{{z + ai}}{{2\pi i}}} \right) = \Lambda \!\left( {\frac{1}{2} + \frac{a}{{2\pi }}} \right) + \frac{1}{{2\pi i}}\psi\! \left( {\frac{1}{2} + \frac{a}{{2\pi }}} \right)(z - \pi i) + \mathcal{O}((z - \pi i)^2 ) $$ and $$ \frac{1}{{\cosh (z) + 1}} = -\frac{1}{{2\sinh ^2 \left( {\frac{{z - \pi i}}{2}} \right)}} = -\frac{2}{{(z - \pi i)^2 }} + \mathcal{O}(1) $$ to obtain $$ \frac{{\Lambda\! \left( {\frac{{z + ai}}{{2\pi i}}} \right)}}{{\cosh (z) + 1}} = -\frac{2}{{(z - \pi i)^2 }} \Lambda\! \left( {\frac{1}{2} + \frac{a}{{2\pi }}} \right) + \frac{1}{{ z - \pi i }}\frac{i}{{\pi }}\psi\! \left( {\frac{1}{2} + \frac{a}{{2\pi }}} \right) + \mathcal{O}(1), $$ and the result follows.

Solution 2:

It's well known that if $f(z)$ is analytic at $z=b$, and $g(z)$ has a zero of order $1$ at $z=b$, then $$\operatorname{Res}\left[\frac{f(z)}{g(z)}, b\right] = \frac{f(b)}{g'(b)}.$$

What's not as well known is that if $f(z)$ is analytic at $z=b$, and $g(z)$ has a zero of order $2$ at $z=b$, then $$ \operatorname{Res}\left[\frac{f(z)}{g(z)}, b\right]=\frac{6 f'(b) g''(b) - 2 f(b) g'''(b)}{3 [g''(b)]^2}. $$

This formula was derived by Ron Gordon in this answer.

Using this formula, we get $$ \begin{align} \operatorname{Res} \left[\frac{\log \Gamma \left(\frac{z+ai}{2 \pi i} \right)}{1+ \cosh }, \pi i \right] &= \frac{\frac{6}{2 \pi i} \psi\left(\frac{\pi +a}{2 \pi}\right) \cosh \left(\pi i \right) -2\log \Gamma \left(\frac{\pi +a}{2\pi} \right) \sinh \left(\pi i \right) }{3 \cosh^{2} \left(\pi i \right)} \\ &= \frac{-\frac{3}{\pi i }\psi \left(\frac{\pi +a}{2 \pi} \right) -0}{3(1)} \\ &= \frac{i}{\pi} \psi\left(\frac{1}{2} + \frac{a}{2 \pi} \right). \end{align}$$