Optimal. Leaf size=44 \[ -\frac{1}{2} \left (\frac{1}{x^2}-1\right )^{3/2} x^2+\frac{3}{2} \sqrt{\frac{1}{x^2}-1}-\frac{3}{2} \tan ^{-1}\left (\sqrt{\frac{1}{x^2}-1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0138863, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {25, 266, 47, 50, 63, 203} \[ -\frac{1}{2} \left (\frac{1}{x^2}-1\right )^{3/2} x^2+\frac{3}{2} \sqrt{\frac{1}{x^2}-1}-\frac{3}{2} \tan ^{-1}\left (\sqrt{\frac{1}{x^2}-1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 25
Rule 266
Rule 47
Rule 50
Rule 63
Rule 203
Rubi steps
\begin{align*} \int \frac{\sqrt{-1+\frac{1}{x^2}} \left (-1+x^2\right )}{x} \, dx &=-\int \left (-1+\frac{1}{x^2}\right )^{3/2} x \, dx\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{(-1+x)^{3/2}}{x^2} \, dx,x,\frac{1}{x^2}\right )\\ &=-\frac{1}{2} \left (-1+\frac{1}{x^2}\right )^{3/2} x^2+\frac{3}{4} \operatorname{Subst}\left (\int \frac{\sqrt{-1+x}}{x} \, dx,x,\frac{1}{x^2}\right )\\ &=\frac{3}{2} \sqrt{-1+\frac{1}{x^2}}-\frac{1}{2} \left (-1+\frac{1}{x^2}\right )^{3/2} x^2-\frac{3}{4} \operatorname{Subst}\left (\int \frac{1}{\sqrt{-1+x} x} \, dx,x,\frac{1}{x^2}\right )\\ &=\frac{3}{2} \sqrt{-1+\frac{1}{x^2}}-\frac{1}{2} \left (-1+\frac{1}{x^2}\right )^{3/2} x^2-\frac{3}{2} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{-1+\frac{1}{x^2}}\right )\\ &=\frac{3}{2} \sqrt{-1+\frac{1}{x^2}}-\frac{1}{2} \left (-1+\frac{1}{x^2}\right )^{3/2} x^2-\frac{3}{2} \tan ^{-1}\left (\sqrt{-1+\frac{1}{x^2}}\right )\\ \end{align*}
Mathematica [C] time = 0.0073557, size = 34, normalized size = 0.77 \[ \frac{\sqrt{\frac{1}{x^2}-1} \, _2F_1\left (-\frac{3}{2},-\frac{1}{2};\frac{1}{2};x^2\right )}{\sqrt{1-x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 55, normalized size = 1.3 \begin{align*}{\frac{1}{2}\sqrt{-{\frac{{x}^{2}-1}{{x}^{2}}}} \left ( 2\, \left ( -{x}^{2}+1 \right ) ^{3/2}+3\,{x}^{2}\sqrt{-{x}^{2}+1}+3\,\arcsin \left ( x \right ) x \right ){\frac{1}{\sqrt{-{x}^{2}+1}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.05112, size = 41, normalized size = 0.93 \begin{align*} \frac{1}{2} \, x^{2} \sqrt{\frac{1}{x^{2}} - 1} + \sqrt{\frac{1}{x^{2}} - 1} - \frac{3}{2} \, \arctan \left (\sqrt{\frac{1}{x^{2}} - 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.44859, size = 107, normalized size = 2.43 \begin{align*} \frac{1}{2} \,{\left (x^{2} + 2\right )} \sqrt{-\frac{x^{2} - 1}{x^{2}}} - 3 \, \arctan \left (\frac{x \sqrt{-\frac{x^{2} - 1}{x^{2}}} - 1}{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 27.1288, size = 39, normalized size = 0.89 \begin{align*} \frac{x^{2} \sqrt{-1 + \frac{1}{x^{2}}}}{2} + \sqrt{-1 + \frac{1}{x^{2}}} - \frac{3 \operatorname{atan}{\left (\sqrt{-1 + \frac{1}{x^{2}}} \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16428, size = 77, normalized size = 1.75 \begin{align*} \frac{1}{2} \, \sqrt{-x^{2} + 1} x \mathrm{sgn}\left (x\right ) + \frac{3}{2} \, \arcsin \left (x\right ) \mathrm{sgn}\left (x\right ) - \frac{x \mathrm{sgn}\left (x\right )}{2 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}} + \frac{{\left (\sqrt{-x^{2} + 1} - 1\right )} \mathrm{sgn}\left (x\right )}{2 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]