TITLE: Arnold's Trivium problem 51
QUESTION [7 upvotes]: Calculate $$ f(k) = \int_{-\infty}^{+\infty} e^{ikx}\frac{1 - e^x}{1+e^x}dx.$$

As far as I know, this is not a function but rather the Fourier transform in tempered distributions.

1) What is a rigorous proof of Arnold's problem ?
2) How people usually use and manipulate Fourier Transform of tempered distributions ?

Edit : Thx a lot to joriki and sos440 for two very nice and rigorous proofs.
To summarize, 
joriki's idea is to get a regular integral by derivation and then using the Rediues Theorem ;
while sos440 is removing the 'constant' term that makes the integral diverge and treat it seperatly.
If anyone has another different method, I'd be glad.

REPLY [5 votes]: We divide the integral into two parts:
\begin{align*}
f(k)
&= \int_{\Bbb{R}} \mathrm{sgn}(x) e^{-ikx} \, dx + \int_{\Bbb{R}} e^{-ikx} \left( \frac{1-e^{-x}}{1+e^{-x}} - \mathrm{sgn}(x) \right) \, dx
\end{align*}
The first one can be easily computed by integration by parts as follows:
\begin{align*}
\int_{\Bbb{R}} \mathrm{sgn}(x) e^{-ikx} \, dx
&= -\int_{\Bbb{R}} 2\delta(x) \frac{e^{-ikx}}{-ik} \, dx
 = -\frac{2i}{k}.
\end{align*}
Indeed, this manipulation can be justified in the context of tempered distributions. (Just observe what happens when the Fourier transform and the differentiation are interchanged.)
The remaining part is now integrable in ordinary sense, and we have
\begin{align*}
\int_{\Bbb{R}} e^{-ikx} \left( \frac{1-e^{-x}}{1+e^{-x}} - \mathrm{sgn}(x) \right) \, dx
&= 4i \int_{0}^{\infty} \frac{\sin (kx) \, e^{-x}}{1+e^{-x}} \, dx \\
&= 4i \sum_{n=1}^{\infty}(-1)^{n-1} \int_{0}^{\infty} \sin (kx) \, e^{-nx} \, dx \\
&= 4i \sum_{n=1}^{\infty}(-1)^{n-1} \frac{k}{k^2 + n^2}
\end{align*}
Combining,
\begin{align*}
f(k)
&= -2i \sum_{n=-\infty}^{\infty} \frac{k}{n^2 + k^2}
 = -\frac{2\pi i}{\sinh (\pi k)}.
\end{align*}