Optimal. Leaf size=147 \[ \sqrt {x-\sqrt {x^2-1}} \left (\sqrt {\sqrt {x^2-1}+x} \left (-\frac {\tan ^{-1}\left (\frac {\frac {\sqrt {x^2-1}}{\sqrt {2}}+\frac {x}{\sqrt {2}}-\frac {1}{\sqrt {2}}}{\sqrt {\sqrt {x^2-1}+x}}\right )}{\sqrt {2}}-\frac {\tanh ^{-1}\left (\frac {\frac {\sqrt {x^2-1}}{\sqrt {2}}+\frac {x}{\sqrt {2}}+\frac {1}{\sqrt {2}}}{\sqrt {\sqrt {x^2-1}+x}}\right )}{\sqrt {2}}\right )-\frac {1}{x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 200, normalized size of antiderivative = 1.36, number of steps used = 12, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {2119, 457, 329, 297, 1162, 617, 204, 1165, 628} \begin {gather*} -\frac {2 \left (x-\sqrt {x^2-1}\right )^{3/2}}{\left (x-\sqrt {x^2-1}\right )^2+1}+\frac {\log \left (-\sqrt {x^2-1}-\sqrt {2} \sqrt {x-\sqrt {x^2-1}}+x+1\right )}{2 \sqrt {2}}-\frac {\log \left (-\sqrt {x^2-1}+\sqrt {2} \sqrt {x-\sqrt {x^2-1}}+x+1\right )}{2 \sqrt {2}}-\frac {\tan ^{-1}\left (1-\sqrt {2} \sqrt {x-\sqrt {x^2-1}}\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (\sqrt {2} \sqrt {x-\sqrt {x^2-1}}+1\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 297
Rule 329
Rule 457
Rule 617
Rule 628
Rule 1162
Rule 1165
Rule 2119
Rubi steps
\begin {align*} \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx &=2 \operatorname {Subst}\left (\int \frac {\sqrt {x} \left (-1+x^2\right )}{\left (1+x^2\right )^2} \, dx,x,x-\sqrt {-1+x^2}\right )\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}+\operatorname {Subst}\left (\int \frac {\sqrt {x}}{1+x^2} \, dx,x,x-\sqrt {-1+x^2}\right )\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}+2 \operatorname {Subst}\left (\int \frac {x^2}{1+x^4} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}-\operatorname {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\operatorname {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}+\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}+\frac {\log \left (1+x-\sqrt {-1+x^2}-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}-\frac {\log \left (1+x-\sqrt {-1+x^2}+\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}+\frac {\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}-\frac {\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}\\ &=-\frac {2 \left (x-\sqrt {-1+x^2}\right )^{3/2}}{1+\left (x-\sqrt {-1+x^2}\right )^2}-\frac {\tan ^{-1}\left (1-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (1+\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}+\frac {\log \left (1+x-\sqrt {-1+x^2}-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}-\frac {\log \left (1+x-\sqrt {-1+x^2}+\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{2 \sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.23, size = 102, normalized size = 0.69 \begin {gather*} \frac {4 \sqrt {x^2-1} \left (x-\sqrt {x^2-1}\right )^{5/2} \left (\, _2F_1\left (\frac {3}{4},1;\frac {7}{4};-\left (x-\sqrt {x^2-1}\right )^2\right )-2 \, _2F_1\left (\frac {3}{4},2;\frac {7}{4};-\left (x-\sqrt {x^2-1}\right )^2\right )\right )}{-3 x^2+3 \sqrt {x^2-1} x+3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.24, size = 135, normalized size = 0.92 \begin {gather*} -\frac {\sqrt {x-\sqrt {-1+x^2}}}{x}+\frac {\tan ^{-1}\left (\frac {-\frac {1}{\sqrt {2}}+\frac {x}{\sqrt {2}}-\frac {\sqrt {-1+x^2}}{\sqrt {2}}}{\sqrt {x-\sqrt {-1+x^2}}}\right )}{\sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {-\frac {1}{\sqrt {2}}-\frac {x}{\sqrt {2}}+\frac {\sqrt {-1+x^2}}{\sqrt {2}}}{\sqrt {x-\sqrt {-1+x^2}}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 226, normalized size = 1.54 \begin {gather*} -\frac {4 \, \sqrt {2} x \arctan \left (\sqrt {2} \sqrt {\sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} + x - \sqrt {x^{2} - 1} + 1} - \sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} - 1\right ) + 4 \, \sqrt {2} x \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {-4 \, \sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} + 4 \, x - 4 \, \sqrt {x^{2} - 1} + 4} - \sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} + 1\right ) + \sqrt {2} x \log \left (4 \, \sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} + 4 \, x - 4 \, \sqrt {x^{2} - 1} + 4\right ) - \sqrt {2} x \log \left (-4 \, \sqrt {2} \sqrt {x - \sqrt {x^{2} - 1}} + 4 \, x - 4 \, \sqrt {x^{2} - 1} + 4\right ) + 4 \, \sqrt {x - \sqrt {x^{2} - 1}}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\sqrt {x -\sqrt {x^{2}-1}}}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {x-\sqrt {x^2-1}}}{x^2} \,d 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 {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________