# wrong answer in calculating the principal value of integral using complex analysis

I have read the answer to this question and it has helped a lot but for$$\int_{-\infty}^{\infty}\frac{1}{x-2}dx$$, I get the wrong answer. I used this contour \begin{align} P.V\int_{-\infty}^{\infty}\frac{1}{x-2}dx&=\int_{C\ \cup P\ \cup L_1\cup L_2}^{}\frac{1}{z-2}dz-\int_{C}^{}\frac{1}{z-2}dz-\int_{P}^{}\frac{1}{z-2}dz\\ &=0-0-(-i\pi)=i\pi \end{align} As you can see the answer is wrong because it's complex even though it's the result of a real integral. And I suppose that we can't be using $$P.V=\text{Re}(i\pi)$$ because there's no $$\cos(ax)$$ in the numerator.

• You seem to be assuming that $\int_C\to0$ as the radius tends to $\infty$. Just because it works that way in the examples you've seen doesn;t mean it works here - how did you show $\int_C\to0$??? Jan 9 at 15:02
• Btw using complex to find this PV seems silly. What is $\int_{2-R}^{2-\delta}+\int_{2+\delta}^{2+R}$? Jan 9 at 15:04
• @DavidC.Ullrich Yes I guess you're right, I probably have to use some other lemma to determine the value of the integral, and yes it's much easier to find the PV but I just wanted to learn the method with different examples. Jan 9 at 17:13

Your problem comes from the fact that the integral over $$C$$ is wrong. It not zero.
Suppose that $$C$$ were a semicircle given by $$z-2=100\exp(i\theta), 0\le\theta\le\pi$$. You evaluate the integral over this path, what do you get? Can you see that the result will be independent of the radius of the large semicircle?