3.515 \(\int \frac{\sqrt{-1+\frac{1}{x^2}} \left (-1+x^2\right )^2}{x} \, dx\)

Optimal. Leaf size=60 \[ \frac{5}{8} \left (\frac{1}{x^2}-1\right )^{3/2} x^2-\frac{15}{8} \sqrt{\frac{1}{x^2}-1}+\frac{15}{8} \tan ^{-1}\left (\sqrt{\frac{1}{x^2}-1}\right )+\frac{1}{4} \left (\frac{1}{x^2}-1\right )^{5/2} x^4 \]

[Out]

(-15*Sqrt[-1 + x^(-2)])/8 + (5*(-1 + x^(-2))^(3/2)*x^2)/8 + ((-1 + x^(-2))^(5/2)
*x^4)/4 + (15*ArcTan[Sqrt[-1 + x^(-2)]])/8

_______________________________________________________________________________________

Rubi [A]  time = 0.0559564, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3 \[ \frac{5}{8} \left (\frac{1}{x^2}-1\right )^{3/2} x^2-\frac{15}{8} \sqrt{\frac{1}{x^2}-1}+\frac{15}{8} \tan ^{-1}\left (\sqrt{\frac{1}{x^2}-1}\right )+\frac{1}{4} \left (\frac{1}{x^2}-1\right )^{5/2} x^4 \]

Antiderivative was successfully verified.

[In]  Int[(Sqrt[-1 + x^(-2)]*(-1 + x^2)^2)/x,x]

[Out]

(-15*Sqrt[-1 + x^(-2)])/8 + (5*(-1 + x^(-2))^(3/2)*x^2)/8 + ((-1 + x^(-2))^(5/2)
*x^4)/4 + (15*ArcTan[Sqrt[-1 + x^(-2)]])/8

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.97222, size = 60, normalized size = 1. \[ \frac{x^{4} \left (-1 + \frac{1}{x^{2}}\right )^{\frac{5}{2}}}{4} + \frac{5 x^{2} \left (-1 + \frac{1}{x^{2}}\right )^{\frac{3}{2}}}{8} - \frac{15 \sqrt{-1 + \frac{1}{x^{2}}}}{8} + \frac{15 \operatorname{atan}{\left (\sqrt{-1 + \frac{1}{x^{2}}} \right )}}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2-1)**2*(-1+1/x**2)**(1/2)/x,x)

[Out]

x**4*(-1 + x**(-2))**(5/2)/4 + 5*x**2*(-1 + x**(-2))**(3/2)/8 - 15*sqrt(-1 + x**
(-2))/8 + 15*atan(sqrt(-1 + x**(-2)))/8

_______________________________________________________________________________________

Mathematica [A]  time = 0.034665, size = 60, normalized size = 1. \[ \frac{\sqrt{\frac{1}{x^2}-1} \left (15 x \log \left (\sqrt{x^2-1}+x\right )+\sqrt{x^2-1} \left (2 x^4-9 x^2-8\right )\right )}{8 \sqrt{x^2-1}} \]

Antiderivative was successfully verified.

[In]  Integrate[(Sqrt[-1 + x^(-2)]*(-1 + x^2)^2)/x,x]

[Out]

(Sqrt[-1 + x^(-2)]*(Sqrt[-1 + x^2]*(-8 - 9*x^2 + 2*x^4) + 15*x*Log[x + Sqrt[-1 +
 x^2]]))/(8*Sqrt[-1 + x^2])

_______________________________________________________________________________________

