Residue theorem classical example - doubts I'm having trouble following one of the steps in the classical example of the residue theorem presented in Wikipedia: http://en.wikipedia.org/wiki/Residue_theorem
$$\int_{-\infty}^{+\infty} \,\frac{e^{itz}}{z^2+1}dz$$
The problem for me is separating the solution into the t>0 and t<0, i.e., I don't understand why the poles that have positive imaginary part correspond to the solution for t>0 and the poles that have negative imaginary part correspond to the solution for t<0.
From Wikipedia:
"Note that, since t > 0 and for complex numbers in the upper halfplane the argument lies between 0 and π, one can estimate"
$$|e^{itz}|≤1$$
Therefore:
$$\int_{-\infty}^{+\infty} \,\frac{e^{itz}}{z^2+1}dz=\pi e^{-t}$$
I think I understand everything that comes before, but here I'm stumped.
The fact is that it works out that way in another problem I'm solving (i.e., poles in the upper half are used for t>0, poles in the lower half are used for t<0), but I want to know why.
 A: It isn't that the poles each "correspond" to one of the solutions.  It is that the choice of contours is influenced by wanting a contour you can effectively work with.
If $t<0$ and you choose the contour in the upper half plane (the not-so-useful contour in that case) then the value of the integrand on the big semicircle will be $e^{+|t||\text{ im }  z}$ times some well behaved sin/cosine divided by $(z^2+1)$. This of course "blows up" getting huge, and we would prefer that the integrand disappear along that part of the contour. 
So for $t <0$ you select the contour in the lowerhalf plane, and this turns out to be useful.
A: That's because in order to apply the residue theorem you have to integrate along a closed curve, so you have to add half a circle of radius $R\rightarrow \infty$, but you also want the integral along the arc you added to vanish, so basically you want the real part of $itz$ to be negative on the arc so that the exponent in the numerator will tend to zero (the actual justification, with calculation isn't that complicated but this is the idea).
This means that the sign of $t$ dictates the choice of which arc to use.
