I have to find a fourier transform of $f(x) = \cos(x)/x$.
This is what I have:
$$ F(\omega) = \int_{-\infty}^\infty \frac{1}{2x}(e^{ix}+e^{-ix})e^{-i\omega x}dx$$ $$ F(\omega) = \frac{1}{2}\int_{-\infty}^{\infty}\frac{e^{i(1-\omega)x}}{x}dx + \frac{1}{2}\int_{-\infty}^{\infty}\frac{e^{i(-1-\omega)x}}{x}dx$$ Using integration in complex plane almost in the same manner as has been used in this example (I use fourier transform with minus sign), I obtain:
$I_1=i\pi$ for $\omega <1$ and $-i\pi$ for $\omega>1$
$I_2=i\pi$ for $\omega <-1$ and $-i\pi$ for $\omega >-1$
where $I_1$ and $I_2$ are first and second integral respectively. Combining these four results gives opposite sings than needed.
Does anyone have a clue what's wrong? I'm pretty sure I've done integration correctly since both integrals are exactly the same as in $f(x) = \frac{\sin(x)}{x}$ and I've got that one right.