Optimal. Leaf size=19 \[ x \sec ^{-1}(x)-\tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 2.000, Rules used = {5214, 266, 63, 206} \[ x \sec ^{-1}(x)-\tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 206
Rule 266
Rule 5214
Rubi steps
\begin {align*} \int \sec ^{-1}(x) \, dx &=x \sec ^{-1}(x)-\int \frac {1}{\sqrt {1-\frac {1}{x^2}} x} \, dx\\ &=x \sec ^{-1}(x)+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x} x} \, dx,x,\frac {1}{x^2}\right )\\ &=x \sec ^{-1}(x)-\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {1-\frac {1}{x^2}}\right )\\ &=x \sec ^{-1}(x)-\tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.07, size = 64, normalized size = 3.37 \[ x \sec ^{-1}(x)-\frac {\sqrt {x^2-1} \left (\log \left (\frac {x}{\sqrt {x^2-1}}+1\right )-\log \left (1-\frac {x}{\sqrt {x^2-1}}\right )\right )}{2 \sqrt {1-\frac {1}{x^2}} x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 33, normalized size = 1.74 \[ {\left (x - 2\right )} \operatorname {arcsec}\relax (x) + 4 \, \arctan \left (-x + \sqrt {x^{2} - 1}\right ) + \log \left (-x + \sqrt {x^{2} - 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.03, size = 37, normalized size = 1.95 \[ x \arccos \left (\frac {1}{x}\right ) - \frac {1}{2} \, \log \left (\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) + \frac {1}{2} \, \log \left (-\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 22, normalized size = 1.16 \[ x \,\mathrm {arcsec}\relax (x )-\ln \left (x +\sqrt {-\frac {1}{x^{2}}+1}\, x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.47, size = 35, normalized size = 1.84 \[ x \operatorname {arcsec}\relax (x) - \frac {1}{2} \, \log \left (\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) + \frac {1}{2} \, \log \left (-\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.61, size = 21, normalized size = 1.11 \[ x\,\mathrm {acos}\left (\frac {1}{x}\right )-\ln \left (x+\sqrt {x^2-1}\right )\,\mathrm {sign}\relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 2.18, size = 17, normalized size = 0.89 \[ x \operatorname {asec}{\relax (x )} - \begin {cases} \operatorname {acosh}{\relax (x )} & \text {for}\: \left |{x^{2}}\right | > 1 \\- i \operatorname {asin}{\relax (x )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________