I solve this question with using Residue theorem. $$\int _{-\infty }^{\infty }\dfrac{dx}{x^{2}+1}$$
I think
\begin{align}P\cdot V\int _{-\infty }^{\infty }\dfrac{dx}{x^{2}+1}&=2\pi i\left(\operatorname{Res}_{z=i}\left\{ \dfrac{1}{z^{2}+1}\right\}+\operatorname{Res}_{z=-i}\left\{ \dfrac{1}{z^{2}-1}\right\}\right)\\&=2\pi i\left( \lim _{z\rightarrow i}\left\{ \dfrac{1}{z+i}\right\} +\lim _{z\rightarrow -i}\left\{ \dfrac{1}{z-i}\right\} \right)\\&=2\pi i\left( \dfrac{1}{2i}+\left( -\dfrac{1}{2i}\right) \right) \\ &=0\end{align} But answer is $\pi$. This is answer. I don't know where I wrong. Please tell me.
You should only take into account those singularities with imaginary part greater than $0$. So, you will get $2\pi i\times\frac1{2i}$, which is indeed equal to $\pi$.