This is undoubtedly a simple question but I am stumped. This is a problem from Rudin, Real & Complex Analysis, chapter 10.
First I was asked to compute $$\int_{-\infty}^\infty \frac{e^{itx}}{1+x^2}\text{d}x,$$ which using the Residue Theorem I deduced is $\pi e^{-t}$.
Next I was asked to use the Inversion Theorem of the Fourier Transform to check this answer. To that end I defined $f(x) = \frac{1}{1+x^2}$ and noted that $$\hat{f}(-t)=\int_{-\infty}^\infty f(x)e^{itx}\text{d}x=\pi e^{-t}.$$ By the Inversion Theroem, $$f(x)=\int_{-\infty}^\infty \hat{f}(t)e^{itx}\text{d}t=\int_{-\infty}^\infty \pi e^{(ix+1)t}\text{d}t.$$ But this integral clearly isn't defined.
Could someone point out where I have gone wrong? Thanks.
The sign of $t$ is important here: the quick and dirty way to sort this out is to notice that $1/(1+x^2)$ is even, so the integral reduces to $$ \int_{-\infty}^{\infty} \frac{\cos{tx}}{1+x^2} \, dx, $$ which is clearly an even function of $t$. You've worked it out assuming $t>0$, and so the result extends to negative $t$ simply by setting $\hat{f}(-t)=\hat{f}(t)$, so $\hat{f}(t) = \pi e^{-|t|}$ for all $t$.
To see what's gone wrong, look at the integral over the large semicircle that you have to make disappear to apply the Residue Theorem. $e^{itz}$ tends to zero as $\Im(z) \to \infty$ if and only if $t>0$. Hence one cannot close the contour in the upper half-plane if $t<0$: one instead has to use the lower half-plane (or change variables to $w=-z$ to have $e^{i(-t)w}$ in the numerator, which does $\to 0$ as $\Im(w) \to \infty$).