3.376 \(\int \frac{15-5 x+x^2+x^3}{\left (5+x^2\right ) \left (3+2 x+x^2\right )} \, dx\)

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

[Out]

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

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 47.8555, size = 48, normalized size = 1.04 \[ \frac{\log{\left (x^{2} + 2 x + 3 \right )}}{2} + \frac{5 \sqrt{2} \operatorname{atan}{\left (\sqrt{2} \left (\frac{x}{2} + \frac{1}{2}\right ) \right )}}{2} - \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} x}{5} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(x**2 + 2*x + 3)/2 + 5*sqrt(2)*atan(sqrt(2)*(x/2 + 1/2))/2 - sqrt(5)*atan(sqr
t(5)*x/5)

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.001, size = 41, normalized size = 0.9 \[{\frac{\ln \left ({x}^{2}+2\,x+3 \right ) }{2}}+{\frac{5\,\sqrt{2}}{2}\arctan \left ({\frac{ \left ( 2+2\,x \right ) \sqrt{2}}{4}} \right ) }-\arctan \left ({\frac{x\sqrt{5}}{5}} \right ) \sqrt{5} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.882939, size = 51, normalized size = 1.11 \[ \frac{5}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right ) - \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) + \frac{1}{2} \, \log \left (x^{2} + 2 \, x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

5/2*sqrt(2)*arctan(1/2*sqrt(2)*(x + 1)) - sqrt(5)*arctan(1/5*sqrt(5)*x) + 1/2*lo
g(x^2 + 2*x + 3)

_______________________________________________________________________________________

Fricas [A]  time = 0.259253, size = 62, normalized size = 1.35 \[ -\frac{1}{4} \, \sqrt{2}{\left (2 \, \sqrt{5} \sqrt{2} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) - \sqrt{2} \log \left (x^{2} + 2 \, x + 3\right ) - 10 \, \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.607985, size = 51, normalized size = 1.11 \[ \frac{\log{\left (x^{2} + 2 x + 3 \right )}}{2} - \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} x}{5} \right )} + \frac{5 \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} + \frac{\sqrt{2}}{2} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.260258, size = 51, normalized size = 1.11 \[ \frac{5}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right ) - \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) + \frac{1}{2} \,{\rm ln}\left (x^{2} + 2 \, x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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