3.314 \(\int \frac{1+x^2+x^3}{2 x^2+x^3+x^4} \, dx\)

Optimal. Leaf size=46 \[ \frac{5}{8} \log \left (x^2+x+2\right )-\frac{1}{2 x}-\frac{\log (x)}{4}+\frac{\tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{4 \sqrt{7}} \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0999931, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261 \[ \frac{5}{8} \log \left (x^2+x+2\right )-\frac{1}{2 x}-\frac{\log (x)}{4}+\frac{\tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{4 \sqrt{7}} \]

Antiderivative was successfully verified.

[In]  Int[(1 + x^2 + x^3)/(2*x^2 + x^3 + x^4),x]

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 21.5263, size = 42, normalized size = 0.91 \[ - \frac{\log{\left (x \right )}}{4} + \frac{5 \log{\left (x^{2} + x + 2 \right )}}{8} + \frac{\sqrt{7} \operatorname{atan}{\left (\sqrt{7} \left (\frac{2 x}{7} + \frac{1}{7}\right ) \right )}}{28} - \frac{1}{2 x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-log(x)/4 + 5*log(x**2 + x + 2)/8 + sqrt(7)*atan(sqrt(7)*(2*x/7 + 1/7))/28 - 1/(
2*x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0459745, size = 46, normalized size = 1. \[ \frac{5}{8} \log \left (x^2+x+2\right )-\frac{1}{2 x}-\frac{\log (x)}{4}+\frac{\tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{4 \sqrt{7}} \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + x^2 + x^3)/(2*x^2 + x^3 + x^4),x]

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 36, normalized size = 0.8 \[ -{\frac{1}{2\,x}}-{\frac{\ln \left ( x \right ) }{4}}+{\frac{5\,\ln \left ({x}^{2}+x+2 \right ) }{8}}+{\frac{\sqrt{7}}{28}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{7}}{7}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-1/2/x-1/4*ln(x)+5/8*ln(x^2+x+2)+1/28*arctan(1/7*(1+2*x)*7^(1/2))*7^(1/2)

_______________________________________________________________________________________

Maxima [A]  time = 0.903441, size = 47, normalized size = 1.02 \[ \frac{1}{28} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right ) - \frac{1}{2 \, x} + \frac{5}{8} \, \log \left (x^{2} + x + 2\right ) - \frac{1}{4} \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/28*sqrt(7)*arctan(1/7*sqrt(7)*(2*x + 1)) - 1/2/x + 5/8*log(x^2 + x + 2) - 1/4*
log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.255271, size = 66, normalized size = 1.43 \[ \frac{\sqrt{7}{\left (5 \, \sqrt{7} x \log \left (x^{2} + x + 2\right ) - 2 \, \sqrt{7} x \log \left (x\right ) + 2 \, x \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right ) - 4 \, \sqrt{7}\right )}}{56 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/56*sqrt(7)*(5*sqrt(7)*x*log(x^2 + x + 2) - 2*sqrt(7)*x*log(x) + 2*x*arctan(1/7
*sqrt(7)*(2*x + 1)) - 4*sqrt(7))/x

_______________________________________________________________________________________

Sympy [A]  time = 0.378752, size = 46, normalized size = 1. \[ - \frac{\log{\left (x \right )}}{4} + \frac{5 \log{\left (x^{2} + x + 2 \right )}}{8} + \frac{\sqrt{7} \operatorname{atan}{\left (\frac{2 \sqrt{7} x}{7} + \frac{\sqrt{7}}{7} \right )}}{28} - \frac{1}{2 x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**3+x**2+1)/(x**4+x**3+2*x**2),x)

[Out]

-log(x)/4 + 5*log(x**2 + x + 2)/8 + sqrt(7)*atan(2*sqrt(7)*x/7 + sqrt(7)/7)/28 -
 1/(2*x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.262228, size = 49, normalized size = 1.07 \[ \frac{1}{28} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right ) - \frac{1}{2 \, x} + \frac{5}{8} \,{\rm ln}\left (x^{2} + x + 2\right ) - \frac{1}{4} \,{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/28*sqrt(7)*arctan(1/7*sqrt(7)*(2*x + 1)) - 1/2/x + 5/8*ln(x^2 + x + 2) - 1/4*l
n(abs(x))