Challenging integral with root in denominator I'm wondering if anyone has ideas to get started with this integral:
$$
I = \frac{b}{\pi}\int_{-\infty}^{\infty}dx\,\frac{1}{\sqrt{\left[(x-1)^2+b^2\right]\left[(x+1)^2+b^2\right]}}
$$
for $b>0$. Mathematica 12 can't get it done (except for $b=1$) and the most obvious methods haven't worked for me. Ideas? Can it be done exactly?
Ben
Edit: Here is a variation that I also would like to solve:
$$
I_2 = \frac{\sqrt{b_+ b_-}}{\pi}\int_{-\infty}^{\infty}dx\,\frac{1}{\sqrt{\left[(x-1)^2+b_+^2\right]\left[(x+1)^2+b_-^2\right]}}
$$
I'm not sure that ComplexYetTrivial's solution will work for this one. There is a linear term appearing in the root that will mess up the square completion. Ideas?
Edit 2: It seems like it was solved here using Maple, but the solution looks quite messy:
https://stats.stackexchange.com/questions/243943/is-it-correct-to-compute-bhattacharyya-distance-for-cauchy-like-bell-shaped-fun
 A: We have
\begin{align}
I &= \frac{b}{\pi} \int \limits_{-\infty}^\infty \frac{\mathrm{d} x}{\sqrt{[(x-1)^2 + b^2][(x+1)^2+b^2]}} = \frac{2b}{\pi} \int \limits_0^\infty \frac{\mathrm{d} x}{\sqrt{[(x-1)^2 + b^2][(x+1)^2+b^2]}} \\
&= \frac{2b}{\pi} \int \limits_0^\infty \frac{\mathrm{d} x}{\sqrt{(1+b^2)^2 - 2 (1-b^2) x^2 + x^4}} \stackrel{x = \sqrt{1+b^2} t}{=} \frac{2 b}{\pi \sqrt{1+b^2}} \int \limits_0^\infty \frac{\mathrm{d} t}{\sqrt{1 - 2 \frac{1-b^2}{1+b^2} t^2 + t^4}} \\
&= \frac{2 b}{\pi \sqrt{1+b^2}} \int \limits_0^\infty \!\! \frac{\mathrm{d} t}{\sqrt{(1 + t^2)^2 - \frac{4}{1+b^2} t^2}} \!\stackrel{t = \tan\left(\frac{\phi}{2}\right)}{=} \!\!\frac{b}{\pi \sqrt{1+b^2}} \int \limits_0^\pi \!\frac{\mathrm{d} \phi}{\sqrt{1 - \frac{4}{1+b^2}\sin^2\left(\frac{\phi}{2}\right)\cos^2\left(\frac{\phi}{2}\right)}} \\
&= \frac{b}{\pi \sqrt{1+b^2}} \int \limits_0^\pi \frac{\mathrm{d} \phi}{\sqrt{1 - \frac{\sin^2(\phi)}{1+b^2}}} = \frac{2 b}{\pi \sqrt{1+b^2}} \int \limits_0^{\pi/2} \!\frac{\mathrm{d} \phi}{\sqrt{1 - \frac{\sin^2(\phi)}{1+b^2}}} = \frac{2b}{\pi \sqrt{1+b^2}} \operatorname{K}\left(\frac{1}{\sqrt{1+b^2}}\right)
\end{align}
for $b>0$, where $\operatorname{K}$ is the complete elliptic integral of the first kind.
A: I found an answer to my suggested generalization for $b_+ \neq b_-$. The result is:
$$I = \frac{4}{\pi}\sqrt{\frac{b_+ b_-}{A_+}} K\left(\frac{A_-}{A_+}\right).$$
Here, I have introduced:
$$A_\pm = 4 + (b_+ \pm b_-)^2,$$
and $K$ is the complete elliptic integral of the first kind as defined by Mathematica's EllipticK[].
