Greeting, I have an integral to solve, it is $$\int_{-\infty}^{+\infty} \frac{g(x)}{x-z}dx$$ with $g(x)$ a smooth, continuous, positive function, and $z=z_r + iz_i$ a complex number.
I saw that this type of integral can be solved by using Cauchy principal part, to get $$ \int_{-\infty}^{+\infty} \frac{g(x)}{x-z}dx = P\int_{-\infty}^{+\infty} \frac{g(x)}{x-z_r}dx - i\pi g(z_r)$$ and $P\int$ is the principal part.
All is good, but how can I now solve the principal part? I know and have solved it by Taylor expanding the denominator. Is there a way to do it without Taylor expanding? If do how or can I have some references I can read?
Thank you for your time reading this.
edit: The function $g(x)$ i used to solve by Taylor expanding was a Gaussian $$g(x)=e^{-x^2}$$
I'm not sure if you're correctly using Cauchy's Principal Value. From what I can see from the notes of my Professor of Complex Analysis, given an integral for which Cauchy's Principal Value is needed, you have the following: $$I = P\int_{-\infty}^{+\infty} dx\ f(x) = 2\pi i \sum \text{Res}\big(f(z)\big) + i\pi \text{Res}_{z=x_0}\big(f(z)\big) - \lim_{R\to+\infty} \int_{\gamma}dz\ f(z)$$ where the integrand $f(x)$ has a simple pole in $x=x_0$. That is, $I$ can be expressed in terms of the residues of $f$, including the one at $x=x_0$. Moreover $\gamma$ is the half-circle in the complex plane centered at the origin with radius $R$. In order to make a useful formula of this statement we need to check if the limit of the last integral (the one along $\gamma$) tends to zero; in that case we'll be able to express $I$ only in terms of its residues. A sufficient condition is simply given by the following: $$\lim_{|z|\to+\infty} |zf(z)| = 0 \qquad\Longrightarrow\qquad \lim_{R\to+\infty} \int_{\gamma}dz\ f(z)$$
Now, in the case you proposed: $$I = P\int_{-\infty}^{+\infty} dx\ \dfrac{g(x)}{x-x_0} \qquad g(x)\in \mathcal C^\infty(\mathbb R)$$ hence $f(z) = \frac{g(z)}{z-x_0}$ where $g(z)$ is holomorphic on $\mathbb C$. Since: $$\lim_{|z|\to+\infty} |zf(z)| = \lim_{|z|\to+\infty} \bigg|z\frac{g(z)}{z-x_0}\bigg| = \lim_{|z|\to+\infty} \bigg|\frac{z}{z-x_0}\bigg|\cdot\bigg|g(z)\bigg| = 0$$ Therefore we obtain: $$I = P\int_{-\infty}^{+\infty} dx\ \dfrac{g(x)}{x-x_0} = i\pi \text{Res}_{z=x_0}\big(f(z)\big) = i\pi g(x_0) = i\pi e^{-x_0^2}$$
In the case $x_0 = z_0\in\mathbb C$ you just simply compute the residues on the upper-half complex plane.
This is what I would say, though I checked on WolframaAlpha and I cannot understand its result. I hope this might be of any help.