I have to evaluate the principal value of the integral $\displaystyle\int_{-\infty}^\infty\frac{\mathrm{e}^{-2\mathrm{i}x}}{x^2+1}\,\mathrm{d}x$ and I have to use residues.
First, I thought that because of the exponent, there is an infinite number of poles, so I cannot use a semicircle as a parametrization from $-R$ to $R$, where $R\to\infty$ in the limit. This would imply that the residues would become an infinite series.
Next, I considered a rectangular contour shifted by $\frac12\pi$. I thought this meant that the $\gamma_3$ parameter was just the $\gamma_1$ parameter multiplied by a factor $\mathrm{e}^\pi$. The $\gamma_2$ and $\gamma_4$ go to zero when $R\to\infty$. However, $\gamma_1$ and $\gamma_3$ do not. So then, I have to calculate the residue of the function, which is the residue of $\frac14\pi$ and of $\mathrm{i}$. The residue of $\frac14\pi$ gives me trouble. If I use that $\textrm{Res}=\frac{P(x)}{Q'(x)}$ defined at $x=\frac14\pi$, I do not get a value.