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.15, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {6688, 2115, 6742, 43, 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 43
Rule 207
Rule 685
Rule 688
Rule 2115
Rule 6688
Rule 6742
Rubi steps
\begin {align*} \int \frac {\sqrt {2-x} \sqrt {x}+x}{2-2 x} \, dx &=\int \frac {x+\sqrt {-(-2+x) x}}{2-2 x} \, dx\\ &=\int \frac {x+\sqrt {2 x-x^2}}{2-2 x} \, dx\\ &=\int \left (-\frac {x}{2 (-1+x)}+\frac {\sqrt {2 x-x^2}}{2 (1-x)}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {x}{-1+x} \, dx\right )+\frac {1}{2} \int \frac {\sqrt {2 x-x^2}}{1-x} \, dx\\ &=-\frac {1}{2} \sqrt {2 x-x^2}-\frac {1}{2} \int \left (1+\frac {1}{-1+x}\right ) \, dx+\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.02, 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]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 64, normalized size = 1.25 \[ -\frac {1}{2} \, x - \frac {1}{2} \, \sqrt {x} \sqrt {-x + 2} - \frac {1}{2} \, \log \left (x - 1\right ) + \frac {1}{2} \, \log \left (\frac {x + \sqrt {x} \sqrt {-x + 2}}{x}\right ) - \frac {1}{2} \, \log \left (-\frac {x - \sqrt {x} \sqrt {-x + 2}}{x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 51, normalized size = 1.00 \[ -\frac {x}{2}-\frac {\ln \left (x -1\right )}{2}-\frac {\sqrt {-x +2}\, \left (-\arctanh \left (\frac {1}{\sqrt {-\left (x -2\right ) x}}\right )+\sqrt {-\left (x -2\right ) x}\right ) \sqrt {x}}{2 \sqrt {-\left (x -2\right ) x}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.97, size = 54, normalized size = 1.06 \[ -\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 {2 \, \sqrt {-x^{2} + 2 \, x}}{{\left | x - 1 \right |}} + \frac {2}{{\left | x - 1 \right |}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.78, size = 56, normalized size = 1.10 \[ \mathrm {atanh}\left (\frac {\sqrt {x}\,\left (\sqrt {2}-\sqrt {2-x}\right )}{x+\sqrt {2}\,\sqrt {2-x}-2}\right )-\frac {\ln \left (x-1\right )}{2}-\frac {x}{2}-\frac {\sqrt {x}\,\sqrt {2-x}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {x}{x - 1}\, dx + \int \frac {\sqrt {x} \sqrt {2 - x}}{x - 1}\, dx}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________