Cauchy Principal Value of $\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,\mathrm{d}x$ I have to find the Cauchy Principal Value of
$$
\int_{-\infty}^{\infty}\frac{\mathrm{e}^{\mathrm{i}px}}{x^{4} - 1}\,\mathrm{d}x
$$
There are 4 simple poles at $x=1,-1,i,-i$ so I'm not sure what the best contour to use is because a $D$ shaped contour doesn't work as all the poles are on the axes.
I should add there are 2 cases to consider with $p>0$ and $p<0$
 A: The Cauchy Principal Value of the integral of interest is given by
$$\begin{align}
\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)&=\lim_{\varepsilon\to 0^+}\left(\int_{-\infty}^{-1-\varepsilon} \frac{e^{ipx}}{x^4-1}\,dx\int_{-1+\varepsilon}^{1-\varepsilon} \frac{e^{ipx}}{x^4-1}\,dx\int_{1+\varepsilon}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)
\end{align}$$
We shall analyze the case for which $p>0$.


METHODOLOGY $1$:
Now, take $R>1$.  If we evaluate the contour integral $\displaystyle \oint_C \frac{e^{ipz}}{z^4-1}\,dz$ where the contour $C$ is comprised of $(i)$ the real line segments from $-R$ to $-1-\varepsilon$, $(ii)$ the semi-circular arc in the third quadrant centered at $-1$ with radius $\varepsilon$ from $-1-\varepsilon$ to $-1+\varepsilon$, $(iii)$ the straight line segment from $-1+\varepsilon$ to $1-\varepsilon$, $(iv)$ the semi-circular arc in the first quadrant centered at $1$ with radius $\varepsilon$ from $1-\varepsilon$ to $1+\varepsilon$, $(v)$ a straight line segment from $1+\varepsilon$ to $R$, and $(vi)$ a semicircular arc from $R$ to $-R$, then the Residue theorem guarantees that
$$\oint_C \frac{e^{ipz}}{z^4-1}\,dz=2\pi i \text{Res}\left(\frac{e^{ipz}}{z^4-1}\,dz, z=i\right)=-\frac{\pi}{2}e^{-p}$$
As $R\to \infty$ and $\varepsilon\to 0^+$, we see that
$$\lim_{R\to\infty\\\varepsilon\to 0^+}\oint_C \frac{e^{ipz}}{z^4-1}\,dz=\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)+\frac\pi2\sin(p)$$
Putting it together, we find that
$$\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)=-\frac\pi2\left(\sin(p)+e^{-p}\right)$$


