How is the Fourier transform of $g(x)=\frac{1}{x^2-a^2}, a\in \mathbb{R}$ calculated?
I know that the Fourier transfom of $f(x)=\frac{1}{x^2+a^2}, a\in \mathbb{R}$ can be calculated by just closing the counter up and down depending on the sign of the transformed variable $p$ and we get something like $\tilde f(p)=\frac{\pi e^{a p} \theta (-p)}{a}+\frac{\pi e^{-a p} \theta (p)}{a}$
But I do not know to compute an integral fo the form \begin{equation} \int e^{-ipx}\frac{1}{x^2-a^2} \end{equation} calculated.
A direct calculation on Mathematica gave answer to be undefined but using Mathematica command to compute this Fourier translation gave \begin{equation} \tilde g(p)=-\frac{\pi \text{sgn}(p) \sin (a p)}{a} \end{equation}
I wonder how is this expression obtained.
Moreover:
Mathematica integration of $\tilde g(p)$ to find $g(x)$ gives back the correct result.
