Fourier transform of 1/cosh How do you take the Fourier transform of 
$$
f(x) = \frac{1}{\cosh x}
$$
This is for a complex class so I tried expanding the denominator and calculating a residue by using the rectangular contour that goes from $-\infty$ to $\infty$ along the real axis and $i \pi +\infty$ to $i \pi - \infty$ to close the contour (with vertical sides that go to 0).  Therefore, I tried to calculate the residue at $\frac{i \pi}{2}$ of 
$$
\frac{e^{-ikx}}{e^x + e^{-x}} $$ which will be give me the answer, but I don't know how to do this.  Thanks for the help!

Here is another approach based in Calculus of residues.
$f(x)=\frac{1}{\operatorname{cosh}(x)}=\frac{2}{e^x+e^{-x}}$ is an even function and
\begin{align*}  |f(x)|=\frac{2e^{-|x|}}{1+e^{-2|x|}}\leq2e^{-|x|}\in L_1(\mathbb{R})
  \end{align*}
It follows that
\begin{align*}
    \int_{\mathbb{R}}e^{-i2\pi tx}f(x)\,dx=\int_{\mathbb{R}}\cos(2\pi tx)f(x)\,dx
  \end{align*}
Consider the contour $C_R$ joining the points $-R$, $R$, $R+i\pi$, and $-R+i\pi$ as in figure below

The function $\phi(z)=\frac{2\cos(2\pi tz)}{e^z+e^{-z}}$ has only one pole inside the bounded region bounded by $C_R$ at $z=\frac{\pi}{2}i$. Hence
\begin{align}
   \int_{C_R}\frac{2\cos(2\pi tz)}{e^z+e^{-z}}\,dz&=2\pi i \operatorname{Re}_{i\pi/2}(\phi)=2\pi i\lim_{z\rightarrow\pi i/2}(z-i\frac{\pi}{2})\phi(z)\\
    &=\pi\big(e^{\pi^2t}+e^{-\pi^2t}\big)
  \end{align}
Since $f$ is even, the countour integral above can be expressed as
$$\begin{align}
\int_{C_R}\phi(z)\,dz&=\int^R_{-R}\phi(x)\,dx+i\int^\pi_0\phi(R+ix)\,dx-\int^R_{-R}\phi(x+i\pi)\,dx \\
&\quad -i\int^\pi_0\phi(-R+ix)\,dx \\
&=\frac12 (2+e^{2\pi^2t}+e^{-2\pi^2t})\int^R_{-R}\phi(t)\,dt+ \\
&\quad i\int^\pi_0\frac{e^{2\pi itR}e^{-2\pi tx}+e^{-2\pi itR}e^{2\pi tx}}{e^{R}e^{itx}+e^{-R}e^{-itx}}\,dx \\
&\quad -i\int^\pi_0\frac{e^{-2\pi itR}e^{-2\pi tx}+e^{2\pi itR}e^{2\pi tx}}{e^{-R}e^{itx}+e^{R}e^{-itx}}\,dx
\end{align}
$$
Letting $R\rightarrow\infty$ and applying dominated convergence yields
\begin{align}
    \frac12\big(e^{\pi^2t}+e^{-\pi^2t}\big)^2\widehat{f}(t)=\pi(e^{\pi^2t}+e^{-\pi^2t})
  \end{align}
whence we ontain
$$\widehat{f}(t)=\pi\operatorname{sech}(\pi^2t)$$
