Optimal. Leaf size=54 \[ -\frac {x^2}{4}+\frac {1}{4} \sqrt {2-x^2} x+\frac {1}{4} \log \left (1-x^2\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {2-x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {6725, 260, 266, 43, 478, 12, 377, 207} \[ -\frac {x^2}{4}+\frac {1}{4} \sqrt {2-x^2} x+\frac {1}{4} \log \left (1-x^2\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {2-x^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 207
Rule 260
Rule 266
Rule 377
Rule 478
Rule 6725
Rubi steps
\begin {align*} \int \frac {2 x-x^3+x^2 \sqrt {2-x^2}}{-2+2 x^2} \, dx &=\int \left (\frac {x}{-1+x^2}-\frac {x^3}{2 \left (-1+x^2\right )}+\frac {x^2 \sqrt {2-x^2}}{2 \left (-1+x^2\right )}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {x^3}{-1+x^2} \, dx\right )+\frac {1}{2} \int \frac {x^2 \sqrt {2-x^2}}{-1+x^2} \, dx+\int \frac {x}{-1+x^2} \, dx\\ &=\frac {1}{4} x \sqrt {2-x^2}+\frac {1}{2} \log \left (1-x^2\right )-\frac {1}{4} \int -\frac {2}{\sqrt {2-x^2} \left (-1+x^2\right )} \, dx-\frac {1}{4} \operatorname {Subst}\left (\int \frac {x}{-1+x} \, dx,x,x^2\right )\\ &=\frac {1}{4} x \sqrt {2-x^2}+\frac {1}{2} \log \left (1-x^2\right )-\frac {1}{4} \operatorname {Subst}\left (\int \left (1+\frac {1}{-1+x}\right ) \, dx,x,x^2\right )+\frac {1}{2} \int \frac {1}{\sqrt {2-x^2} \left (-1+x^2\right )} \, dx\\ &=-\frac {x^2}{4}+\frac {1}{4} x \sqrt {2-x^2}+\frac {1}{4} \log \left (1-x^2\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\frac {x}{\sqrt {2-x^2}}\right )\\ &=-\frac {x^2}{4}+\frac {1}{4} x \sqrt {2-x^2}-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {2-x^2}}\right )+\frac {1}{4} \log \left (1-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 77, normalized size = 1.43 \[ \frac {1}{4} \left (-x^2+\sqrt {2-x^2} x+\log \left (1-x^2\right )-\log \left (\sqrt {2-x^2}-x+2\right )+\log \left (\sqrt {2-x^2}+x+2\right )+\log (1-x)-\log (x+1)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 67, normalized size = 1.24 \[ -\frac {1}{4} \, x^{2} + \frac {1}{4} \, \sqrt {-x^{2} + 2} x + \frac {1}{4} \, \log \left (x^{2} - 1\right ) - \frac {1}{8} \, \log \left (-\frac {\sqrt {-x^{2} + 2} x + 1}{x^{2}}\right ) + \frac {1}{8} \, \log \left (\frac {\sqrt {-x^{2} + 2} x - 1}{x^{2}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.44, size = 117, normalized size = 2.17 \[ -\frac {1}{4} \, x^{2} + \frac {1}{4} \, \sqrt {-x^{2} + 2} x + \frac {1}{4} \, \log \left ({\left | x^{2} - 1 \right |}\right ) - \frac {1}{4} \, \log \left ({\left | \frac {x}{\sqrt {2} - \sqrt {-x^{2} + 2}} - \frac {\sqrt {2} - \sqrt {-x^{2} + 2}}{x} + 2 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | \frac {x}{\sqrt {2} - \sqrt {-x^{2} + 2}} - \frac {\sqrt {2} - \sqrt {-x^{2} + 2}}{x} - 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 111, normalized size = 2.06 \[ -\frac {x^{2}}{4}+\frac {\sqrt {-x^{2}+2}\, x}{4}-\frac {\arctanh \left (\frac {-2 x +4}{2 \sqrt {-2 x -\left (x -1\right )^{2}+3}}\right )}{4}+\frac {\arctanh \left (\frac {2 x +4}{2 \sqrt {2 x -\left (x +1\right )^{2}+3}}\right )}{4}+\frac {\ln \left (x -1\right )}{4}+\frac {\ln \left (x +1\right )}{4}+\frac {\sqrt {-2 x -\left (x -1\right )^{2}+3}}{4}-\frac {\sqrt {2 x -\left (x +1\right )^{2}+3}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 2.03, size = 94, normalized size = 1.74 \[ -\frac {1}{4} \, x^{2} + \frac {1}{4} \, \sqrt {-x^{2} + 2} x + \frac {1}{4} \, \log \left (x^{2} - 1\right ) + \frac {1}{4} \, \log \left (\frac {2 \, \sqrt {-x^{2} + 2}}{{\left | 2 \, x + 2 \right |}} + \frac {2}{{\left | 2 \, x + 2 \right |}} + 1\right ) - \frac {1}{4} \, \log \left (\frac {2 \, \sqrt {-x^{2} + 2}}{{\left | 2 \, x - 2 \right |}} + \frac {2}{{\left | 2 \, x - 2 \right |}} - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.33, size = 86, normalized size = 1.59 \[ \frac {\ln \left (x-1\right )}{4}+\frac {\ln \left (x+1\right )}{4}-\frac {\ln \left (\frac {-x\,1{}\mathrm {i}+\sqrt {2-x^2}\,1{}\mathrm {i}+2{}\mathrm {i}}{x-1}\right )}{4}+\frac {\ln \left (\frac {x\,1{}\mathrm {i}+\sqrt {2-x^2}\,1{}\mathrm {i}+2{}\mathrm {i}}{x+1}\right )}{4}+\frac {x\,\sqrt {2-x^2}}{4}-\frac {x^2}{4} \]
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 \left (- \frac {2 x}{x^{2} - 1}\right )\, dx + \int \frac {x^{3}}{x^{2} - 1}\, dx + \int \left (- \frac {x^{2} \sqrt {2 - x^{2}}}{x^{2} - 1}\right )\, dx}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________