# How to solve this Mellin–Barnes integral

Any tips to solve the following Mellin–Barnes integral?

$$\frac{1}{2\pi i} \int_{-i\infty}^{+i\infty} {\Gamma(S)\Gamma(1-S)\Gamma(S-\frac{1}{2}-M)\Gamma(\frac{3}{2}+M-S)dS}$$

• The identity $$\Gamma(z)\Gamma(1-z)=\pi\csc{(\pi z)}$$seems very applicable here. – Peter Foreman Dec 27 '19 at 10:24

I assume the integration contour is taken to separate the poles of $$\Gamma(s_i - s)$$ from the poles of $$\Gamma(s_i + s)$$. In particular, if $$m$$ is not in $$(-3/2, 1/2)$$, the contour cannot be a straight line.
This is a case where the residue theorem is not applicable because integrals over left or right semicircles (passing between the poles) do not tend to zero when the radius increases. Instead, we can use the residue theorem to evaluate the G-function at $$z$$ s.t. $$|z| \neq 1$$. The residues are $$-\pi^2 \left( \operatorname* {Res}_{s = -k} + \operatorname* {Res}_{s = 1/2 + m -k} \right) z^{-s} \csc \pi s \hspace {1.5px} \sec \pi (m - s) = \pi z^k (z^{-1/2 - m} - 1) \sec \pi m.$$ The G-function is continuous at $$z = 1$$, which can be proved by considering the growth rates of $$z^{-s}$$ and of the product of the gamma functions. Therefore $$I = \lim_{z \to 1^-} \pi (z^{-1/2 - m} - 1) \sec \pi m \sum_{k \geq 0} z^k = \pi \left( m + \frac 1 2 \right) \sec \pi m.$$