Evaluating $\int_0^\infty\sqrt{\frac{x-1}{x^n-1}}\,dx$ I had a lot of fun in this answer where I worked out
$$\int_0^\infty\frac1{\sqrt{x^4+x^3+x^2+x+1}}\,dx=\frac4{\sqrt{4\varphi+3}}F\left(\frac{3\pi}{10},m=8\varphi-12\right)$$
But what happens if the largest exponent in the denominator polynomial is not $4$ but some other integer? In other words, is there a general closed form or single series expression for
$$\int_0^\infty\sqrt{\frac{x-1}{x^n-1}}\,dx\ ?$$
For $n=5$ the answer is as above and for $n=4$
$$\int_0^\infty\frac1{\sqrt{x^3+x^2+x+1}}\,dx=2^{-1/4}F\left(\cos^{-1}\frac{1-\sqrt2}{1+\sqrt2},\frac12+\frac1{2\sqrt2}\right)$$
The integrals for $n=1,2,3$ diverge. Evaluating the integral for $n\ge6$, however, appears to be infeasible even with series; while the gamma product sum in Jack d'Aurizio's answer here looks quite appealing, it only works for $n=5$ – only then can it be shown that the integral over $[0,\infty]$ is twice the integral over $[0,1]$, at which point you bring in beta functions. The other result in Jack's answer is a double sum, which can be generalised to other $n$ but is not very elegant (partly because of the double sum and partly because one bound of that sum uses a floor function).
If an approach that solves the task also gives integrals for the same integrand but with other bounds (e.g. $[0,1]$), that would be appreciated.
 A: I'll offer a "single series expression"; hopefully someone eagle-eyed can spot what that is in hypergeometric terms, thereby achieving a closed form.
For $x\in[0,\,1]$, apply $x=\sin^{2/n}t$; for $x\ge1$, apply $x=\csc^{2/n}t$. In terms of falling Pochhammer symbols, the integral is$$\begin{align}&\frac2n\int_0^{\pi/2}(\sin^{2/n-1}t+\sin^{-3/n}t)\sqrt{1-\sin^{2/n}t}dt\\&=\frac2n\sum_{k\ge0}\frac{(\tfrac12)_k(-1)^k}{k!}\int_0^{\pi/2}(\sin^{2(k+1)/n-1}t+\sin^{2(k-3/2)/n}t)dt\\&=\frac1n\sum_{k\ge0}\frac{(\tfrac12)_k(-1)^k}{k!}(\operatorname{B}(\tfrac{k+1}{n},\,\tfrac12)+\operatorname{B}(\tfrac{k-3/2}{n}+\tfrac12,\,\tfrac12))\\&=\frac{\sqrt{\pi}}{n}\sum_{k\ge0}\frac{(\tfrac12)_k(-1)^k}{k!}\left(\tfrac{\Gamma\left(\tfrac{k+1}{n}\right)}{\Gamma\left(\tfrac{k+1}{n}+\tfrac12\right)}+\tfrac{\Gamma\left(\tfrac{k-3/2}{n}+\tfrac12\right)}{\Gamma\left(\tfrac{k-3/2}{n}+1\right)}\right).\end{align}$$
A: Let $n\ge5$.
$$J_n=\int_0^\infty\sqrt{\frac{x-1}{x^n-1}}dx=\int_0^1\sqrt{\frac{x-1}{x^n-1}}dx+\int_1^\infty\sqrt{\frac{x-1}{x^n-1}}dx.$$
Then do $x\mapsto 1/x$ in the second integral, and add the two together:
$$J_n=\int_0^1\left(1+x^{(n-5)/2}\right)\sqrt{\frac{x-1}{x^n-1}}dx.$$
Using $$(1-q)^{-\alpha}=\,_1F_0(\alpha;;q),$$ we have
$$\sqrt{\frac{x-1}{x^n-1}}=\sum_{k\ge0}\beta_k^{(n)}x^k,$$
where $$\beta_k^{(n)}=\sum_{r=0}^{k}[n|r]\frac{(\tfrac12)_{r/n}(-\tfrac12)_{k-r}}{(r/n)!(k-r)!},$$
with $[a|b]$ being the Iverson Bracket for $b/a\in\Bbb Z$:
$$[a|b]=\left\lfloor \exp\left(a\left\lfloor \frac{b}{a}\right\rfloor-b\right)\right\rfloor.$$
Thus
$$J_n=\sum_{k\ge0}\beta_k^{(n)}\int_0^1(1+x^{(n-5)/2})x^kdx=\sum_{k\ge0}\beta_k^{(n)}\left(\frac1{k+1}+\frac{2}{2k+n-3}\right).$$
We have, additionally, that
$$\beta_k^{(n)}=\sum_{r=0}^{\lfloor k/n \rfloor}\frac{(\tfrac12)_{r}(-\tfrac12)_{k-nr}}{r!(k-nr)!}.$$
I am doubtful that there is a general closed form.
