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

Optimal. Leaf size=23 \[ \frac{1}{2} \log \left (x^2+4\right )-\frac{3}{2} \tan ^{-1}\left (\frac{x}{2}\right )+\tan ^{-1}(x) \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0478941, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208 \[ \frac{1}{2} \log \left (x^2+4\right )-\frac{3}{2} \tan ^{-1}\left (\frac{x}{2}\right )+\tan ^{-1}(x) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.10866, size = 19, normalized size = 0.83 \[ \frac{\log{\left (x^{2} + 4 \right )}}{2} - \frac{3 \operatorname{atan}{\left (\frac{x}{2} \right )}}{2} + \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0144226, size = 23, normalized size = 1. \[ \frac{1}{2} \log \left (x^2+4\right )-\frac{3}{2} \tan ^{-1}\left (\frac{x}{2}\right )+\tan ^{-1}(x) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 18, normalized size = 0.8 \[ -{\frac{3}{2}\arctan \left ({\frac{x}{2}} \right ) }+\arctan \left ( x \right ) +{\frac{\ln \left ({x}^{2}+4 \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.5113, size = 23, normalized size = 1. \[ -\frac{3}{2} \, \arctan \left (\frac{1}{2} \, x\right ) + \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.203852, size = 23, normalized size = 1. \[ -\frac{3}{2} \, \arctan \left (\frac{1}{2} \, x\right ) + \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.249894, size = 19, normalized size = 0.83 \[ \frac{\log{\left (x^{2} + 4 \right )}}{2} - \frac{3 \operatorname{atan}{\left (\frac{x}{2} \right )}}{2} + \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.211046, size = 23, normalized size = 1. \[ -\frac{3}{2} \, \arctan \left (\frac{1}{2} \, x\right ) + \arctan \left (x\right ) + \frac{1}{2} \,{\rm ln}\left (x^{2} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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