Optimal. Leaf size=41 \[ \frac {2}{3} \log \left (x^2+2\right )+\frac {1}{x+1}-\frac {1}{3} \log (x+1)+\frac {4}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {1594, 2075, 635, 203, 260} \[ \frac {2}{3} \log \left (x^2+2\right )+\frac {1}{x+1}-\frac {1}{3} \log (x+1)+\frac {4}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 635
Rule 1594
Rule 2075
Rubi steps
\begin {align*} \int \frac {6 x+4 x^2+x^3}{2+4 x+3 x^2+2 x^3+x^4} \, dx &=\int \frac {x \left (6+4 x+x^2\right )}{2+4 x+3 x^2+2 x^3+x^4} \, dx\\ &=\int \left (-\frac {1}{(1+x)^2}-\frac {1}{3 (1+x)}+\frac {4 (2+x)}{3 \left (2+x^2\right )}\right ) \, dx\\ &=\frac {1}{1+x}-\frac {1}{3} \log (1+x)+\frac {4}{3} \int \frac {2+x}{2+x^2} \, dx\\ &=\frac {1}{1+x}-\frac {1}{3} \log (1+x)+\frac {4}{3} \int \frac {x}{2+x^2} \, dx+\frac {8}{3} \int \frac {1}{2+x^2} \, dx\\ &=\frac {1}{1+x}+\frac {4}{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 = 41, normalized size = 1.00 \[ \frac {2}{3} \log \left (x^2+2\right )+\frac {1}{x+1}-\frac {1}{3} \log (x+1)+\frac {4}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.03, size = 41, normalized size = 1.00 \[ \frac {2}{3} \log \left (x^2+2\right )+\frac {1}{x+1}-\frac {1}{3} \log (x+1)+\frac {4}{3} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 44, normalized size = 1.07 \[ \frac {4 \, \sqrt {2} {\left (x + 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 2 \, {\left (x + 1\right )} \log \left (x^{2} + 2\right ) - {\left (x + 1\right )} \log \left (x + 1\right ) + 3}{3 \, {\left (x + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.98, size = 33, normalized size = 0.80 \[ \frac {4}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + \frac {1}{x + 1} + \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.04, size = 33, normalized size = 0.80
method | result | size |
default | \(\frac {1}{1+x}-\frac {\ln \left (1+x \right )}{3}+\frac {2 \ln \left (x^{2}+2\right )}{3}+\frac {4 \arctan \left (\frac {x \sqrt {2}}{2}\right ) \sqrt {2}}{3}\) | \(33\) |
risch | \(\frac {1}{1+x}-\frac {\ln \left (1+x \right )}{3}+\frac {2 \ln \left (x^{2}+2\right )}{3}+\frac {4 \arctan \left (\frac {x \sqrt {2}}{2}\right ) \sqrt {2}}{3}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.99, size = 32, normalized size = 0.78 \[ \frac {4}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + \frac {1}{x + 1} + \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.25, size = 49, normalized size = 1.20 \[ \frac {1}{x+1}-\frac {\ln \left (x+1\right )}{3}-\ln \left (x-\sqrt {2}\,1{}\mathrm {i}\right )\,\left (-\frac {2}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )+\ln \left (x+\sqrt {2}\,1{}\mathrm {i}\right )\,\left (\frac {2}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 39, normalized size = 0.95 \[ - \frac {\log {\left (x + 1 \right )}}{3} + \frac {2 \log {\left (x^{2} + 2 \right )}}{3} + \frac {4 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )}}{3} + \frac {1}{x + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________