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

Optimal. Leaf size=317 \[ -\frac{35+9 i \sqrt{7}}{56 x^2}-\frac{35-9 i \sqrt{7}}{56 x^2}+\frac{1}{32} \left (35-9 i \sqrt{7}\right ) \log \left (4 i x^2+\left (-\sqrt{7}+i\right ) x+4 i\right )+\frac{1}{32} \left (35+9 i \sqrt{7}\right ) \log \left (4 i x^2+\left (\sqrt{7}+i\right ) x+4 i\right )+\frac{3 \left (7+11 i \sqrt{7}\right )}{56 x}+\frac{3 \left (7-11 i \sqrt{7}\right )}{56 x}-\frac{1}{16} \left (35+9 i \sqrt{7}\right ) \log (x)-\frac{1}{16} \left (35-9 i \sqrt{7}\right ) \log (x)+\frac{\left (355-73 i \sqrt{7}\right ) \tanh ^{-1}\left (\frac{8 i x-\sqrt{7}+i}{\sqrt{2 \left (35-i \sqrt{7}\right )}}\right )}{8 \sqrt{14 \left (35-i \sqrt{7}\right )}}-\frac{\left (355+73 i \sqrt{7}\right ) \tanh ^{-1}\left (\frac{8 i x+\sqrt{7}+i}{\sqrt{2 \left (35+i \sqrt{7}\right )}}\right )}{8 \sqrt{14 \left (35+i \sqrt{7}\right )}} \]

[Out]

-(35 - (9*I)*Sqrt[7])/(56*x^2) - (35 + (9*I)*Sqrt[7])/(56*x^2) + (3*(7 - (11*I)*
Sqrt[7]))/(56*x) + (3*(7 + (11*I)*Sqrt[7]))/(56*x) + ((355 - (73*I)*Sqrt[7])*Arc
Tanh[(I - Sqrt[7] + (8*I)*x)/Sqrt[2*(35 - I*Sqrt[7])]])/(8*Sqrt[14*(35 - I*Sqrt[
7])]) - ((355 + (73*I)*Sqrt[7])*ArcTanh[(I + Sqrt[7] + (8*I)*x)/Sqrt[2*(35 + I*S
qrt[7])]])/(8*Sqrt[14*(35 + I*Sqrt[7])]) - ((35 - (9*I)*Sqrt[7])*Log[x])/16 - ((
35 + (9*I)*Sqrt[7])*Log[x])/16 + ((35 - (9*I)*Sqrt[7])*Log[4*I + (I - Sqrt[7])*x
 + (4*I)*x^2])/32 + ((35 + (9*I)*Sqrt[7])*Log[4*I + (I + Sqrt[7])*x + (4*I)*x^2]
)/32

_______________________________________________________________________________________

Rubi [A]  time = 1.46743, antiderivative size = 317, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 6, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.171 \[ -\frac{35+9 i \sqrt{7}}{56 x^2}-\frac{35-9 i \sqrt{7}}{56 x^2}+\frac{1}{32} \left (35-9 i \sqrt{7}\right ) \log \left (4 i x^2+\left (-\sqrt{7}+i\right ) x+4 i\right )+\frac{1}{32} \left (35+9 i \sqrt{7}\right ) \log \left (4 i x^2+\left (\sqrt{7}+i\right ) x+4 i\right )+\frac{3 \left (7+11 i \sqrt{7}\right )}{56 x}+\frac{3 \left (7-11 i \sqrt{7}\right )}{56 x}-\frac{1}{16} \left (35+9 i \sqrt{7}\right ) \log (x)-\frac{1}{16} \left (35-9 i \sqrt{7}\right ) \log (x)+\frac{\left (355-73 i \sqrt{7}\right ) \tanh ^{-1}\left (\frac{8 i x-\sqrt{7}+i}{\sqrt{2 \left (35-i \sqrt{7}\right )}}\right )}{8 \sqrt{14 \left (35-i \sqrt{7}\right )}}-\frac{\left (355+73 i \sqrt{7}\right ) \tanh ^{-1}\left (\frac{8 i x+\sqrt{7}+i}{\sqrt{2 \left (35+i \sqrt{7}\right )}}\right )}{8 \sqrt{14 \left (35+i \sqrt{7}\right )}} \]

