Optimal. Leaf size=38 \[ \frac {\sqrt {-1+x}}{2 x}-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\frac {1}{2} \text {ArcTan}\left (\sqrt {-1+x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5378, 12, 44,
65, 209} \begin {gather*} \frac {1}{2} \text {ArcTan}\left (\sqrt {x-1}\right )+\frac {\sqrt {x-1}}{2 x}-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 65
Rule 209
Rule 5378
Rubi steps
\begin {align*} \int \frac {\sec ^{-1}\left (\sqrt {x}\right )}{x^2} \, dx &=-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\int \frac {1}{2 \sqrt {-1+x} x^2} \, dx\\ &=-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\frac {1}{2} \int \frac {1}{\sqrt {-1+x} x^2} \, dx\\ &=\frac {\sqrt {-1+x}}{2 x}-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\frac {1}{4} \int \frac {1}{\sqrt {-1+x} x} \, dx\\ &=\frac {\sqrt {-1+x}}{2 x}-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-1+x}\right )\\ &=\frac {\sqrt {-1+x}}{2 x}-\frac {\sec ^{-1}\left (\sqrt {x}\right )}{x}+\frac {1}{2} \tan ^{-1}\left (\sqrt {-1+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 32, normalized size = 0.84 \begin {gather*} \frac {\sqrt {-1+x}-2 \sec ^{-1}\left (\sqrt {x}\right )-x \text {ArcSin}\left (\frac {1}{\sqrt {x}}\right )}{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 46, normalized size = 1.21
method | result | size |
derivativedivides | \(-\frac {\mathrm {arcsec}\left (\sqrt {x}\right )}{x}-\frac {\sqrt {x -1}\, \left (\arctan \left (\frac {1}{\sqrt {x -1}}\right ) x -\sqrt {x -1}\right )}{2 \sqrt {\frac {x -1}{x}}\, x^{\frac {3}{2}}}\) | \(46\) |
default | \(-\frac {\mathrm {arcsec}\left (\sqrt {x}\right )}{x}-\frac {\sqrt {x -1}\, \left (\arctan \left (\frac {1}{\sqrt {x -1}}\right ) x -\sqrt {x -1}\right )}{2 \sqrt {\frac {x -1}{x}}\, x^{\frac {3}{2}}}\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 51, normalized size = 1.34 \begin {gather*} -\frac {\sqrt {x} \sqrt {-\frac {1}{x} + 1}}{2 \, {\left (x {\left (\frac {1}{x} - 1\right )} - 1\right )}} - \frac {\operatorname {arcsec}\left (\sqrt {x}\right )}{x} + \frac {1}{2} \, \arctan \left (\sqrt {x} \sqrt {-\frac {1}{x} + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.88, size = 19, normalized size = 0.50 \begin {gather*} \frac {{\left (x - 2\right )} \operatorname {arcsec}\left (\sqrt {x}\right ) + \sqrt {x - 1}}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 15.32, size = 75, normalized size = 1.97 \begin {gather*} \frac {\begin {cases} i \operatorname {acosh}{\left (\frac {1}{\sqrt {x}} \right )} - \frac {i}{\sqrt {x} \sqrt {-1 + \frac {1}{x}}} + \frac {i}{x^{\frac {3}{2}} \sqrt {-1 + \frac {1}{x}}} & \text {for}\: \frac {1}{\left |{x}\right |} > 1 \\- \operatorname {asin}{\left (\frac {1}{\sqrt {x}} \right )} + \frac {\sqrt {1 - \frac {1}{x}}}{\sqrt {x}} & \text {otherwise} \end {cases}}{2} - \frac {\operatorname {asec}{\left (\sqrt {x} \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 30, normalized size = 0.79 \begin {gather*} \frac {\sqrt {-\frac {1}{x} + 1}}{2 \, \sqrt {x}} - \frac {\arccos \left (\frac {1}{\sqrt {x}}\right )}{x} + \frac {1}{2} \, \arccos \left (\frac {1}{\sqrt {x}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.68, size = 28, normalized size = 0.74 \begin {gather*} \frac {\sqrt {1-\frac {1}{x}}}{2\,\sqrt {x}}-\frac {\mathrm {acos}\left (\frac {1}{\sqrt {x}}\right )\,\left (\frac {2}{x}-1\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________