TITLE: Need help with $\int_{-\infty}^\infty \frac{x^2 \, dx}{x^4+2a^2x^2+b^4}$
QUESTION [7 upvotes]: I'm having trouble trying to evaluate this definite integral. Mathematica didn't help much.
$$\int_{-\infty}^\infty \frac{x^2 \, dx}{x^4+2a^2x^2+b^4}$$
where $a$, $b$ $\in \Bbb R^+$.
Is it possible to solve it analytically? What methods should I try?

REPLY [2 votes]: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \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{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \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}$
With $\ds{a, b \in \mathbb{R}^{+}}$ and $\ds{p \equiv \pars{a/b}^{2}}$,
\begin{align}
\color{#f00}{%
\int_{-\infty}^{\infty}{x^{2}\,\dd x \over x^{4} + 2a^{2}x^{2} + b^{4}}}
& =
{1 \over \verts{b}}
\int_{-\infty}^{\infty}{x^{2}\,\dd x \over x^{4} + 2px^{2} + 1} =
{1 \over \verts{b}}
\int_{0}^{\infty}{x^{1/2}\,\dd x \over x^{2} + 2px + 1}
\\[3mm] & =
{1 \over \verts{b}}
\int_{0}^{\infty}{x^{1/2}\,\dd x \over \pars{x - x_{+}}\pars{x - x_{-}}}
\end{align}
where $\braces{x_{\pm}}$ are the roots of $x^{2} + 2px + 1 = 0$ which are given by
$x_{\pm} = -p \pm \root{p^{2} - 1}$. The integration can be performed along a key-hole contour which takes into account the branch-cut of
$z^{1/2} = \verts{z}^{1/2}\exp\pars{\ic\phi/2}\,,\ z \not= 0\,,\
0 < \phi < 2\pi$. Then,

${\large p < 1}$

The roots are given by $x_{\pm} = -p \pm \ic\root{1 - p^{2}}$ with $\verts{x_{\pm}} = 1$.

\begin{align}
2\pi\ic\bracks{%
{\verts{x_{+}}^{1/2}\expo{\ic\phi_{+}/2} \over x_{+} - x_{-}} +
{\verts{x_{-}}^{1/2}\expo{\ic\phi_{-}/2} \over x_{-} - x_{+}}} & =
\int_{0}^{\infty}{x^{1/2}\,\dd x \over x^{2} + 2px + 1} +
\int_{\infty}^{0}{x^{1/2}\expo{\ic\pi}\,\dd x \over x^{2} + 2px + 1}
\\[3mm] 
\int_{0}^{\infty}{x^{1/2}\,\dd x \over x^{2} + 2px + 1} & =
{\pi \over 2\root{1 - p^{2}}}\pars{\expo{\ic\phi_{+}/2} - \expo{\ic\phi_{-}/2}}
\\[3mm]
\phi_{+} = {\pi \over 2} + \delta\phi\,,\quad
\phi_{-} = {3\pi \over 2} - \delta\phi\,,\quad &
\delta\phi \equiv \arctan\pars{{p \over \root{1 - p^{2}}}}
\end{align}

\begin{align}
\int_{0}^{\infty}{x^{1/2}\,\dd x \over x^{2} + 2px + 1} & =
{\pi \over 2\root{1 - p^{2}}}\pars{%
\expo{\ic\pi/4}\expo{\ic\delta\phi/2} -
\expo{3\ic\pi/4}\expo{-\ic\delta\phi/2}}
\\[3mm] & =
{\pi \over 2\root{1 - p^{2}}}\bracks{%
{1 + \ic \over \root{2}}\,\expo{\ic\delta\phi/2} -
{-1 + \ic \over \root{2}}\,\expo{-\ic\delta\phi/2}}
\\[3mm] & =
{\root{2}\pi \over 2\root{1 - p^{2}}}\bracks{%
\cos\pars{\delta\phi \over 2} - \sin\pars{\delta\phi \over 2}}
\\[3mm] & =
{\root{2}\pi \over 2\root{1 - p^{2}}}\bracks{%
\root{{1 + \cos\pars{\delta\phi} \over 2}} -
\root{{1 - \cos\pars{\delta\phi}} \over 2}}
\end{align}

However,
$\ds{\cos\pars{\delta\phi} = {1 \over \root{\tan^{2}\pars{\delta\phi} + 1}}
     = \root{1 - p^{2}} = {\root{b^{2} - a^{2}} \over \verts{b}}}$:
\begin{align}
\int_{0}^{\infty}{x^{1/2}\,\dd x \over x^{2} + 2px + 1} & =
{\pi\verts{b}^{1/2} \over 2\root{b^{2} - a^{2}}}\bracks{%
\root{\verts{b} + \root{b^{2} - a^{2}}} -
\root{\verts{b} - \root{b^{2} - a^{2}}}}
\end{align}

${\large p > 1}$. Both roots are negative:
$x_{\pm} = -p \pm \root{p^{2} - 1}$. The calculation is similar to the previous one.