Antiderivative was successfully verified.

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

[Out]

-(35 - (9*I)*Sqrt[7])/(56*x^2) - (35 + (9*I)*Sqrt[7])/(56*x^2) + (3*(7 - (11*I)*
Sqrt[7]))/(56*x) + (3*(7 + (11*I)*Sqrt[7]))/(56*x) + ((355 - (73*I)*Sqrt[7])*Arc
Tanh[(I - Sqrt[7] + (8*I)*x)/Sqrt[2*(35 - I*Sqrt[7])]])/(8*Sqrt[14*(35 - I*Sqrt[
7])]) - ((355 + (73*I)*Sqrt[7])*ArcTanh[(I + Sqrt[7] + (8*I)*x)/Sqrt[2*(35 + I*S
qrt[7])]])/(8*Sqrt[14*(35 + I*Sqrt[7])]) - ((35 - (9*I)*Sqrt[7])*Log[x])/16 - ((
35 + (9*I)*Sqrt[7])*Log[x])/16 + ((35 - (9*I)*Sqrt[7])*Log[4*I + (I - Sqrt[7])*x
 + (4*I)*x^2])/32 + ((35 + (9*I)*Sqrt[7])*Log[4*I + (I + Sqrt[7])*x + (4*I)*x^2]
)/32

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 137.984, size = 318, normalized size = 1. \[ - \left (\frac{35}{16} + \frac{9 \sqrt{7} i}{16}\right ) \log{\left (x \right )} - \left (\frac{35}{16} - \frac{9 \sqrt{7} i}{16}\right ) \log{\left (x \right )} + \left (\frac{35}{32} + \frac{9 \sqrt{7} i}{32}\right ) \log{\left (4 x^{2} + x \left (1 - \sqrt{7} i\right ) + 4 \right )} + \left (\frac{35}{32} - \frac{9 \sqrt{7} i}{32}\right ) \log{\left (4 x^{2} + x \left (1 + \sqrt{7} i\right ) + 4 \right )} - \frac{\left (511 + 355 \sqrt{7} i\right ) \operatorname{atan}{\left (\frac{8 x + 1 + \sqrt{7} i}{\sqrt{35 + 4 \sqrt{77}} - i \sqrt{-35 + 4 \sqrt{77}}} \right )}}{56 \left (- \sqrt{35 + 4 \sqrt{77}} + i \sqrt{-35 + 4 \sqrt{77}}\right )} + \frac{\left (\frac{73}{8} - \frac{355 \sqrt{7} i}{56}\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{\frac{3}{8} - \frac{33 \sqrt{7} i}{56}}{x} + \frac{\frac{3}{8} + \frac{33 \sqrt{7} i}{56}}{x} - \frac{\frac{5}{8} + \frac{9 \sqrt{7} i}{56}}{x^{2}} - \frac{\frac{5}{8} - \frac{9 \sqrt{7} i}{56}}{x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-(35/16 + 9*sqrt(7)*I/16)*log(x) - (35/16 - 9*sqrt(7)*I/16)*log(x) + (35/32 + 9*
sqrt(7)*I/32)*log(4*x**2 + x*(1 - sqrt(7)*I) + 4) + (35/32 - 9*sqrt(7)*I/32)*log
(4*x**2 + x*(1 + sqrt(7)*I) + 4) - (511 + 355*sqrt(7)*I)*atan((8*x + 1 + sqrt(7)
*I)/(sqrt(35 + 4*sqrt(77)) - I*sqrt(-35 + 4*sqrt(77))))/(56*(-sqrt(35 + 4*sqrt(7
7)) + I*sqrt(-35 + 4*sqrt(77)))) + (73/8 - 355*sqrt(7)*I/56)*atan((8*x + 1 - sqr
t(7)*I)/(sqrt(35 + 4*sqrt(77)) + I*sqrt(-35 + 4*sqrt(77))))/(sqrt(35 + 4*sqrt(77
)) + I*sqrt(-35 + 4*sqrt(77))) + (3/8 - 33*sqrt(7)*I/56)/x + (3/8 + 33*sqrt(7)*I
/56)/x - (5/8 + 9*sqrt(7)*I/56)/x**2 - (5/8 - 9*sqrt(7)*I/56)/x**2

_______________________________________________________________________________________

Mathematica [C]  time = 0.0300998, size = 116, normalized size = 0.37 \[ \frac{1}{8} \text{RootSum}\left [2 \text{$\#$1}^4+\text{$\#$1}^3+5 \text{$\#$1}^2+\text{$\#$1}+2\&,\frac{70 \text{$\#$1}^3 \log (x-\text{$\#$1})+47 \text{$\#$1}^2 \log (x-\text{$\#$1})+141 \text{$\#$1} \log (x-\text{$\#$1})+61 \log (x-\text{$\#$1})}{8 \text{$\#$1}^3+3 \text{$\#$1}^2+10 \text{$\#$1}+1}\&\right ]-\frac{5}{4 x^2}+\frac{3}{4 x}-\frac{35 \log (x)}{8} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [C]  time = 0.015, size = 77, normalized size = 0.2 \[ -{\frac{5}{4\,{x}^{2}}}+{\frac{3}{4\,x}}-{\frac{35\,\ln \left ( x \right ) }{8}}+{\frac{1}{8}\sum _{{\it \_R}={\it RootOf} \left ( 2\,{{\it \_Z}}^{4}+{{\it \_Z}}^{3}+5\,{{\it \_Z}}^{2}+{\it \_Z}+2 \right ) }{\frac{ \left ( 70\,{{\it \_R}}^{3}+47\,{{\it \_R}}^{2}+141\,{\it \_R}+61 \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)/x^3/(2*x^4+x^3+5*x^2+x+2),x)

[Out]

-5/4/x^2+3/4/x-35/8*ln(x)+1/8*sum((70*_R^3+47*_R^2+141*_R+61)/(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. \[ \frac{3 \, x - 5}{4 \, x^{2}} + \frac{1}{8} \, \int \frac{70 \, x^{3} + 47 \, x^{2} + 141 \, x + 61}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2}\,{d x} - \frac{35}{8} \, \log \left (x\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^3),x, algorithm="maxima")

[Out]

1/4*(3*x - 5)/x^2 + 1/8*integrate((70*x^3 + 47*x^2 + 141*x + 61)/(2*x^4 + x^3 +
5*x^2 + x + 2), x) - 35/8*log(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^3),x, algorithm="fricas")

[Out]

Exception raised: NotImplementedError

_______________________________________________________________________________________

Sympy [A]  time = 6.67984, size = 70, normalized size = 0.22 \[ - \frac{35 \log{\left (x \right )}}{8} + \operatorname{RootSum}{\left (2744 t^{4} - 12005 t^{3} + 18424 t^{2} - 3136 t + 1024, \left ( t \mapsto t \log{\left (- \frac{20101387287723 t^{4}}{91907904361586} + \frac{944515214496 t^{3}}{45953952180793} + \frac{16572327093911939 t^{2}}{5882105879141504} - \frac{4564471749800865 t}{735263234892688} + x + \frac{70084064010625}{91907904361586} \right )} \right )\right )} + \frac{3 x - 5}{4 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-35*log(x)/8 + RootSum(2744*_t**4 - 12005*_t**3 + 18424*_t**2 - 3136*_t + 1024,
Lambda(_t, _t*log(-20101387287723*_t**4/91907904361586 + 944515214496*_t**3/4595
3952180793 + 16572327093911939*_t**2/5882105879141504 - 4564471749800865*_t/7352
63234892688 + x + 70084064010625/91907904361586))) + (3*x - 5)/(4*x**2)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{2 \, x^{3} + 3 \, x^{2} + x + 5}{{\left (2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2\right )} x^{3}}\,{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^3),x, algorithm="giac")

[Out]

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