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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0870716, antiderivative size = 41, normalized size of antiderivative = 1., 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 1594
Rule 2075
Rule 635
Rule 203
Rule 260
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.0209546, size = 41, normalized size = 1. \[ \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]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 33, normalized size = 0.8 \begin{align*} \left ( 1+x \right ) ^{-1}-{\frac{\ln \left ( 1+x \right ) }{3}}+{\frac{2\,\ln \left ({x}^{2}+2 \right ) }{3}}+{\frac{4\,\sqrt{2}}{3}\arctan \left ({\frac{x\sqrt{2}}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42998, size = 43, normalized size = 1.05 \begin{align*} \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 ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.17671, size = 142, normalized size = 3.46 \begin{align*} \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 )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.138548, size = 39, normalized size = 0.95 \begin{align*} - \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05185, size = 45, normalized size = 1.1 \begin{align*} \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 ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]