3.110 \(\int \frac{6 x+4 x^2+x^3}{2+4 x+3 x^2+2 x^3+x^4} \, dx\)

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]

(1 + x)^(-1) + (4*Sqrt[2]*ArcTan[x/Sqrt[2]])/3 - Log[1 + x]/3 + (2*Log[2 + x^2])
/3

_______________________________________________________________________________________

Rubi [A]  time = 0.129699, 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 \[ \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]  Int[(6*x + 4*x^2 + x^3)/(2 + 4*x + 3*x^2 + 2*x^3 + x^4),x]

[Out]

(1 + x)^(-1) + (4*Sqrt[2]*ArcTan[x/Sqrt[2]])/3 - Log[1 + x]/3 + (2*Log[2 + x^2])
/3

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**3+4*x**2+6*x)/(x**4+2*x**3+3*x**2+4*x+2),x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 0.0342219, 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]  Integrate[(6*x + 4*x^2 + x^3)/(2 + 4*x + 3*x^2 + 2*x^3 + x^4),x]

[Out]

(1 + x)^(-1) + (4*Sqrt[2]*ArcTan[x/Sqrt[2]])/3 - Log[1 + x]/3 + (2*Log[2 + x^2])
/3

_______________________________________________________________________________________

Maple [A]  time = 0.012, size = 33, normalized size = 0.8 \[ \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 ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^3+4*x^2+6*x)/(x^4+2*x^3+3*x^2+4*x+2),x)

[Out]

1/(1+x)-1/3*ln(1+x)+2/3*ln(x^2+2)+4/3*arctan(1/2*x*2^(1/2))*2^(1/2)

_______________________________________________________________________________________

Maxima [A]  time = 1.52682, size = 43, normalized size = 1.05 \[ \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]  integrate((x^3 + 4*x^2 + 6*x)/(x^4 + 2*x^3 + 3*x^2 + 4*x + 2),x, algorithm="maxima")

[Out]

4/3*sqrt(2)*arctan(1/2*sqrt(2)*x) + 1/(x + 1) + 2/3*log(x^2 + 2) - 1/3*log(x + 1
)

_______________________________________________________________________________________

Fricas [A]  time = 0.21553, size = 59, normalized size = 1.44 \[ \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]  integrate((x^3 + 4*x^2 + 6*x)/(x^4 + 2*x^3 + 3*x^2 + 4*x + 2),x, algorithm="fricas")

[Out]

1/3*(4*sqrt(2)*(x + 1)*arctan(1/2*sqrt(2)*x) + 2*(x + 1)*log(x^2 + 2) - (x + 1)*
log(x + 1) + 3)/(x + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.184711, 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]  integrate((x**3+4*x**2+6*x)/(x**4+2*x**3+3*x**2+4*x+2),x)

[Out]

-log(x + 1)/3 + 2*log(x**2 + 2)/3 + 4*sqrt(2)*atan(sqrt(2)*x/2)/3 + 1/(x + 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.201937, size = 45, normalized size = 1.1 \[ \frac{4}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) + \frac{1}{x + 1} + \frac{2}{3} \,{\rm ln}\left (x^{2} + 2\right ) - \frac{1}{3} \,{\rm ln}\left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 + 4*x^2 + 6*x)/(x^4 + 2*x^3 + 3*x^2 + 4*x + 2),x, algorithm="giac")

[Out]

4/3*sqrt(2)*arctan(1/2*sqrt(2)*x) + 1/(x + 1) + 2/3*ln(x^2 + 2) - 1/3*ln(abs(x +
 1))