I'm studying the Cauchy Integral Theorem / Formula, but realised I have a misunderstanding.
Consider an integral over the function $f: \mathbb{R} \to \mathbb{C}$ $$ I = \int^\infty_{-\infty} f(x) \, dx = \int^\infty_{-\infty} \frac{e^{ix}}{x^2 + 1} \, dx \quad. $$
This can be considered in the complex plane, where $f(z)$ is holomorphic except at its two poles at $z = \pm i$. Choosing to consider the positive case, we therefore factorise as
$$ I = \int_C \frac{\frac{e^{iz}}{z+i}}{z-i} \, dz = 2\pi i \frac{e^{-1}}{2i} =\pi e^{-1} \quad , $$
where the contour $C = C_R + C_+$ is taken anticlockwise, $C_R$ is the real axis between $\pm R$ and $C_+$ is the positive semicircle in the complex plane with $\left|z\right| = R$. It's clear from inspection that $C_+$ does not contribute to the path integral if we let $R \to \infty$, so we can equate the integral in the complex plane to the real integral $I$.
Now my question: I could equally well have chosen the negative half of the complex plane ($C'=C_R + C_-$) to evaluate my integral, negating the answer since the anticlockwise integral would otherwise calculate $\int_{\infty}^{-\infty}$. This would give
$$ I = - \int_{C'} \frac{\frac{e^{iz}}{z-i}}{z+i} \, dz = - 2\pi i \frac{e^{+1}}{-2i} =\pi e^{+1} \quad . $$
But clearly, that's different to my previous calculation. I thought these two methods should give the same answer, so what went wrong?
No, you cannot choose the the low half-plane of $\mathbb C$. If $z=x+yi$ with $y\leqslant0$, then$$\lvert e^{iz}\rvert=e^{\operatorname{Re}(-y+xi)}=e^{-\operatorname{Re}(y)}\geqslant1$$and, in fact, as $y$ goes to $-\infty$, $\lvert e^{iz}\rvert$ goes to $+\infty$. So, the integral along the negative semicircle most definitely will contribute to the path integral. You will not have this problem if you work with the highest half-plane.