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

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

[Out]

((19*I + 7*Sqrt[7])*ArcTan[(1 - I*Sqrt[7] + 8*x)/Sqrt[2*(35 + I*Sqrt[7])]])/Sqrt
[14*(35 + I*Sqrt[7])] - ((19*I - 7*Sqrt[7])*ArcTan[(1 + I*Sqrt[7] + 8*x)/Sqrt[2*
(35 - I*Sqrt[7])]])/Sqrt[14*(35 - I*Sqrt[7])] + ((7 + (5*I)*Sqrt[7])*Log[4 + (1
- I*Sqrt[7])*x + 4*x^2])/28 + ((7 - (5*I)*Sqrt[7])*Log[4 + (1 + I*Sqrt[7])*x + 4
*x^2])/28

_______________________________________________________________________________________

Rubi [A]  time = 0.560258, antiderivative size = 198, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.156 \[ \frac{1}{28} \left (7+5 i \sqrt{7}\right ) \log \left (4 x^2+\left (1-i \sqrt{7}\right ) x+4\right )+\frac{1}{28} \left (7-5 i \sqrt{7}\right ) \log \left (4 x^2+\left (1+i \sqrt{7}\right ) x+4\right )+\frac{\left (7 \sqrt{7}+19 i\right ) \tan ^{-1}\left (\frac{8 x-i \sqrt{7}+1}{\sqrt{2 \left (35+i \sqrt{7}\right )}}\right )}{\sqrt{14 \left (35+i \sqrt{7}\right )}}-\frac{\left (-7 \sqrt{7}+19 i\right ) \tan ^{-1}\left (\frac{8 x+i \sqrt{7}+1}{\sqrt{2 \left (35-i \sqrt{7}\right )}}\right )}{\sqrt{14 \left (35-i \sqrt{7}\right )}} \]

Antiderivative was successfully verified.

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

[Out]

