A Nasty Elliptic Integral I am trying to evaluate:
$$\int_{-\infty}^{\infty}\frac{dx}{\left|1+\alpha x^{2}\right|},\textrm{ }\alpha\in\mathbb{C}\backslash(-\infty,0]$$
It's simple to see that it is convergent for such $\alpha$—but that's probably the only simple thing about it! I've been lost in trying to solve this one for several days, now. Performing a change of variables yields:
$$\int_{0}^{\infty}\frac{\sqrt{q}dx}{\sqrt{x}\sqrt{x^{2}+px+q}}$$
where $p=\frac{\cos\theta}{r}$ and $q=\frac{1}{r^{2}}$, where $\alpha=re^{i\theta}$.
Performing yet more changes of variables and integrating by parts yields (assuming I didn't screw up somewhere along the way):
$$\frac{2}{r}+\frac{2}{r}\int_{\frac{p}{2}}^{\infty}\frac{x\sqrt{x-\frac{p}{2}}}{\left(x^{2}-\Delta^{2}\right)^{3/2}}dx$$
where $\Delta=\frac{i}{2r}\sqrt{4-\cos^{2}\theta}$. This version, Mathematica is able to compute, giving the formula: 
$$\int_{a}^{\infty}\frac{x\sqrt{x-a}}{\left(x^{2}-b^{2}\right)^{3/2}}dx=\frac{\textrm{sgn}\left(\textrm{arg}\left(-b^{-2}\right)\right)}{\left(a^{2}-b^{2}\right)^{1/4}}K\left(\frac{1}{2}-\frac{a}{2\sqrt{a^{2}-b^{2}}}\right)$$ 
where $K$ is the complete elliptic integral of the first kind. However, this formula is only valid for $a,b\in\mathbb{C}$ satisfying $\textrm{Im}\left(a\right)=0$, $\textrm{Re}\left(a\right)>0$, $\textrm{Re}\left(b^{2}\right)<0$, and satisfying either: “$\textrm{Re}\left(a\right)>\textrm{Re}\left(b\right)$ and $a>\textrm{Re}\left(b\right)$” OR “$b\notin\mathbb{R}$”. 
All of these conditions are satisfied for my integral, except for the $\textrm{Re}\left(a\right)>0$ condition, which makes no sense. $a=\frac{p}{2}=\frac{\textrm{Re}\left(\alpha\right)}{\left|\alpha\right|^{2}}$, and the initial integral is valid even for $\alpha$ with $a\leq0$, as long as $\textrm{Im}\left(\alpha\right)\neq0$.
So: any ideas for how to evaluate:
$$\int_{-\infty}^{\infty}\frac{dx}{\left|1+\alpha x^{2}\right|}?$$
Thanks!
 A: In this answer I use a variable substitution which I cannot find in the already published answers.
Say that $\alpha \neq 0$ and $\alpha = \varrho e^{i\theta}, \, -\pi <\theta< \pi$. Then $|1+\alpha x^2| = \sqrt{\varrho^2x^4 +2\varrho\cos \theta x^2+1}$ and
\begin{gather*}
I = \int_{-\infty}^{\infty}\dfrac{dx}{|1+\alpha x^2|} = 2\int_{0}^{\infty}\dfrac{dx}{\sqrt{\varrho^2x^4 +2\varrho\cos \theta x^2+1}} =\dfrac{2}{\sqrt{\varrho}} \int_{0}^{\infty}\dfrac{dx}{\sqrt{x^4 +2\cos \theta x^2+1}} = \\[2ex]
\dfrac{4}{\sqrt{\varrho}} \int_{0}^{1}\dfrac{dx}{\sqrt{x^4 +2\cos \theta x^2+1}} = \dfrac{4}{\sqrt{\varrho}} \int_{0}^{1}\dfrac{dx}{\sqrt{x^4+2x^2+1-4x^2\sin^2\frac{\theta}{2}}} = \\[2ex]
 \dfrac{4}{\sqrt{\varrho}} \int_{0}^{1}\dfrac{dx}{(x^2+1)\sqrt{1-\frac{4x^2}{(x^2+1)^2}\sin^2\frac{\theta}{2}}}.\tag{1}
\end{gather*}
For $0<x<1$ we put $y = \dfrac{2x}{x^2+1}, 0<y<1$.
Then
\begin{equation*}
y(x^2+1)=2x\tag{2}
\end{equation*}
and
\begin{equation*}
x= \dfrac{1-\sqrt{1-y^2}}{y}.\tag {3}
\end{equation*}
From (2) we get
\begin{equation*}
(x^2+1)dy + 2xydx=2dx \Leftrightarrow dx= \dfrac{x^2+1}{2(1-xy)}dy = \dfrac{x^2+1}{2\sqrt{1-y^2}}dy
\end{equation*}
where we have used (3) in the last step. Finally we use that in (1). Thus
\begin{equation*}
I =  \dfrac{2}{\sqrt{\varrho}} \int_{0}^{1}\dfrac{dy}{\sqrt{1-y^2}\sqrt{1-y^2\sin^2\frac{\theta}{2}}} = \dfrac{2}{\sqrt{|\alpha|}}K\left(\sin^2\frac{\theta}{2}\right).
\end{equation*}
A: $\newcommand{\bbx}[1]{\,\bbox[8px,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}$

$\ds{\alpha \in \mathbb{C}\setminus\left(-\infty,0\right].\quad}$ Lets
  $\ds{\alpha = \verts{\alpha}\exp\pars{\ic\phi}\quad}$ where
  $\ds{\quad-\pi < \phi < \pi\quad}$ and $\ds{\quad\alpha \not= 0}$.

\begin{align}
&\int_{-\infty}^{\infty}{\dd x \over \verts{1 + \alpha x^{2}}} =
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{\root{\verts{\alpha}}\dd x \over \verts{\vphantom{\Large A} \verts{\alpha}x^{2} + \verts{\alpha}/\alpha}}
\\[5mm] \stackrel{\root{\verts{\alpha}}x\ \mapsto\ x}{=}&
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{\dd x \over \verts{\vphantom{\Large A} x^{2} + \bar{\alpha}/\verts{\alpha}}} =
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{\dd x \over \verts{\vphantom{\Large A} x^{2} + \expo{-\ic\phi}}}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{\dd x \over \root{\pars{x^{2} + \expo{-\ic\phi}}\pars{x^{2} + \expo{\ic\phi}}}}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{\dd x \over \root{x^{4} + 2\cos\pars{\phi}x^{2} + 1}}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{1 \over \root{x^{2} + 2\cos\pars{\phi} + 1/x^{2}}}\,{\dd x \over x}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{1 \over \root{\pars{x - 1/x}^{2} + 2 + 2\cos\pars{\phi}}}\,{\dd x \over x}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\infty}
{1 \over \root{\pars{x - 1/x}^{2} + 4\cos^{2}\pars{\phi/2}}}\,{\dd x \over x}
\end{align}
With the change of variables
$\ds{t = x - {1 \over x}}$ and $\ds{x = {\root{t^{2} + 4} + t \over 2}}$:
\begin{align}
&\int_{-\infty}^{\infty}{\dd x \over \verts{1 + \alpha x^{2}}} =
{2 \over \root{\verts{\alpha}}}\int_{-\infty}^{\infty}
{\dd t \over \root{t^{2} + 4\cos^{2}\pars{\phi/2}}\root{t^{2} + 4}}
\\[5mm] \stackrel{t\ =\ 2\tan\pars{\theta}}{=}\,\,\,&\
{4 \over \root{\verts{\alpha}}}\int_{0}^{\pi/2}
{2\sec^{2}\pars{\theta} \over
\root{4\tan^{2}\pars{\theta} + 4\cos^{2}\pars{\phi/2}}\bracks{2\sec\pars{\theta}}}\,\dd\theta
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\pi/2}
{\dd\theta \over
\root{\sin^{2}\pars{\theta} + \cos^{2}\pars{\phi/2}\cos^{2}\pars{\theta}}}
\\[5mm] = &\
{2 \over \root{\verts{\alpha}}}\int_{0}^{\pi/2}
{\dd\theta \over
\root{\cos^{2}\pars{\phi/2} + \sin^{2}\pars{\phi/2}\sin^{2}\pars{\theta}}}
\\[5mm] = &\
\bbx{\ds{{2 \over \root{\verts{\alpha}}}
\,\mrm{K}\pars{\sin^{2}\pars{\phi \over 2}}}}\,;\qquad\alpha \not= 0\,,\quad
\phi = \,\mrm{arg}\pars{\alpha}\,,\quad \phi \in \pars{-\pi,\pi}
\end{align}

