Integrate $\int_{-\infty}^{\infty} \dfrac{e^{i\,t\,x}}{x^2+1}\,\mathrm{dz}$ So all in all there can be defined instead $\displaystyle{ \int_Cf(z)\,\mathrm{dz} = \int_{C} \dfrac{e^{i\,t\,z}}{z^2+1}\,\mathrm{dz}}=\displaystyle{\int_{\gamma_1}\dfrac{e^{i\,t\,z}}{z^2+1}\,\mathrm{dz}} + \displaystyle{\int_{\gamma_2} \dfrac{e^{i\,t\,x}}{x^2+1}\,\mathrm{dx}}$
where $\gamma_1 = R\,e^{i\,\varphi} \quad\varphi\in[0, \pi] $ and $\gamma_2 = a,\quad a\in[-R, R]$
After some estimations done before $\displaystyle{\lim_{R\to\infty}}\displaystyle{\int_{\gamma_1}\dfrac{e^{i\,t\,z}}{z^2+1}\,\mathrm{dz}} = 0$
Hence evaluating $\displaystyle{ \int_Cf(z)\,\mathrm{dz}} $ is like solving the original integral. My questions concern this process:
That integral should be fairly easy to evaluate using Residue theorem: $\displaystyle{ \int_Cf(z)\,\mathrm{dz}}  = 2\,\pi\,i\,\text{Res$(i)$} = \lim_{z \to i}f(z)\,(z-i) = \pi\,e^{-t}$
However according to the solutions on Wiki one also has to consider the integral over $\gamma_1 = R\,e^{i\,\varphi} \quad \varphi \in[0,-\pi]$
Not only that I don't understand why, I also find a different value: $\displaystyle{ \int_Cf(z)\,\mathrm{dz}}  = 2\,\pi\,i\,\text{Res$(-i)$} = \lim_{z \to -i}f(z)\,(z+i) = -\pi\,e^{t}$. According to Wiki that second Integral should equal $\pi\,e^{t}$, what I can't comprehend. Also it is being said that the total value of the sought integral: $\displaystyle{\int_{-\infty}^{\infty} \dfrac{e^{i\,t\,x}}{x^2+1}\,\mathrm{dz}}$ should equal $\pi\,e^{-|t|}$ where I'm asking myself again: Why that absolute value after all?
 A: Ok, I don't have all the details but I think the intuition goes something like this. The problem is that you separated the integral over $C$ as two separate paths. Computing the integral over $C$ is only useful (using residues) if the first integral (over $\gamma_1$) vanishes. The problem is when does it vanish. You claimed that
$$
\lim_{R\to\infty}\int_{\gamma_1}\frac{e^{itz}}{z^2+1}dz = 0
$$
but I don't think that is the case for all $t$. Intuitively, that integral will vanish if $e^{itz}$ does not dominate the term $1/(z^2+1)$. Note that for the curve $\gamma_1$ we have $z = R\cos(\varphi)+iR\sin(\varphi), \varphi\in[0,\pi]$ and $\sin(\varphi)\geq 0$ in that interval. Thus,
$$
e^{itz}=e^{iRt\cos(\varphi)}e^{-Rt\sin(\varphi)}
$$
Hence, if $t<0$, the term $e^{-Rt\sin(\varphi)}$ will prevent $\int_{\gamma_1}\frac{e^{itz}}{z^2+1}dz$ to vanish as $R\to\infty$ since the exponent is positive.
Therefore, the original curve only works for $t\geq 0$, which force us to choose a different curve $C'$ for $t<0$, namely the opposite semicircle with $\varphi\in[-\pi,0]$ (which works since $\sin(\varphi)<0$ for $\varphi\in[-\pi,0]$).
Now, in the case of $C$ (the one with $\varphi\in[0,\pi]$), note that this semicircle encloses the upper half of the complex plane. Hence, the curve $C$ encloses the pole $z=i$, so that the value of the integral is $\pi e^{-t}, t\geq 0$ as you obtained, which is obviously equal to $\pi e^{-|t|}$ since $t\geq 0$. In the case of $C'$, the curve encloses the pole $z=-i$, which results in $\pi e^{t}, t<0$. In your question, you obtained $-\pi e^{t}$ but note that $C'$ will traverse the real line in the opposite direction than $C$, thus the sign change. Moreover, note that since $t<0$, we have $t = -|t|$. Thus the value of the original integral using the second curve $C'$ will result in $\pi e^{-|t|}, t<0$.
Therefore, in any case for $t<0$ or $t\geq 0$ the result is the same: $\pi e^{-|t|}$.
