Optimal. Leaf size=17 \[ x \csc ^{-1}(x)+\tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 17, 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 = {5323, 272, 65,
212} \begin {gather*} \tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right )+x \csc ^{-1}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 272
Rule 5323
Rubi steps
\begin {align*} \int \csc ^{-1}(x) \, dx &=x \csc ^{-1}(x)+\int \frac {1}{\sqrt {1-\frac {1}{x^2}} x} \, dx\\ &=x \csc ^{-1}(x)-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {1-x} x} \, dx,x,\frac {1}{x^2}\right )\\ &=x \csc ^{-1}(x)+\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {1-\frac {1}{x^2}}\right )\\ &=x \csc ^{-1}(x)+\tanh ^{-1}\left (\sqrt {1-\frac {1}{x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(64\) vs. \(2(17)=34\).
time = 0.03, size = 64, normalized size = 3.76 \begin {gather*} x \csc ^{-1}(x)+\frac {\sqrt {-1+x^2} \left (-\log \left (1-\frac {x}{\sqrt {-1+x^2}}\right )+\log \left (1+\frac {x}{\sqrt {-1+x^2}}\right )\right )}{2 \sqrt {1-\frac {1}{x^2}} x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.00, size = 20, normalized size = 1.18
method | result | size |
lookup | \(x \,\mathrm {arccsc}\left (x \right )+\ln \left (x +x \sqrt {1-\frac {1}{x^{2}}}\right )\) | \(20\) |
default | \(x \,\mathrm {arccsc}\left (x \right )+\ln \left (x +x \sqrt {1-\frac {1}{x^{2}}}\right )\) | \(20\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs.
\(2 (15) = 30\).
time = 2.95, size = 35, normalized size = 2.06 \begin {gather*} x \operatorname {arccsc}\left (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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs.
\(2 (15) = 30\).
time = 0.90, size = 35, normalized size = 2.06 \begin {gather*} {\left (x - 2\right )} \operatorname {arccsc}\left (x\right ) - 4 \, \arctan \left (-x + \sqrt {x^{2} - 1}\right ) - \log \left (-x + \sqrt {x^{2} - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.12, size = 17, normalized size = 1.00 \begin {gather*} x \operatorname {acsc}{\left (x \right )} + \begin {cases} \operatorname {acosh}{\left (x \right )} & \text {for}\: \left |{x^{2}}\right | > 1 \\- i \operatorname {asin}{\left (x \right )} & \text {otherwise} \end {cases} \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. 37 vs.
\(2 (15) = 30\).
time = 0.48, size = 37, normalized size = 2.18 \begin {gather*} x \arcsin \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.21, size = 20, normalized size = 1.18 \begin {gather*} x\,\mathrm {asin}\left (\frac {1}{x}\right )+\ln \left (x+\sqrt {x^2-1}\right )\,\mathrm {sign}\left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________