How to calculate the integral$$\int_{-\infty}^{\infty}\frac{e^{ixy}}{w^2-x^2}dx$$
where w,y are constants.
I tried to separate them as
$$\frac{1}{2w}\int_{-\infty}^{\infty}(\frac{e^{ixy}}{w+x}+\frac{e^{ixy}}{w-x})dx$$but I'm not sure this is a correct way.
Consider the following contour, where $\Gamma_R$ is a simicircular arc of the radius $R$ and $\gamma_{\pm,\epsilon}$ are semicircular arcs of radius $\epsilon$ centered at $\pm w$, respectively.
$\hspace{5em}$
If we call this contour by $C$, then the Cauchy integration formula tells that
$$ \int_{C} \frac{e^{iyz}}{w^2 - z^2} \, \mathrm{d}z = 0. $$
Now note that
$\displaystyle \left| \int_{\Gamma_R} \frac{e^{iyz}}{w^2 - z^2} \, \mathrm{d}z \right| \leq \frac{R}{R^2 - w^2} \xrightarrow[R\to\infty]{} 0 $,
$\displaystyle \int_{\gamma_{\pm,\epsilon}} \frac{e^{iyz}}{w^2 - z^2} \, \mathrm{d}z \xrightarrow[\epsilon\to 0^+]{} -i\pi \, \underset{z=\pm w}{\mathrm{Res}} \, \frac{e^{iyz}}{w^2 - z^2} $.
So, letting $R \to \infty$ and $\epsilon \to 0^+$, we have
$$ \operatorname{PV}\!\int_{-\infty}^{\infty} \frac{e^{iyx}}{w^2 - x^2} \, \mathrm{d}x - i\pi \left( \underset{z=- w}{\mathrm{Res}} \, \frac{e^{iyz}}{w^2 - z^2} + \underset{z=w}{\mathrm{Res}} \, \frac{e^{iyz}}{w^2 - z^2} \right) = 0. $$