Integrate the square root of the ratio of two quadratic polynomials $$\int \sqrt{\frac{x^2+x-1}{x^2-1}} dx$$ 
I have been trying to find this integral for a while and I just can't. Does it even have a closed form? 
 A: If,
$$I=\int \sqrt{\frac{x^2+x-1}{x^2-1}} dx$$
Let $p=\arcsin\Big(\tfrac{1}{\sqrt{\phi^{3}}}\sqrt{\tfrac{1+x}{1-x}}\Big)$ and $\phi = \frac{1+\sqrt{5}}{2}$, then,
$$I =   \small{(x+1)\sqrt{\frac{x^2+x-1}{x^2-1}}} +\sqrt{\phi^3}\left(-2\phi^{-1}\,F(p,-\phi^6)+\phi^{-3}\, E(p,-\phi^6)  +2\Pi(-\phi^3;p,-\phi^6) \right)$$
where,


*

*$F(p,k)$ is the elliptic integral of the first kind

*$E(p,k)$ is the elliptic integral of the second kind, 

*$\Pi(n;p,k)$ is the elliptic integral of the third kind.

A: Mathematica gives:
$\frac{\sqrt{\frac{x^2+x-1}{x^2-1}} \left((x+1)
   \left(x^2+x-1\right)+\frac{\sqrt{\frac{x+1}{1-x}} \sqrt{\frac{2 x+\sqrt{5}+1}{1-x}}
   (x-1)^2 \left(\sqrt{\frac{1+\sqrt{5}}{x-1}+2 \left(2+\sqrt{5}\right)} \left(\left(14-6
   \sqrt{5}\right) F\left(\sin ^{-1}\left(\sqrt{-2+\sqrt{5}}
   \sqrt{\frac{x+1}{1-x}}\right)|-9-4 \sqrt{5}\right)+\left(5 \sqrt{5}-11\right)
   E\left(\sin ^{-1}\left(\sqrt{-2+\sqrt{5}} \sqrt{\frac{x+1}{1-x}}\right)|-9-4
   \sqrt{5}\right)+2 \left(\sqrt{5}-3\right) \Pi \left(-2-\sqrt{5};\sin
   ^{-1}\left(\sqrt{-2+\sqrt{5}} \sqrt{\frac{x+1}{1-x}}\right)|-9-4
   \sqrt{5}\right)\right)-2 \left(\sqrt{5}-1\right) \sqrt{\frac{\sqrt{5} x+x-2}{x-1}}
   \left(F\left(\sin ^{-1}\left(\sqrt{-2+\sqrt{5}} \sqrt{\frac{x+1}{1-x}}\right)|-9-4
   \sqrt{5}\right)-2 \Pi \left(-2-\sqrt{5};\sin ^{-1}\left(\sqrt{-2+\sqrt{5}}
   \sqrt{\frac{x+1}{1-x}}\right)|-9-4 \sqrt{5}\right)\right)\right)}{2
   \left(\sqrt{5}-3\right)}\right)}{x^2+x-1}$
