We have following identity in complex analysis. (Snider 8.5 prob 8).
$$\underset{\epsilon\rightarrow0^+}{lim}\int_{-\infty}^\infty\frac{f(x)}{x-x_0+i\epsilon}\,dx=P\int_{-\infty}^\infty\frac{f(x)}{x-x_0}\,dx-i\pi f(x_0)$$
When $f(x)=1$ is tranforms to,
$$\frac{1}{x-x_0+i\epsilon}=P\frac{1}{x-x_0}-i\pi\delta(x-x_0)$$
I can't figure out why this is happening? Is it because when $x=x_0$ integral equal to infinity?
I want to check whether my understanding is correct.
Considering the first integral and complex version (replace $x$ with $z$) you must be aware that there exists a pole at $x_0+i\epsilon$. Typical way to evaluate a real integral using a complex contour uses a semicircle with two end points on the real line and the line segment defined by the end points. First consider full circle and use Cauchy Residue integral then half circle gives $-i\pi f(x_0)$ (clockwise) as $\epsilon \rightarrow 0$. and the part on the real line gives $\int_{-\infty}^{\infty}f(x)/(x-x_0)dx$. By P you mean principal value I guess.
Regarding the second part just take the derivative of the first identity with the integral w.r.t $x$. Remember that $1/(x-x_0)$ has a pole at $x=x_0$ so we should expect a Dirac delta impulse. Just recheck residues before your exams