Optimal. Leaf size=51 \[ -\frac{1}{2} \sqrt{2 x-x^2}+\frac{1}{2} \tanh ^{-1}\left (\sqrt{2 x-x^2}\right )-\frac{x}{2}-\frac{1}{2} \log (1-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.111184, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {6742, 685, 688, 207} \[ -\frac{1}{2} \sqrt{2 x-x^2}+\frac{1}{2} \tanh ^{-1}\left (\sqrt{2 x-x^2}\right )-\frac{x}{2}-\frac{1}{2} \log (1-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6742
Rule 685
Rule 688
Rule 207
Rubi steps
\begin{align*} \int \frac{x}{-x+\sqrt{2 x-x^2}} \, dx &=\int \left (-\frac{1}{2}-\frac{1}{2 (-1+x)}+\frac{\sqrt{2 x-x^2}}{2 (1-x)}\right ) \, dx\\ &=-\frac{x}{2}-\frac{1}{2} \log (1-x)+\frac{1}{2} \int \frac{\sqrt{2 x-x^2}}{1-x} \, dx\\ &=-\frac{x}{2}-\frac{1}{2} \sqrt{2 x-x^2}-\frac{1}{2} \log (1-x)+\frac{1}{2} \int \frac{1}{(1-x) \sqrt{2 x-x^2}} \, dx\\ &=-\frac{x}{2}-\frac{1}{2} \sqrt{2 x-x^2}-\frac{1}{2} \log (1-x)-2 \operatorname{Subst}\left (\int \frac{1}{-4+4 x^2} \, dx,x,\sqrt{2 x-x^2}\right )\\ &=-\frac{x}{2}-\frac{1}{2} \sqrt{2 x-x^2}+\frac{1}{2} \tanh ^{-1}\left (\sqrt{2 x-x^2}\right )-\frac{1}{2} \log (1-x)\\ \end{align*}
Mathematica [A] time = 0.0504605, size = 39, normalized size = 0.76 \[ \frac{1}{2} \left (-x-\sqrt{-(x-2) x}-\log (1-x)+\tanh ^{-1}\left (\sqrt{-(x-2) x}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 38, normalized size = 0.8 \begin{align*} -{\frac{x}{2}}-{\frac{\ln \left ( x-1 \right ) }{2}}-{\frac{1}{2}\sqrt{- \left ( x-1 \right ) ^{2}+1}}+{\frac{1}{2}{\it Artanh} \left ({\frac{1}{\sqrt{- \left ( x-1 \right ) ^{2}+1}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{x}{x - \sqrt{-x^{2} + 2 \, x}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46842, size = 163, normalized size = 3.2 \begin{align*} -\frac{1}{2} \, x - \frac{1}{2} \, \sqrt{-x^{2} + 2 \, x} - \frac{1}{2} \, \log \left (x - 1\right ) + \frac{1}{2} \, \log \left (\frac{x + \sqrt{-x^{2} + 2 \, x}}{x}\right ) - \frac{1}{2} \, \log \left (-\frac{x - \sqrt{-x^{2} + 2 \, x}}{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{x}{x - \sqrt{- x^{2} + 2 x}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13862, size = 68, normalized size = 1.33 \begin{align*} -\frac{1}{2} \, x - \frac{1}{2} \, \sqrt{-x^{2} + 2 \, x} - \frac{1}{2} \, \log \left (-\frac{2 \,{\left (\sqrt{-x^{2} + 2 \, x} - 1\right )}}{{\left | -2 \, x + 2 \right |}}\right ) - \frac{1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]