How can I calculate this integral $\int_{-\infty}^{\infty} d k \frac{\sinh a k}{\sinh (\pi k) \sinh (\frac{\pi k}{2})}e^{ikx} $ I have the following integral as:
$$
 \int_{-\infty}^{\infty} d k \frac{\sinh a k}{\sinh (\pi k) \sinh (\frac{\pi k}{2})}e^{ikx} 
$$
where $0\leq a \leq \frac{\pi}{2}$.
Can any one help me calculataing this integral? Many thanks!
 A: $$J=\int_{-\infty}^{\infty}  \frac{\sinh a k}{\sinh (\pi k) \sinh (\frac{\pi k}{2})}e^{ikx}dk=\int_{-\infty}^{\infty}  \frac{\sinh a k}{2\sinh^2 (\frac{\pi k}{2}) \cosh (\frac{\pi k}{2})}e^{ikx}dk=\int_{-\infty}^{\infty}  \frac{\sinh 2a k}{\sinh^2 (\pi k) \cosh (\pi k)}e^{2ikx}dk$$
For the convenience we will evaluate the integral
$$J=\int_{-\infty}^{\infty}  \frac{\sinh a k}{\sinh^2 (\pi k) \cosh (\pi k)}e^{ikx}dk=\frac{1}{2}\int_{-\infty}^{\infty}  \frac{e^{ikx}}{\sinh^2 (\pi k) \cosh (\pi k)}\Bigl(e^{ak}-e^{-ak}\Bigr)dk=\frac{1}{2}\bigr(I(a)-I(-a)\bigl)$$
We will consider $I(a)$ and $I(-a)$ separately. This is not rigorous, but we know that at $a \in (-3 \pi/2,3 \pi/2)$ integral is convergent, and we don't have singularity at $x\to0$: due to the symmetry only $i\sin(kx)$ survive from $e^{ikx}$, what gives additional power of $x$ at $x\to0$ and makes $x=0$ a removable singular point.
$$I(a)=\int_{-\infty}^{\infty}  \frac{e^{ikx}}{\sinh^2 (\pi k) \cosh (\pi k)}e^{ak}dk$$
We choose the following contour in the complex plane:

To close the contour we also add two small half-circles ($C_1$ and $C_2$ above the point $x=0$ and below $x=i$ (we go counter clockwise in both cases) and vertical lines $1$ and $2$ at $R\to\pm\infty$
Integral along the closed contour looks
$$\oint =I(a)+\int_{C_1}+\int_1+\,\,e^{ia-x}I(a)+\int_{C_2}+\int_2=2\pi i \operatorname{Res}_{x=\frac{i}{2}}\biggl(\frac{e^{ikx}}{\sinh^2 (\pi k) \cosh (\pi k)}e^{ak}\biggr)$$
It can be shown that $\int_1$ and $\int_2\, \to0$ at $R\to\infty$. We have a single pole of first order inside the contour at $x=\frac{i}{2}$, so
$$I(a)(1+e^{ia-x})+\int_{C_1}+\int_{C_2}=-2\exp{(\frac{ia-x}{2})}$$
$$\int_{C_1}=\lim_{r\to0}\int_{-\pi}^0\frac{\exp{(are^{i\phi})}\exp{(ix re^{i\phi})}}{\bigl(\pi re^{i\phi}+\frac{(\pi re^{i\phi})^3}{3!}+...\bigr)^2}ire^{i\phi}d\phi=\lim_{r\to0}\int_{-\pi}^0\frac{1+re^{i\phi}(a+ix)+ O(r^2)}{\bigl(\pi re^{i\phi}+\frac{(\pi re^{i\phi})^3}{3!}+...\bigr)^2}ire^{i\phi}d\phi$$
Integral contains the divergent term, but it does not depend on $a$, so it will be canceled when we evaluate $I(a)-I(-a)$ - as it should be.
Keeping only converging terms we get:
$$\int_{C_1}=-\frac{i}{\pi} (a+ix)$$
In the same fashion we get
$$\int_{C_2}=\frac{i}{\pi} (a+ix)e^{ia-x}$$
Taking all together
$$I(a)=\frac{i}{\pi}\,(a+ix)\frac{1-e^{ia-x}}{1+e^{ia-x}}-2\frac{e^{\frac{ia-x}{2}}}{1+e^{ia-x}}$$
$$I(a)-I(-a)=\frac{2ia}{\pi}\frac{\sinh x}{\cosh x+\cos a}+\frac{2 ix}{\pi}\frac{\sin a}{\cosh x+\cos a}-4i\frac{\sin\frac{a}{2}\sinh \frac{x}{2}}{\cosh x+\cos a}$$
Taking one half and switching to the initial $a$ and $x$ ($a\to 2a$ and $x\to 2x$)
$$J=\frac{2i}{\pi}\,\frac{a\sinh 2x+x\sin 2a-\pi\sin a\sinh x}{\cosh 2x+\cos 2a}$$
Please check the calculations.