((19*I + 7*Sqrt[7])*ArcTan[(1 - I*Sqrt[7] + 8*x)/Sqrt[2*(35 + I*Sqrt[7])]])/Sqrt
[14*(35 + I*Sqrt[7])] - ((19*I - 7*Sqrt[7])*ArcTan[(1 + I*Sqrt[7] + 8*x)/Sqrt[2*
(35 - I*Sqrt[7])]])/Sqrt[14*(35 - I*Sqrt[7])] + ((7 + (5*I)*Sqrt[7])*Log[4 + (1
- I*Sqrt[7])*x + 4*x^2])/28 + ((7 - (5*I)*Sqrt[7])*Log[4 + (1 + I*Sqrt[7])*x + 4
*x^2])/28

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 84.7509, size = 216, normalized size = 1.09 \[ \left (\frac{1}{4} + \frac{5 \sqrt{7} i}{28}\right ) \log{\left (4 x^{2} + x \left (1 - \sqrt{7} i\right ) + 4 \right )} + \left (\frac{1}{4} - \frac{5 \sqrt{7} i}{28}\right ) \log{\left (4 x^{2} + x \left (1 + \sqrt{7} i\right ) + 4 \right )} - \frac{\left (7 - \frac{19 \sqrt{7} i}{7}\right ) \operatorname{atan}{\left (\frac{8 x + 1 + \sqrt{7} i}{\sqrt{35 + 4 \sqrt{77}} - i \sqrt{-35 + 4 \sqrt{77}}} \right )}}{- \sqrt{35 + 4 \sqrt{77}} + i \sqrt{-35 + 4 \sqrt{77}}} + \frac{\left (7 + \frac{19 \sqrt{7} i}{7}\right ) \operatorname{atan}{\left (\frac{8 x + 1 - \sqrt{7} i}{\sqrt{35 + 4 \sqrt{77}} + i \sqrt{-35 + 4 \sqrt{77}}} \right )}}{\sqrt{35 + 4 \sqrt{77}} + i \sqrt{-35 + 4 \sqrt{77}}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

(1/4 + 5*sqrt(7)*I/28)*log(4*x**2 + x*(1 - sqrt(7)*I) + 4) + (1/4 - 5*sqrt(7)*I/
28)*log(4*x**2 + x*(1 + sqrt(7)*I) + 4) - (7 - 19*sqrt(7)*I/7)*atan((8*x + 1 + s
qrt(7)*I)/(sqrt(35 + 4*sqrt(77)) - I*sqrt(-35 + 4*sqrt(77))))/(-sqrt(35 + 4*sqrt
(77)) + I*sqrt(-35 + 4*sqrt(77))) + (7 + 19*sqrt(7)*I/7)*atan((8*x + 1 - sqrt(7)
*I)/(sqrt(35 + 4*sqrt(77)) + I*sqrt(-35 + 4*sqrt(77))))/(sqrt(35 + 4*sqrt(77)) +
 I*sqrt(-35 + 4*sqrt(77)))

_______________________________________________________________________________________

Mathematica [C]  time = 0.0216715, size = 90, normalized size = 0.45 \[ \text{RootSum}\left [2 \text{$\#$1}^4+\text{$\#$1}^3+5 \text{$\#$1}^2+\text{$\#$1}+2\&,\frac{2 \text{$\#$1}^3 \log (x-\text{$\#$1})+3 \text{$\#$1}^2 \log (x-\text{$\#$1})+\text{$\#$1} \log (x-\text{$\#$1})+5 \log (x-\text{$\#$1})}{8 \text{$\#$1}^3+3 \text{$\#$1}^2+10 \text{$\#$1}+1}\&\right ] \]

Antiderivative was successfully verified.

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

[Out]

RootSum[2 + #1 + 5*#1^2 + #1^3 + 2*#1^4 & , (5*Log[x - #1] + Log[x - #1]*#1 + 3*
Log[x - #1]*#1^2 + 2*Log[x - #1]*#1^3)/(1 + 10*#1 + 3*#1^2 + 8*#1^3) & ]

_______________________________________________________________________________________

Maple [C]  time = 0.007, size = 58, normalized size = 0.3 \[ \sum _{{\it \_R}={\it RootOf} \left ( 2\,{{\it \_Z}}^{4}+{{\it \_Z}}^{3}+5\,{{\it \_Z}}^{2}+{\it \_Z}+2 \right ) }{\frac{ \left ( 2\,{{\it \_R}}^{3}+3\,{{\it \_R}}^{2}+{\it \_R}+5 \right ) \ln \left ( x-{\it \_R} \right ) }{8\,{{\it \_R}}^{3}+3\,{{\it \_R}}^{2}+10\,{\it \_R}+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

sum((2*_R^3+3*_R^2+_R+5)/(8*_R^3+3*_R^2+10*_R+1)*ln(x-_R),_R=RootOf(2*_Z^4+_Z^3+
5*_Z^2+_Z+2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{2 \, x^{3} + 3 \, x^{2} + x + 5}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

integrate((2*x^3 + 3*x^2 + x + 5)/(2*x^4 + x^3 + 5*x^2 + x + 2), x)

_______________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

Exception raised: NotImplementedError

_______________________________________________________________________________________

Sympy [A]  time = 2.85058, size = 46, normalized size = 0.23 \[ \operatorname{RootSum}{\left (343 t^{4} - 343 t^{3} + 294 t^{2} - 336 t + 128, \left ( t \mapsto t \log{\left (- \frac{7203 t^{3}}{304} + \frac{2303 t^{2}}{304} - \frac{2177 t}{152} + x + \frac{250}{19} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

RootSum(343*_t**4 - 343*_t**3 + 294*_t**2 - 336*_t + 128, Lambda(_t, _t*log(-720
3*_t**3/304 + 2303*_t**2/304 - 2177*_t/152 + x + 250/19)))

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{2 \, x^{3} + 3 \, x^{2} + x + 5}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

integrate((2*x^3 + 3*x^2 + x + 5)/(2*x^4 + x^3 + 5*x^2 + x + 2), x)