Maple [A]  time = 0.011, size = 69, normalized size = 1.2 \[ -{\frac{1}{8}\sqrt{-{\frac{{x}^{2}-1}{{x}^{2}}}} \left ( 2\,{x}^{2} \left ( -{x}^{2}+1 \right ) ^{3/2}+8\, \left ( -{x}^{2}+1 \right ) ^{3/2}+15\,{x}^{2}\sqrt{-{x}^{2}+1}+15\,\arcsin \left ( x \right ) x \right ){\frac{1}{\sqrt{-{x}^{2}+1}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2-1)^2*(-1+1/x^2)^(1/2)/x,x)

[Out]

-1/8*(-(x^2-1)/x^2)^(1/2)*(2*x^2*(-x^2+1)^(3/2)+8*(-x^2+1)^(3/2)+15*x^2*(-x^2+1)
^(1/2)+15*arcsin(x)*x)/(-x^2+1)^(1/2)

_______________________________________________________________________________________

Maxima [A]  time = 0.798958, size = 90, normalized size = 1.5 \[ -x^{2} \sqrt{\frac{1}{x^{2}} - 1} - \sqrt{\frac{1}{x^{2}} - 1} - \frac{{\left (\frac{1}{x^{2}} - 1\right )}^{\frac{3}{2}} - \sqrt{\frac{1}{x^{2}} - 1}}{8 \,{\left ({\left (\frac{1}{x^{2}} - 1\right )}^{2} + \frac{2}{x^{2}} - 1\right )}} + \frac{15}{8} \, \arctan \left (\sqrt{\frac{1}{x^{2}} - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)^2*sqrt(1/x^2 - 1)/x,x, algorithm="maxima")

[Out]

-x^2*sqrt(1/x^2 - 1) - sqrt(1/x^2 - 1) - 1/8*((1/x^2 - 1)^(3/2) - sqrt(1/x^2 - 1
))/((1/x^2 - 1)^2 + 2/x^2 - 1) + 15/8*arctan(sqrt(1/x^2 - 1))

_______________________________________________________________________________________

Fricas [A]  time = 0.265638, size = 68, normalized size = 1.13 \[ \frac{1}{8} \,{\left (2 \, x^{4} - 9 \, x^{2} - 8\right )} \sqrt{-\frac{x^{2} - 1}{x^{2}}} + \frac{15}{4} \, \arctan \left (\frac{x \sqrt{-\frac{x^{2} - 1}{x^{2}}} - 1}{x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)^2*sqrt(1/x^2 - 1)/x,x, algorithm="fricas")

[Out]

1/8*(2*x^4 - 9*x^2 - 8)*sqrt(-(x^2 - 1)/x^2) + 15/4*arctan((x*sqrt(-(x^2 - 1)/x^
2) - 1)/x)

_______________________________________________________________________________________

Sympy [A]  time = 18.6116, size = 216, normalized size = 3.6 \[ \begin{cases} - \frac{i x}{\sqrt{x^{2} - 1}} + i \operatorname{acosh}{\left (x \right )} + \frac{i}{x \sqrt{x^{2} - 1}} & \text{for}\: \left |{x^{2}}\right | > 1 \\\frac{x}{\sqrt{- x^{2} + 1}} - \operatorname{asin}{\left (x \right )} - \frac{1}{x \sqrt{- x^{2} + 1}} & \text{otherwise} \end{cases} - 2 \left (\begin{cases} \frac{i x^{3}}{2 \sqrt{x^{2} - 1}} - \frac{i x}{2 \sqrt{x^{2} - 1}} - \frac{i \operatorname{acosh}{\left (x \right )}}{2} & \text{for}\: \left |{x^{2}}\right | > 1 \\\frac{x \sqrt{- x^{2} + 1}}{2} + \frac{\operatorname{asin}{\left (x \right )}}{2} & \text{otherwise} \end{cases}\right ) + \begin{cases} \frac{i x^{5}}{4 \sqrt{x^{2} - 1}} - \frac{3 i x^{3}}{8 \sqrt{x^{2} - 1}} + \frac{i x}{8 \sqrt{x^{2} - 1}} - \frac{i \operatorname{acosh}{\left (x \right )}}{8} & \text{for}\: \left |{x^{2}}\right | > 1 \\- \frac{x^{5}}{4 \sqrt{- x^{2} + 1}} + \frac{3 x^{3}}{8 \sqrt{- x^{2} + 1}} - \frac{x}{8 \sqrt{- x^{2} + 1}} + \frac{\operatorname{asin}{\left (x \right )}}{8} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2-1)**2*(-1+1/x**2)**(1/2)/x,x)

[Out]

Piecewise((-I*x/sqrt(x**2 - 1) + I*acosh(x) + I/(x*sqrt(x**2 - 1)), Abs(x**2) >
1), (x/sqrt(-x**2 + 1) - asin(x) - 1/(x*sqrt(-x**2 + 1)), True)) - 2*Piecewise((
I*x**3/(2*sqrt(x**2 - 1)) - I*x/(2*sqrt(x**2 - 1)) - I*acosh(x)/2, Abs(x**2) > 1
), (x*sqrt(-x**2 + 1)/2 + asin(x)/2, True)) + Piecewise((I*x**5/(4*sqrt(x**2 - 1
)) - 3*I*x**3/(8*sqrt(x**2 - 1)) + I*x/(8*sqrt(x**2 - 1)) - I*acosh(x)/8, Abs(x*
*2) > 1), (-x**5/(4*sqrt(-x**2 + 1)) + 3*x**3/(8*sqrt(-x**2 + 1)) - x/(8*sqrt(-x
**2 + 1)) + asin(x)/8, True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.271025, size = 90, normalized size = 1.5 \[ \frac{1}{8} \,{\left (2 \, x^{2}{\rm sign}\left (x\right ) - 9 \,{\rm sign}\left (x\right )\right )} \sqrt{-x^{2} + 1} x - \frac{15}{8} \, \arcsin \left (x\right ){\rm sign}\left (x\right ) + \frac{x{\rm sign}\left (x\right )}{2 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}} - \frac{{\left (\sqrt{-x^{2} + 1} - 1\right )}{\rm sign}\left (x\right )}{2 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)^2*sqrt(1/x^2 - 1)/x,x, algorithm="giac")

[Out]

1/8*(2*x^2*sign(x) - 9*sign(x))*sqrt(-x^2 + 1)*x - 15/8*arcsin(x)*sign(x) + 1/2*
x*sign(x)/(sqrt(-x^2 + 1) - 1) - 1/2*(sqrt(-x^2 + 1) - 1)*sign(x)/x