$\ds{\mrm{K}}$ is the Complete Elliptic Integral of the First Kind.

A: Maybe something like this: First, we write $\alpha=a+ib$ and use the fact that the integrand is even. Thus, the integral equals
$$
2\int_0^{+\infty}\frac{1}{\sqrt{(1+ax^2)^2+(bx^2)^2}}\,dx
$$
Playing a bit with that expression, we find that this equals
$$
\biggl[\frac{1}{(a^2+b^2)^{1/4}} F\Bigl(2\arctan\bigl((a^2+b^2)^{1/4}x\bigr),\frac{1}{2}-\frac{a}{2\sqrt{a^2+b^2}}\Bigr)\biggr]_0^{+\infty}
$$
where $F$ denotes the incomplete elliptic integral of the first kind (EllipticF in Mathematica, other conventions are also used). The limit $x=0$ gives no contribution, and, using the upper limit, one gets
$$
\frac{2}{(a^2+b^2)^{1/4}}K\Bigl(\frac{1}{2}-\frac{a}{2\sqrt{a^2+b^2}}\Bigr)
$$
where $K$ denotes the complete elliptic integral of the first kind, (EllipticK in Mathematica).
A: Praise be! I just figured it out!
$\int_{-\infty}^{\infty}\frac{dx}{\left|1+\alpha x^{2}\right|}$
is the $L^{2}$ norm of $\left(1+\alpha x^{2}\right)^{-\frac{1}{2}}$. 
The fourier transform ($\int_{-\infty}^{\infty}f\left(x\right)e^{-2\pi i\xi x}dx$ convention) of $\left(1+\alpha x^{2}\right)^{-\frac{1}{2}}$ is $\frac{2}{\sqrt{\alpha}}K_{0}\left(\frac{2\pi\left|\xi\right|}{\sqrt{\alpha}}\right)$, where $K_{0}$ is the modified Bessel function of the second kind.
Wolfram Alpha gives
$\int_{-\infty}^{\infty}\left|K_{0}\left(\left|x\right|\right)\right|^{2}dx=\frac{\pi^{2}}{2}$
So, using Parseval's Identity, splitting the integral in half, and performing the change of variables then yields the answer:
$\int_{-\infty}^{\infty}\frac{dx}{\left|1+\alpha x^{2}\right|}=\frac{\pi}{\sqrt{\alpha}}$
Woo!
Wait... dammit. This doesn't take into account the fact that $\alpha$ is complex. The change of variables leads to a contour integral on a ray from 0. So there's still more work to be done.
Turns out you need to integrate the square modulus of $K_{0}$ along the ray from 0 to $\frac{\infty}{\sqrt{\alpha}}$. Any thoughts as to how to do this?
