= Solution
Use the counterclockwise rectangular <contour> with vertices $-R,R,R+i\pi,-R+i\pi$. It encloses just the <simple pole> $i\pi/2$, whose <residue> is $e^{k\pi/2}/i$. Let $I_R=\int_{-R}^R e^{-ikx}/\cosh x\,dx$. The identity
$$
f(x+i\pi)=-e^{k\pi}f(x)
$$
makes the top edge, traversed right to left, contribute $e^{k\pi}I_R$. On either vertical edge,
$$
|\cosh(\pm R+iy)|^2=\sinh^2R+\cos^2y,\qquad |e^{-ik(\pm R+iy)}|=e^{ky}\leq e^{|k|\pi}.
$$
Thus the sum of the vertical integrals tends to zero, with absolute value at most $2\pi e^{|k|\pi}/\sinh R$. The <residue theorem> and $R\to\infty$ now give
$$
(1+e^{k\pi})I=2\pi e^{k\pi/2},\qquad
\boxed{I=\pi\operatorname{sech}\frac{k\pi}{2}.}
$$
The argument works for every fixed real $k$, including zero and negative values, and gives the <Fourier transform of the hyperbolic secant> with the convention $\widetilde f(k)=\int e^{-ikx}f(x)\,dx$.
Back to article page