Integrand size = 21, antiderivative size = 147 \[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\sqrt {x-\sqrt {-1+x^2}} \left (-\frac {1}{x}+\sqrt {x+\sqrt {-1+x^2}} \left (-\frac {\arctan \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 {\text {arctanh}\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}}\right )\right ) \]
[Out]
Time = 0.09 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.36, number of steps used = 12, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {2144, 468, 335, 303, 1176, 631, 210, 1179, 642} \[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=-\frac {\arctan \left (1-\sqrt {2} \sqrt {x-\sqrt {x^2-1}}\right )}{\sqrt {2}}+\frac {\arctan \left (\sqrt {2} \sqrt {x-\sqrt {x^2-1}}+1\right )}{\sqrt {2}}-\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}} \]
[In]
[Out]
Rule 210
Rule 303
Rule 335
Rule 468
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 2144
Rubi steps \begin{align*} \text {integral}& = 2 \text {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}+\text {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 \text {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}-\text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\text {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} \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {x-\sqrt {-1+x^2}}\right )+\frac {\text {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 {\text {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 {\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}-\frac {\text {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 {\arctan \left (1-\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}\right )}{\sqrt {2}}+\frac {\arctan \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*}
Time = 0.21 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.76 \[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=-\frac {\sqrt {x-\sqrt {-1+x^2}}}{x}+\frac {\arctan \left (\frac {-1+x-\sqrt {-1+x^2}}{\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}}\right )}{\sqrt {2}}+\frac {\text {arctanh}\left (\frac {-1-x+\sqrt {-1+x^2}}{\sqrt {2} \sqrt {x-\sqrt {-1+x^2}}}\right )}{\sqrt {2}} \]
[In]
[Out]
\[\int \frac {\sqrt {x -\sqrt {x^{2}-1}}}{x^{2}}d x\]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.29 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.90 \[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\frac {\left (i - 1\right ) \, \sqrt {2} x \log \left (\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x - \sqrt {x^{2} - 1}}\right ) - \left (i + 1\right ) \, \sqrt {2} x \log \left (-\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x - \sqrt {x^{2} - 1}}\right ) + \left (i + 1\right ) \, \sqrt {2} x \log \left (\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x - \sqrt {x^{2} - 1}}\right ) - \left (i - 1\right ) \, \sqrt {2} x \log \left (-\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x - \sqrt {x^{2} - 1}}\right ) - 4 \, \sqrt {x - \sqrt {x^{2} - 1}}}{4 \, x} \]
[In]
[Out]
\[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\int \frac {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\int { \frac {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\int { \frac {\sqrt {x - \sqrt {x^{2} - 1}}}{x^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {x-\sqrt {-1+x^2}}}{x^2} \, dx=\int \frac {\sqrt {x-\sqrt {x^2-1}}}{x^2} \,d x \]
[In]
[Out]