Optimal. Leaf size=46 \[ \frac {x^2}{2}-\frac {2}{3} \log \left (x^2+2\right )+x+\frac {1}{3} \log (1-x)-\frac {2}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1629, 635, 203, 260} \[ \frac {x^2}{2}-\frac {2}{3} \log \left (x^2+2\right )+x+\frac {1}{3} \log (1-x)-\frac {2}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 635
Rule 1629
Rubi steps
\begin {align*} \int \frac {x^4}{(-1+x) \left (2+x^2\right )} \, dx &=\int \left (1+\frac {1}{3 (-1+x)}+x-\frac {4 (1+x)}{3 \left (2+x^2\right )}\right ) \, dx\\ &=x+\frac {x^2}{2}+\frac {1}{3} \log (1-x)-\frac {4}{3} \int \frac {1+x}{2+x^2} \, dx\\ &=x+\frac {x^2}{2}+\frac {1}{3} \log (1-x)-\frac {4}{3} \int \frac {1}{2+x^2} \, dx-\frac {4}{3} \int \frac {x}{2+x^2} \, dx\\ &=x+\frac {x^2}{2}-\frac {2}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )+\frac {1}{3} \log (1-x)-\frac {2}{3} \log \left (2+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 43, normalized size = 0.93 \[ \frac {1}{6} \left (3 x^2-4 \log \left (x^2+2\right )+6 x+2 \log (x-1)-4 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )-9\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.99, size = 33, normalized size = 0.72 \[ \frac {1}{2} \, x^{2} - \frac {2}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + x - \frac {2}{3} \, \log \left (x^{2} + 2\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 34, normalized size = 0.74 \[ \frac {1}{2} \, x^{2} - \frac {2}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + x - \frac {2}{3} \, \log \left (x^{2} + 2\right ) + \frac {1}{3} \, \log \left ({\left | x - 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 34, normalized size = 0.74 \[ \frac {x^{2}}{2}+x -\frac {2 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, x}{2}\right )}{3}+\frac {\ln \left (x -1\right )}{3}-\frac {2 \ln \left (x^{2}+2\right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.16, size = 33, normalized size = 0.72 \[ \frac {1}{2} \, x^{2} - \frac {2}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + x - \frac {2}{3} \, \log \left (x^{2} + 2\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 50, normalized size = 1.09 \[ x+\frac {\ln \left (x-1\right )}{3}+\ln \left (x-\sqrt {2}\,1{}\mathrm {i}\right )\,\left (-\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )-\ln \left (x+\sqrt {2}\,1{}\mathrm {i}\right )\,\left (\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )+\frac {x^2}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 41, normalized size = 0.89 \[ \frac {x^{2}}{2} + x + \frac {\log {\left (x - 1 \right )}}{3} - \frac {2 \log {\left (x^{2} + 2 \right )}}{3} - \frac {2 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________