We are doing a practice set for an exam where we have to find the principal value of the integral
$$ I = P.V. \int^\infty_{-\infty} \frac{\cos(x)}{(x-1)(x^2+1)} dx $$
Firstly, I am unsure if this converges? I think it does, and so I tried using Jordans Lemma, finding the residues
$$ Res(i) = (-1/4 + i/4)cosh(1) $$ and $$ Res(1) = \cos(i)/2 $$
Such that $$ I = 2\pi i (-1/4 + i/4)\cosh(1) + \pi i \cos(i)/2 $$
But this seems wrong? Shouldnt the answer be Real?
You are correct that it should be real, and indeed it is!
To see this, let's first expand $\cos(i)$ to get $$\cos(i) = \frac{e^{i\cdot i}+e^{-i\cdot i}}{2} = \frac{e^{-1}+e^{1}}{2} = \cosh(1)$$ Thus, $$\pi i \cos(i)/2 = \pi i\cosh(1)/2 = 2\pi i(1/4)\cosh(i)$$ and so the imaginary parts cancel out.