Optimal. Leaf size=70 \[ \frac{\sqrt{x^2+x-1}}{2 \left (1-x^2\right )}-\frac{1}{8} \tan ^{-1}\left (\frac{x+3}{2 \sqrt{x^2+x-1}}\right )-\frac{5}{8} \tanh ^{-1}\left (\frac{1-3 x}{2 \sqrt{x^2+x-1}}\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.124569, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278 \[ \frac{\sqrt{x^2+x-1}}{2 \left (1-x^2\right )}-\frac{1}{8} \tan ^{-1}\left (\frac{x+3}{2 \sqrt{x^2+x-1}}\right )-\frac{5}{8} \tanh ^{-1}\left (\frac{1-3 x}{2 \sqrt{x^2+x-1}}\right ) \]
Antiderivative was successfully verified.
[In] Int[1/((-1 + x^2)^2*Sqrt[-1 + x + x^2]),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 22.1084, size = 60, normalized size = 0.86 \[ - \frac{\operatorname{atan}{\left (- \frac{- x - 3}{2 \sqrt{x^{2} + x - 1}} \right )}}{8} + \frac{5 \operatorname{atanh}{\left (\frac{3 x - 1}{2 \sqrt{x^{2} + x - 1}} \right )}}{8} + \frac{\sqrt{x^{2} + x - 1}}{2 \left (- x^{2} + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(1/(x**2-1)**2/(x**2+x-1)**(1/2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0716154, size = 72, normalized size = 1.03 \[ \frac{1}{8} \left (-\frac{4 \sqrt{x^2+x-1}}{x^2-1}+5 \log \left (-2 \sqrt{x^2+x-1}-3 x+1\right )-\tan ^{-1}\left (\frac{x+3}{2 \sqrt{x^2+x-1}}\right )-5 \log (1-x)\right ) \]
Antiderivative was successfully verified.
[In] Integrate[1/((-1 + x^2)^2*Sqrt[-1 + x + x^2]),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.026, size = 84, normalized size = 1.2 \[{\frac{1}{4+4\,x}\sqrt{ \left ( 1+x \right ) ^{2}-2-x}}+{\frac{1}{8}\arctan \left ({\frac{-3-x}{2}{\frac{1}{\sqrt{ \left ( 1+x \right ) ^{2}-2-x}}}} \right ) }-{\frac{1}{-4+4\,x}\sqrt{ \left ( -1+x \right ) ^{2}+3\,x-2}}+{\frac{5}{8}{\it Artanh} \left ({\frac{-1+3\,x}{2}{\frac{1}{\sqrt{ \left ( -1+x \right ) ^{2}+3\,x-2}}}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(1/(x^2-1)^2/(x^2+x-1)^(1/2),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{\sqrt{x^{2} + x - 1}{\left (x^{2} - 1\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(sqrt(x^2 + x - 1)*(x^2 - 1)^2),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.272794, size = 348, normalized size = 4.97 \[ \frac{32 \, x^{3} + 48 \, x^{2} + 2 \,{\left (8 \, x^{4} + 8 \, x^{3} - 11 \, x^{2} - 4 \,{\left (2 \, x^{3} + x^{2} - 2 \, x - 1\right )} \sqrt{x^{2} + x - 1} - 8 \, x + 3\right )} \arctan \left (-x + \sqrt{x^{2} + x - 1} - 1\right ) + 5 \,{\left (8 \, x^{4} + 8 \, x^{3} - 11 \, x^{2} - 4 \,{\left (2 \, x^{3} + x^{2} - 2 \, x - 1\right )} \sqrt{x^{2} + x - 1} - 8 \, x + 3\right )} \log \left (-x + \sqrt{x^{2} + x - 1} + 2\right ) - 5 \,{\left (8 \, x^{4} + 8 \, x^{3} - 11 \, x^{2} - 4 \,{\left (2 \, x^{3} + x^{2} - 2 \, x - 1\right )} \sqrt{x^{2} + x - 1} - 8 \, x + 3\right )} \log \left (-x + \sqrt{x^{2} + x - 1}\right ) - 4 \,{\left (8 \, x^{2} + 8 \, x - 3\right )} \sqrt{x^{2} + x - 1} - 16 \, x - 16}{8 \,{\left (8 \, x^{4} + 8 \, x^{3} - 11 \, x^{2} - 4 \,{\left (2 \, x^{3} + x^{2} - 2 \, x - 1\right )} \sqrt{x^{2} + x - 1} - 8 \, x + 3\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(sqrt(x^2 + x - 1)*(x^2 - 1)^2),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{\left (x - 1\right )^{2} \left (x + 1\right )^{2} \sqrt{x^{2} + x - 1}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(x**2-1)**2/(x**2+x-1)**(1/2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.270882, size = 193, normalized size = 2.76 \[ \frac{2 \,{\left (x - \sqrt{x^{2} + x - 1}\right )}^{3} + 3 \,{\left (x - \sqrt{x^{2} + x - 1}\right )}^{2} - x + \sqrt{x^{2} + x - 1} - 1}{2 \,{\left ({\left (x - \sqrt{x^{2} + x - 1}\right )}^{4} - 2 \,{\left (x - \sqrt{x^{2} + x - 1}\right )}^{2} - 4 \, x + 4 \, \sqrt{x^{2} + x - 1}\right )}} + \frac{1}{4} \, \arctan \left (-x + \sqrt{x^{2} + x - 1} - 1\right ) + \frac{5}{8} \,{\rm ln}\left ({\left | -x + \sqrt{x^{2} + x - 1} + 2 \right |}\right ) - \frac{5}{8} \,{\rm ln}\left ({\left | -x + \sqrt{x^{2} + x - 1} \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(sqrt(x^2 + x - 1)*(x^2 - 1)^2),x, algorithm="giac")
[Out]