Optimal. Leaf size=23 \[ \frac {1}{\sqrt {x^2}}+\frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {270, 5346, 30}
\begin {gather*} \frac {1}{\sqrt {x^2}}+\frac {\sqrt {x^2-1} \sec ^{-1}(x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 270
Rule 5346
Rubi steps
\begin {align*} \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx &=\frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x}-\frac {x \int \frac {1}{x^2} \, dx}{\sqrt {x^2}}\\ &=\frac {1}{\sqrt {x^2}}+\frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 35, normalized size = 1.52 \begin {gather*} \frac {\sqrt {1-\frac {1}{x^2}} x+\left (-1+x^2\right ) \sec ^{-1}(x)}{x \sqrt {-1+x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.38, size = 178, normalized size = 7.74
method | result | size |
default | \(-\frac {\sqrt {\frac {x^{2}-1}{x^{2}}}\, x^{3}-3 i x^{2}-4 \sqrt {\frac {x^{2}-1}{x^{2}}}\, x +4 i}{4 \sqrt {x^{2}-1}\, \left (i \sqrt {\frac {x^{2}-1}{x^{2}}}\, x +1\right ) x}+\frac {\left (x^{2}-2-2 i \sqrt {\frac {x^{2}-1}{x^{2}}}\, x \right ) \mathrm {arcsec}\left (x \right )}{4 x \sqrt {x^{2}-1}}-\frac {\left (i \sqrt {\frac {x^{2}-1}{x^{2}}}\, x -1\right ) \left (\mathrm {arcsec}\left (x \right )+i\right )}{4 \sqrt {x^{2}-1}\, x}+\frac {\left (i \sqrt {\frac {x^{2}-1}{x^{2}}}\, x +x^{2}-1\right ) \left (3 \,\mathrm {arcsec}\left (x \right )-i\right )}{4 \sqrt {x^{2}-1}\, x}\) | \(178\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.60, size = 17, normalized size = 0.74 \begin {gather*} \frac {\sqrt {x^{2} - 1} \operatorname {arcsec}\left (x\right )}{x} + \frac {1}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.80, size = 16, normalized size = 0.70 \begin {gather*} \frac {\sqrt {x^{2} - 1} \operatorname {arcsec}\left (x\right ) + 1}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {asec}{\left (x \right )}}{x^{2} \sqrt {\left (x - 1\right ) \left (x + 1\right )}}\, dx \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. 50 vs.
\(2 (19) = 38\).
time = 0.84, size = 50, normalized size = 2.17 \begin {gather*} \frac {2 \, \arccos \left (\frac {1}{x}\right )}{{\left (x - \sqrt {x^{2} - 1}\right )}^{2} + 1} - \frac {2 \, \arctan \left (-x + \sqrt {x^{2} - 1}\right )}{\mathrm {sgn}\left (x\right )} + \frac {1}{x \mathrm {sgn}\left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {\mathrm {acos}\left (\frac {1}{x}\right )}{x^2\,\sqrt {x^2-1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________