Optimal. Leaf size=21 \[ \frac {1}{\sqrt {-1+\frac {1}{x^2}}}-\sqrt {-1+\frac {1}{x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {25, 272, 45}
\begin {gather*} \frac {1}{\sqrt {\frac {1}{x^2}-1}}-\sqrt {\frac {1}{x^2}-1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 25
Rule 45
Rule 272
Rubi steps
\begin {align*} \int \frac {\sqrt {-1+\frac {1}{x^2}}}{x \left (-1+x^2\right )^2} \, dx &=\int \frac {1}{\left (-1+\frac {1}{x^2}\right )^{3/2} x^5} \, dx\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \frac {x}{(-1+x)^{3/2}} \, dx,x,\frac {1}{x^2}\right )\right )\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \left (\frac {1}{(-1+x)^{3/2}}+\frac {1}{\sqrt {-1+x}}\right ) \, dx,x,\frac {1}{x^2}\right )\right )\\ &=\frac {1}{\sqrt {-1+\frac {1}{x^2}}}-\sqrt {-1+\frac {1}{x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 24, normalized size = 1.14 \begin {gather*} \frac {\sqrt {-1+\frac {1}{x^2}} \left (1-2 x^2\right )}{-1+x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.38, size = 32, normalized size = 1.52
method | result | size |
gosper | \(-\frac {\left (2 x^{2}-1\right ) \sqrt {-\frac {x^{2}-1}{x^{2}}}}{x^{2}-1}\) | \(29\) |
trager | \(-\frac {\left (2 x^{2}-1\right ) \sqrt {-\frac {x^{2}-1}{x^{2}}}}{x^{2}-1}\) | \(29\) |
risch | \(-\frac {\left (2 x^{2}-1\right ) \sqrt {-\frac {x^{2}-1}{x^{2}}}}{x^{2}-1}\) | \(29\) |
default | \(-\frac {\left (2 x^{2}-1\right ) \sqrt {-\frac {x^{2}-1}{x^{2}}}}{\left (1+x \right ) \left (-1+x \right )}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 30, normalized size = 1.43 \begin {gather*} -\frac {{\left (2 \, x^{2} - 1\right )} \sqrt {x + 1} \sqrt {-x + 1}}{x^{3} - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 28, normalized size = 1.33 \begin {gather*} -\frac {{\left (2 \, x^{2} - 1\right )} \sqrt {-\frac {x^{2} - 1}{x^{2}}}}{x^{2} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.06, size = 20, normalized size = 0.95 \begin {gather*} - \sqrt {-1 + \frac {1}{x^{2}}} + \frac {1}{\sqrt {-1 + \frac {1}{x^{2}}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (17) = 34\).
time = 2.34, size = 58, normalized size = 2.76 \begin {gather*} -\frac {\sqrt {-x^{2} + 1} x \mathrm {sgn}\left (x\right )}{x^{2} - 1} + \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.11, size = 25, normalized size = 1.19 \begin {gather*} \frac {x\,\sqrt {\frac {1}{x^2}-1}\,\left (2\,x^2-1\right )}{x-x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________