So I have the following integral I need to evaluate in the complex plane:
$$\int_{-\infty}^\infty \frac{\sinh(az)}{\sinh(\pi z)}~\mathrm{d}z.$$
This equation will have poles when $z = ni$, so any integer along the imaginary axis. Any tips on how to approach this? Thanks in advance.
If you want to evaluate the integral by means of complex integration, the simpler contour can also be used. First, note that $$I_0=\int_{-\infty}^\infty \frac{\sinh(az)}{\sinh(\pi z)}~\mathrm{d}z=\frac12\left(\int_{-\infty}^\infty \frac{e^{az}}{\sinh(\pi z)}~\mathrm{d}z-\int_{-\infty}^\infty \frac{e^{-az}}{\sinh(\pi z)}~\mathrm{d}z\right)=\frac12\left(I(a)-I(-a)\right)$$ where $I(a)$ is evaluated in the principal value sense.
Now let's consider the following closed rectangular contour $C$: $\,\,-R\to R\to R+i\to-R+i\to-R\,\,(R\to\infty)$, with added two small arches around $z=0$ and $z=i$ (clockwise). Denoting the integrals along these arches as $I_{C_1}$ and $I_{C_2}$ $$\oint_C\frac{e^{az}}{\sinh(\pi z)}~\mathrm{d}z=I(a)+I_{C_1}+I(a)e^{ia}+I_{C_2}=0$$ because there are no poles inside the contour. $$I(a)\big(1+e^{ia}\big)=-I_{C_1}-I_{C_1}=\pi i\Big(\underset{z=0}{\operatorname{Res}}\frac{e^{az}}{\sinh(\pi z)}+\underset{z=i}{\operatorname{Res}}\frac{e^{az}}{\sinh(\pi z)}\Big)$$ $$I(a)=i\frac{1-e^{ia}}{1+e^{ia}}=\tan\frac a2$$ $$I_0=\frac12\left(I(a)-I(-a)\right)=\tan\frac a2$$