How to compute this integral involving sech? Does anybody know how to so solve this integral:
$$
\int\limits_{-\infty}^{+\infty}\text{sech}(t-h)\,e^{ikt/\epsilon}\,\mathrm{d}t
$$
and where $h\in \mathbb{R}$ is a constant, $k\in\mathbb{Z}$ and $\epsilon>0$.
 A: To get simpler (at least typographically) expressions, first we substitute $u = t+h$:
$$\int_{-\infty}^\infty \frac{e^{ikt/\epsilon}}{\cosh (t-h)}\,dt = e^{ikh/\epsilon}\int_{-\infty}^\infty \frac{e^{iku/\epsilon}}{\cosh u}\,du.$$
Also, let's write $c = k/\epsilon$ to simplify notation further.
The integrand is an entire meromorphic function, with simple poles in $i\left(n+\frac{1}{2}\right)\pi,\; n \in \mathbb{Z}$. We evaluate the integral by considering a rectangular contour $C_R$ with vertices at $-R,R,R+\pi i, -R+\pi i$, and letting $R\to \infty$. By the residue theorem,
$$\int_{C_R} \frac{e^{icz}}{\cosh z}\,dz = 2\pi i \operatorname{Res}\left(\frac{e^{icz}}{\cosh z}; \frac{\pi i}{2}\right) = 2\pi i\frac{e^{-c\pi/2}}{\sinh \frac{\pi i}{2}} = 2\pi e^{-c\pi/2}.$$
The integrals over the vertical sides of the rectangle tend to $0$ as $R\to \infty$, since $\lvert e^{icz}\rvert = e^{-c\operatorname{Im} z} \leqslant e^{\lvert c\rvert\pi}$ is bounded independently of $R$, and $\cosh (\pm R + it)\to \infty$ uniformly for $t\in[0,\pi]$ as $R\to\infty$.
For the integral over the side on the line $\operatorname{Im} z = \pi$, since $\cosh (z+\pi i) = - \cosh z$, we obtain
$$\int_{-R+\pi i}^{R+\pi i} \frac{e^{icz}}{\cosh z}\,dz = \int_{-R}^R \frac{e^{icz}e^{-c\pi}}{-\cosh z}\,dz = -e^{-c\pi}\int_{-R}^R\frac{e^{icz}}{\cosh z}\,dz,$$
so
$$2\pi e^{-c\pi/2} = \left(1+e^{-c\pi}\right)\int_{-\infty}^\infty \frac{e^{icu}}{\cosh u}\,du,$$
and
$$\int_{-\infty}^\infty \frac{e^{icu}}{\cosh u}\,du = \frac{2\pi e^{-c\pi/2}}{1+e^{-c\pi}} = \frac{2\pi}{e^{c\pi/2}+e^{-c\pi/2}} = \frac{\pi}{\cosh \frac{c\pi}{2}}.$$
Expanding $c$ and gathering the factor from the substitution at the beginning,
$$\int_{-\infty}^\infty \frac{e^{ikt/\epsilon}}{\cosh (t-h)}\,dt = e^{\large \frac{ikh}{\epsilon}}\frac{\pi}{\cosh \frac{k\pi}{2\epsilon}}.$$
A: A related problem. Here is another approach using the Mellin transform technique. First we write the integral as

$$ I = \int\limits_{-\infty}^{+\infty}\text{sech}(t-h)\,e^{ikt/\epsilon}\,\mathrm{d}t= e^{\frac{ik}{\epsilon}} \int\limits_{-\infty}^{+\infty}\text{sech}(t)\,e^{ikt/\epsilon}\,\mathrm{d}t= 2\,e^{\frac{ik}{\epsilon}} \int\limits_{-\infty}^{+\infty}\frac{e^{ikt/\epsilon}}{e^{t}+e^{-t}}\,\mathrm{d}t.  $$

To finish the problem follow the technique.