METHODOLOGY $2$:
Using partial fraction expansion, we can write
$$\frac{e^{ipx}}{x^4-1}=\frac{e^{ip}}4 \frac{e^{ip(x-1)}}{x-1}-\frac{e^{-ip}}4 \frac{e^{ip(x+1)}}{x+1}+\frac{ie^{-p}}4 \frac{e^{ip(x-i)}}{x-i}-\frac{ie^{p}}4 \frac{e^{ip(x+i)}}{x+i}$$
Then, we have
$$\begin{align}
\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)&=\frac{e^{ip}}4 \text{PV}\left(\int_{-\infty}^\infty \frac{e^{ip(x-1)}}{x-1}\,dx\right)\\\\
&-\frac{e^{-ip}}4\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ip(x+1)}}{x+1}\,dx\right)\\\\
&+\frac{ie^{-p}}4\int_{-\infty}^\infty \frac{e^{ip(x-i)}}{x-i}\,dx\\\\
&-\frac{ie^{p}}4\int_{-\infty}^\infty \frac{e^{ip(x+i)}}{x+i}\,dx\tag1
\end{align}$$
The Cauchy Principal values of the first two integrals on the right-hand side of $(1)$ are identical and equal to the value of the integral $\displaystyle \int_{-\infty}^\infty \frac{\sin(px)}{x}\,dx=i\pi\text{sgn}(p)$.  For $p>0$ ($p<0$), the Residue Theorem guarantees that the value of the fourth (third) integral in $(4)$ is $0$, while the value of the third (fourth) integral is $2\pi i$ ($-2\pi i$).
Putting it together, we find that
$$\text{PV}\left(\int_{-\infty}^\infty \frac{e^{ipx}}{x^4-1}\,dx\right)=-\frac\pi2 \left(\sin(|p|)+e^{-|p|}\right)$$
as expected!
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[5px,#ffd]{%
\left.\mrm{P.V.}\int_{-\infty}^{\infty}{\expo{\ic px} \over
x^{4} - 1}\,\dd x\,\right\vert_{\ p\ \in\ \mathbb{R}}}
\\[5mm] \stackrel{\mrm{by\ def.}}{=}\,\,\,&
\lim_{\epsilon \to 0^{+}}\bracks{%
\int_{-\infty}^{- 1 - \epsilon}
{\expo{\ic px} \over x^{4} - 1}\,\dd x +
\int_{-1 + \epsilon}^{1 - \epsilon}
{\expo{\ic px} \over x^{4} - 1}\,\dd x +
\int_{1 + \epsilon}^{\infty}
{\expo{\ic px} \over x^{4} - 1}\,\dd x}
\\[5mm] = &\
\lim_{\epsilon \to 0^{+}}\bracks{%
\int_{1 + \epsilon}^{\infty}
{\expo{-\ic px} \over x^{4} - 1}\,\dd x +
\int_{0}^{1 - \epsilon}
{2\cos\pars{px} \over x^{4} - 1}\,\dd x +
\int_{1 + \epsilon}^{\infty}
{\expo{\ic px} \over x^{4} - 1}\,\dd x}
\\[5mm] = &\
2\,\Re\lim_{\epsilon \to 0^{+}}\bracks{%
\int_{0}^{1 - \epsilon}
{\expo{\ic\verts{p}x} \over x^{4} - 1}\,\dd x +
\int_{1 + \epsilon}^{\infty}
{\expo{\ic px} \over x^{4} - 1}\,\dd x}
\\[5mm] = &\
2\,\Re\lim_{\epsilon \to 0^{+}}\left\{%
\int_{0}^{1 - \epsilon}
{\expo{\ic\verts{p}x} \over x^{4} - 1}\,\dd x +
\left.\int_{\pi}^{0}{\expo{\ic\verts{p}z} \over
z^{4} - 1}\,\epsilon\expo{\ic\theta}\ic\,\dd\theta
\,\right\vert_{\ z\ =\ 1 + \epsilon\exp\pars{\ic\theta}}\right.
\\[2mm] &\
\phantom{2\,\Re\lim_{\epsilon \to 0^{+}}\left\{\right.}
\left. +\, \int_{1 + \epsilon}^{\infty}
{\expo{\ic\verts{p}x} \over x^{4} - 1}\,\dd x\right\}
\label{1}\tag{1}
\\[2mm] &
+ \underbrace{2\,\Re\lim_{\epsilon \to 0^{+}}\int_{0}^{\pi}
{\expo{\ic\verts{p}}\epsilon\expo{\ic\theta}\ic \over
\pars{1 + \epsilon\expo{\ic\theta}}^{4} - 1}\,\dd\theta}
_{\ds{=\ -\,{1 \over 2}\,\pi\sin\pars{\verts{p}}}}
\label{2}\tag{2}
\end{align}
$$
\begin{array}{ll}
\ds{\Large\bullet} & \mbox{The (\ref{1})-term
will be "}closed\mbox{" along a quarter circle in the first quadrant.}
\\
\ds{\Large\bullet} & \mbox{The contribution from the arc}\
\ds{R\expo{\ic\pars{0,\pi/2}}}\
\mbox{-whith}\
\ds{R \to \infty}\mbox{- vanishes out.}
\\
\ds{\Large\bullet} & \mbox{The integration along the}\
\ds{y}\mbox{-axis }\ \underline{\mbox{is not a real number}}.
\\
\ds{\Large\bullet} & \mbox{However, the only additional contribution comes from} 
\\
& \mbox{the $\underline{indented}$ pole at}\ \ds{z = \expo{\ic\pi/2} = \ic}. Namely,
\\
& \ds{-\lim_{\epsilon \to 0^{+}}\int_{\pi/2}^{-\pi/2}
{\expo{\ic\verts{p}\ic} \over
\pars{\ic + \epsilon\expo{\ic\theta}}^{4} - 1}\epsilon\expo{\ic\theta}\ic\dd\theta =
-\,{\pi \over 4}\,\expo{-\verts{p}}}
\end{array}
$$
Then ( see (\ref{1}) and (\ref{2}) ),
\begin{align}
&\mbox{} \\
&\bbox[5px,#ffd]{%
\left.\mrm{P.V.}\int_{-\infty}^{\infty}{\expo{\ic px} \over
x^{4} - 1}\,\dd x\,\right\vert_{\ p\ \in\ \mathbb{R}}} =
\bbx{-\,{\pi \over 2}\bracks{%
\sin\pars{\verts{p}} + \expo{-\verts{p}}}} \\ &
\end{align}
