Optimal. Leaf size=65 \[ \frac {\sqrt {1-x^2}}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} \sqrt {1-x^2}\right )}{2 \sqrt {2}}+\frac {x}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{2 \sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {2107, 321, 206, 444, 50, 63, 207} \[ \frac {\sqrt {1-x^2}}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} \sqrt {1-x^2}\right )}{2 \sqrt {2}}+\frac {x}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{2 \sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 206
Rule 207
Rule 321
Rule 444
Rule 2107
Rubi steps
\begin {align*} \int \frac {x}{x-\sqrt {1-x^2}} \, dx &=-\int \frac {x^2}{1-2 x^2} \, dx-\int \frac {x \sqrt {1-x^2}}{1-2 x^2} \, dx\\ &=\frac {x}{2}-\frac {1}{2} \int \frac {1}{1-2 x^2} \, dx-\frac {1}{2} \operatorname {Subst}\left (\int \frac {\sqrt {1-x}}{1-2 x} \, dx,x,x^2\right )\\ &=\frac {x}{2}+\frac {\sqrt {1-x^2}}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{2 \sqrt {2}}-\frac {1}{4} \operatorname {Subst}\left (\int \frac {1}{(1-2 x) \sqrt {1-x}} \, dx,x,x^2\right )\\ &=\frac {x}{2}+\frac {\sqrt {1-x^2}}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{-1+2 x^2} \, dx,x,\sqrt {1-x^2}\right )\\ &=\frac {x}{2}+\frac {\sqrt {1-x^2}}{2}-\frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{2 \sqrt {2}}-\frac {\tanh ^{-1}\left (\sqrt {2} \sqrt {1-x^2}\right )}{2 \sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 54, normalized size = 0.83 \[ \frac {1}{4} \left (2 \left (\sqrt {1-x^2}+x\right )-\sqrt {2} \tanh ^{-1}\left (\sqrt {2-2 x^2}\right )-\sqrt {2} \tanh ^{-1}\left (\sqrt {2} x\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.67, size = 97, normalized size = 1.49 \[ \frac {1}{8} \, \sqrt {2} \log \left (\frac {6 \, x^{2} - 2 \, \sqrt {2} {\left (2 \, x^{2} - 3\right )} + 2 \, \sqrt {-x^{2} + 1} {\left (3 \, \sqrt {2} - 4\right )} - 9}{2 \, x^{2} - 1}\right ) + \frac {1}{8} \, \sqrt {2} \log \left (\frac {2 \, x^{2} - 2 \, \sqrt {2} x + 1}{2 \, x^{2} - 1}\right ) + \frac {1}{2} \, x + \frac {1}{2} \, \sqrt {-x^{2} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.57, size = 105, normalized size = 1.62 \[ \frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | 4 \, x - 2 \, \sqrt {2} \right |}}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}}\right ) - \frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} + \frac {2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 6 \right |}}{{\left | 4 \, \sqrt {2} + \frac {2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 6 \right |}}\right ) + \frac {1}{2} \, x + \frac {1}{2} \, \sqrt {-x^{2} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 175, normalized size = 2.69 \[ \frac {x}{2}-\frac {\sqrt {2}\, \arctanh \left (\sqrt {2}\, x \right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (1-\left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{8}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (\left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+1\right ) \sqrt {2}}{\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{8}+\frac {\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{8}+\frac {\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x}{x - \sqrt {-x^{2} + 1}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.50, size = 127, normalized size = 1.95 \[ \frac {x}{2}-\frac {\sqrt {2}\,\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}-1\right )\,1{}\mathrm {i}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {2}}{2}}\right )}{8}-\frac {\sqrt {2}\,\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}+1\right )\,1{}\mathrm {i}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {2}}{2}}\right )}{8}+\frac {\sqrt {2}\,\ln \left (x-\frac {\sqrt {2}}{2}\right )}{8}-\frac {\sqrt {2}\,\ln \left (x+\frac {\sqrt {2}}{2}\right )}{8}+\frac {\sqrt {1-x^2}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x}{x - \sqrt {1 - x^{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________