<s>[INST] Closed form for the integral $\int_0^\infty \frac{dx}{\sqrt{(x+a)(x+b)(x+c)(x+d)}}$ Let's consider the function defined by the integral: 
$$R(a,b,c,d)=\int_0^\infty \frac{dx}{\sqrt{(x+a)(x+b)(x+c)(x+d)}}$$
I'm interested in the case $a,b,c,d \in \mathbb{R}^+$. Obviously, the function is symmetric in all four parameters.
This function has some really nice properties.
$$R(ka,kb,kc,kd)=\frac{1}{k} R(a,b,c,d)$$
Thus:
$$R(a,a,a,a)=\frac{1}{a}$$
Moreover:
$$R(a,a,b,b)=\frac{\ln a-\ln b}{a-b}$$
This is the reciprocal of the logarithmic mean of the numbers $a$ and $b$.
For the case of $R(a,a,b,c)$ we can use the Euler substitution to obtain:
$$R(a,a,b,c)=2 \int_{\sqrt{bc}-a}^{\frac{b+c}{2}-a} \frac{dt}{t^2-(a-b)(a-c)}=$$
$$=\frac{1}{\sqrt{(a-b)(a-c)}} \left( \ln \frac{\sqrt{(a-b)(a-c)}+\sqrt{bc}-a}{\sqrt{(a-b)(a-c)}-\sqrt{bc}+a}-\ln \frac{\sqrt{(a-b)(a-c)}+\frac{b+c}{2}-a}{\sqrt{(a-b)(a-c)}-\frac{b+c}{2}+a} \right)$$

As far as I see, this function is deeply related to various means (you can see arithmetic, geometric and logarithmic means represented in the above expressions).

Is there a closed form for the general case of $R(a,b,c,d)$ for $a,b,c,d \in \mathbb{R}^+$? Perhaps, in terms of hypergeometric functions or elliptic integrals?

 [/INST] 
Hint:
Assume that $0<a<b<c<d$. Using the magical linear-fractional transformation,
$$\frac{\left(d-b\right)\left(x+a\right)}{\left(d-a\right)\left(x+b\right)}=t,$$
we obtain:
$$\begin{align}
R{\left(a,b,c,d\right)}
&=\int_{0}^{\infty}\frac{\mathrm{d}x}{\sqrt{\left(x+a\right)\left(x+b\right)\left(x+c\right)\left(x+d\right)}}\\
&=\small{\int_{\frac{a\left(d-b\right)}{b\left(d-a\right)}}^{\frac{d-b}{d-a}}\frac{\mathrm{d}t}{\sqrt{\frac{\left(d-a\right)\left(b-a\right)t}{\left(d-b\right)-\left(d-a\right)t}\cdot\frac{\left(d-b\right)\left(b-a\right)}{\left(d-b\right)-\left(d-a\right)t}\cdot\frac{\left(d-a\right)\left(d-b\right)\left(1-t\right)\left[\left(d-b\right)\left(c-a\right)-\left(d-a\right)\left(c-b\right)t\right]}{\left[\left(d-b\right)-\left(d-a\right)t\right]^{2}}}}\cdot\frac{\left(d-a\right)\left(d-b\right)\left(b-a\right)}{\left[\left(d-b\right)-\left(d-a\right)t\right]^{2}}}\\
&=\int_{\frac{a\left(d-b\right)}{b\left(d-a\right)}}^{\frac{d-b}{d-a}}\frac{\mathrm{d}t}{\sqrt{t\left(1-t\right)\left[\left(d-b\right)\left(c-a\right)-\left(d-a\right)\left(c-b\right)t\right]}}\\
&=\frac{1}{\sqrt{\left(d-b\right)\left(c-a\right)}}\int_{\frac{a\left(d-b\right)}{b\left(d-a\right)}}^{\frac{d-b}{d-a}}\frac{\mathrm{d}t}{\sqrt{t\left(1-t\right)\left[1-\frac{\left(d-a\right)\left(c-b\right)}{\left(d-b\right)\left(c-a\right)}t\right]}}.\\
\end{align}$$
The rest is pretty straightforward. Can you take it from there?
</s>