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

Optimal. Leaf size=230 \[ \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 {1}{14} \left (7+5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x-\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]

1/14*x*(7-5*I*7^(1/2))+1/28*ln(4+4*x^2+x*(1+I*7^(1/2)))*(7-5*I*7^(1/2))+1/14*x*(7+5*I*7^(1/2))+1/28*ln(4+4*x^2
+x*(1-I*7^(1/2)))*(7+5*I*7^(1/2))+arctan((1+8*x+I*7^(1/2))/(70-2*I*7^(1/2))^(1/2))*(19*I-7*7^(1/2))/(490-14*I*
7^(1/2))^(1/2)-arctan((1+8*x-I*7^(1/2))/(70+2*I*7^(1/2))^(1/2))*(19*I+7*7^(1/2))/(490+14*I*7^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.36, antiderivative size = 230, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2087, 773, 634, 618, 204, 628} \[ \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 {1}{14} \left (7+5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x-\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[(x*(5 + x + 3*x^2 + 2*x^3))/(2 + x + 5*x^2 + x^3 + 2*x^4),x]

[Out]

((7 - (5*I)*Sqrt[7])*x)/14 + ((7 + (5*I)*Sqrt[7])*x)/14 - ((19*I + 7*Sqrt[7])*ArcTan[(1 - I*Sqrt[7] + 8*x)/Sqr
t[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*(3
5 - 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

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 773

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/
c, x] + Dist[1/c, Int[(c*d*f - a*e*g + (c*e*f + c*d*g - b*e*g)*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c,
 d, e, f, g}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2087

Int[((P3_)*(x_)^(m_.))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2 + (d_.)*(x_)^3 + (e_.)*(x_)^4), x_Symbol] :> With[{q
= Sqrt[8*a^2 + b^2 - 4*a*c], A = Coeff[P3, x, 0], B = Coeff[P3, x, 1], C = Coeff[P3, x, 2], D = Coeff[P3, x, 3
]}, Dist[1/q, Int[(x^m*(b*A - 2*a*B + 2*a*D + A*q + (2*a*A - 2*a*C + b*D + D*q)*x))/(2*a + (b + q)*x + 2*a*x^2
), x], x] - Dist[1/q, Int[(x^m*(b*A - 2*a*B + 2*a*D - A*q + (2*a*A - 2*a*C + b*D - D*q)*x))/(2*a + (b - q)*x +
 2*a*x^2), x], x]] /; FreeQ[{a, b, c, m}, x] && PolyQ[P3, x, 3] && EqQ[a, e] && EqQ[b, d]

Rubi steps

\begin {align*} \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx &=\frac {i \int \frac {x \left (9-5 i \sqrt {7}+\left (10-2 i \sqrt {7}\right ) x\right )}{4+\left (1-i \sqrt {7}\right ) x+4 x^2} \, dx}{\sqrt {7}}-\frac {i \int \frac {x \left (9+5 i \sqrt {7}+\left (10+2 i \sqrt {7}\right ) x\right )}{4+\left (1+i \sqrt {7}\right ) x+4 x^2} \, dx}{\sqrt {7}}\\ &=\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7+5 i \sqrt {7}\right ) x+\frac {i \int \frac {-4 \left (10-2 i \sqrt {7}\right )+\left (-\left (1-i \sqrt {7}\right ) \left (10-2 i \sqrt {7}\right )+4 \left (9-5 i \sqrt {7}\right )\right ) x}{4+\left (1-i \sqrt {7}\right ) x+4 x^2} \, dx}{4 \sqrt {7}}-\frac {i \int \frac {-4 \left (10+2 i \sqrt {7}\right )+\left (-\left (1+i \sqrt {7}\right ) \left (10+2 i \sqrt {7}\right )+4 \left (9+5 i \sqrt {7}\right )\right ) x}{4+\left (1+i \sqrt {7}\right ) x+4 x^2} \, dx}{4 \sqrt {7}}\\ &=\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7+5 i \sqrt {7}\right ) x-\frac {1}{28} \left (-7+5 i \sqrt {7}\right ) \int \frac {1+i \sqrt {7}+8 x}{4+\left (1+i \sqrt {7}\right ) x+4 x^2} \, dx+\frac {1}{28} \left (7+5 i \sqrt {7}\right ) \int \frac {1-i \sqrt {7}+8 x}{4+\left (1-i \sqrt {7}\right ) x+4 x^2} \, dx+\frac {1}{14} \left (-49+19 i \sqrt {7}\right ) \int \frac {1}{4+\left (1+i \sqrt {7}\right ) x+4 x^2} \, dx-\frac {1}{14} \left (49+19 i \sqrt {7}\right ) \int \frac {1}{4+\left (1-i \sqrt {7}\right ) x+4 x^2} \, dx\\ &=\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7+5 i \sqrt {7}\right ) x+\frac {1}{28} \left (7+5 i \sqrt {7}\right ) \log \left (4+\left (1-i \sqrt {7}\right ) x+4 x^2\right )+\frac {1}{28} \left (7-5 i \sqrt {7}\right ) \log \left (4+\left (1+i \sqrt {7}\right ) x+4 x^2\right )+\frac {1}{7} \left (49-19 i \sqrt {7}\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (35-i \sqrt {7}\right )-x^2} \, dx,x,1+i \sqrt {7}+8 x\right )+\frac {1}{7} \left (49+19 i \sqrt {7}\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (35+i \sqrt {7}\right )-x^2} \, dx,x,1-i \sqrt {7}+8 x\right )\\ &=\frac {1}{14} \left (7-5 i \sqrt {7}\right ) x+\frac {1}{14} \left (7+5 i \sqrt {7}\right ) x-\frac {\left (19 i+7 \sqrt {7}\right ) \tan ^{-1}\left (\frac {1-i \sqrt {7}+8 x}{\sqrt {2 \left (35+i \sqrt {7}\right )}}\right )}{\sqrt {14 \left (35+i \sqrt {7}\right )}}+\frac {\left (19 i-7 \sqrt {7}\right ) \tan ^{-1}\left (\frac {1+i \sqrt {7}+8 x}{\sqrt {2 \left (35-i \sqrt {7}\right )}}\right )}{\sqrt {14 \left (35-i \sqrt {7}\right )}}+\frac {1}{28} \left (7+5 i \sqrt {7}\right ) \log \left (4+\left (1-i \sqrt {7}\right ) x+4 x^2\right )+\frac {1}{28} \left (7-5 i \sqrt {7}\right ) \log \left (4+\left (1+i \sqrt {7}\right ) x+4 x^2\right )\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 3.07, size = 1190, normalized size = 5.17 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/28*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7)*log(49/4*(55*I*sqrt(7) + 154*sqrt(53/98*I*sqrt(7)
- 1/14) + 147)*(5/28*I*sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 3773*(-5/28*I*sqrt(7) - 1/2*sqrt
(53/98*I*sqrt(7) - 1/14) + 1/4)^3 + 3773*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 + 11/16*
(196*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 + 35*I*sqrt(7) + 98*sqrt(53/98*I*sqrt(7) - 1
/14) + 15)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) + 304*x + 1155/2*I*sqrt(7) + 1617*sqrt(53/98*
I*sqrt(7) - 1/14) + 1903/2) + 1/28*(2*sqrt(7)*sqrt(-21*(5/28*I*sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1
/4)^2 - 21*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 1/56*(5*I*sqrt(7) + 14*sqrt(53/98*I*
sqrt(7) - 1/14) + 21)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) - 5/2*I*sqrt(7) - 7*sqrt(53/98*I*s
qrt(7) - 1/14) - 27/2) + 7*sqrt(53/98*I*sqrt(7) - 1/14) + 7*sqrt(-53/98*I*sqrt(7) - 1/14) + 7)*log(-49/4*(55*I
*sqrt(7) + 154*sqrt(53/98*I*sqrt(7) - 1/14) + 147)*(5/28*I*sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^
2 - 2744*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 11/16*(196*(-5/28*I*sqrt(7) - 1/2*sqrt
(53/98*I*sqrt(7) - 1/14) + 1/4)^2 + 35*I*sqrt(7) + 98*sqrt(53/98*I*sqrt(7) - 1/14) + 15)*(-5*I*sqrt(7) + 14*sq
rt(-53/98*I*sqrt(7) - 1/14) - 7) + 1/16*sqrt(-21*(5/28*I*sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^2
- 21*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 1/56*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7
) - 1/14) + 21)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) - 5/2*I*sqrt(7) - 7*sqrt(53/98*I*sqrt(7)
 - 1/14) - 27/2)*((11*sqrt(7)*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) - 7) + 224*sqrt(7))*(-5*I*sqrt(7)
 + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) + 224*sqrt(7)*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) - 7) + 3
456*sqrt(7)) + 608*x - 220*I*sqrt(7) - 616*sqrt(53/98*I*sqrt(7) - 1/14) + 636) - 1/28*(2*sqrt(7)*sqrt(-21*(5/2
8*I*sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 21*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/
14) + 1/4)^2 - 1/56*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) + 21)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt
(7) - 1/14) - 7) - 5/2*I*sqrt(7) - 7*sqrt(53/98*I*sqrt(7) - 1/14) - 27/2) - 7*sqrt(53/98*I*sqrt(7) - 1/14) - 7
*sqrt(-53/98*I*sqrt(7) - 1/14) - 7)*log(-49/4*(55*I*sqrt(7) + 154*sqrt(53/98*I*sqrt(7) - 1/14) + 147)*(5/28*I*
sqrt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 2744*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14
) + 1/4)^2 - 11/16*(196*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 + 35*I*sqrt(7) + 98*sqrt(
53/98*I*sqrt(7) - 1/14) + 15)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) - 1/16*sqrt(-21*(5/28*I*sq
rt(7) - 1/2*sqrt(-53/98*I*sqrt(7) - 1/14) + 1/4)^2 - 21*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) +
1/4)^2 - 1/56*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) + 21)*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) -
1/14) - 7) - 5/2*I*sqrt(7) - 7*sqrt(53/98*I*sqrt(7) - 1/14) - 27/2)*((11*sqrt(7)*(5*I*sqrt(7) + 14*sqrt(53/98*
I*sqrt(7) - 1/14) - 7) + 224*sqrt(7))*(-5*I*sqrt(7) + 14*sqrt(-53/98*I*sqrt(7) - 1/14) - 7) + 224*sqrt(7)*(5*I
*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) - 7) + 3456*sqrt(7)) + 608*x - 220*I*sqrt(7) - 616*sqrt(53/98*I*sqr
t(7) - 1/14) + 636) - 1/28*(5*I*sqrt(7) + 14*sqrt(53/98*I*sqrt(7) - 1/14) - 7)*log(3773*(-5/28*I*sqrt(7) - 1/2
*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^3 - 1029*(-5/28*I*sqrt(7) - 1/2*sqrt(53/98*I*sqrt(7) - 1/14) + 1/4)^2 + 3
04*x - 715/2*I*sqrt(7) - 1001*sqrt(53/98*I*sqrt(7) - 1/14) - 2871/2) + x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (2 \, x^{3} + 3 \, x^{2} + x + 5\right )} x}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(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)*x/(2*x^4 + x^3 + 5*x^2 + x + 2), x)

________________________________________________________________________________________

maple [C]  time = 0.01, size = 62, normalized size = 0.27 \[ x +\frac {2 \left (\RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )^{3}-2 \RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )^{2}+2 \RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )-1\right ) \ln \left (-\RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )+x \right )}{8 \RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )^{3}+3 \RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )^{2}+10 \RootOf \left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ x + 2 \, \int \frac {x^{3} - 2 \, x^{2} + 2 \, x - 1}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 183, normalized size = 0.80 \[ x+\left (\sum _{k=1}^4\ln \left (\frac {115\,\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )}{8}+15\,x-\frac {\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )\,x\,137}{8}+\frac {{\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )}^2\,x\,133}{8}-\frac {{\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )}^3\,x\,147}{4}-\frac {189\,{\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )}^2}{16}+\frac {49\,{\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )}^3}{16}-4\right )\,\mathrm {root}\left (z^4-z^3+\frac {6\,z^2}{7}-\frac {48\,z}{49}+\frac {128}{343},z,k\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + symsum(log((115*root(z^4 - z^3 + (6*z^2)/7 - (48*z)/49 + 128/343, z, k))/8 + 15*x - (137*root(z^4 - z^3 +
(6*z^2)/7 - (48*z)/49 + 128/343, z, k)*x)/8 + (133*root(z^4 - z^3 + (6*z^2)/7 - (48*z)/49 + 128/343, z, k)^2*x
)/8 - (147*root(z^4 - z^3 + (6*z^2)/7 - (48*z)/49 + 128/343, z, k)^3*x)/4 - (189*root(z^4 - z^3 + (6*z^2)/7 -
(48*z)/49 + 128/343, z, k)^2)/16 + (49*root(z^4 - z^3 + (6*z^2)/7 - (48*z)/49 + 128/343, z, k)^3)/16 - 4)*root
(z^4 - z^3 + (6*z^2)/7 - (48*z)/49 + 128/343, z, k), k, 1, 4)

________________________________________________________________________________________

sympy [A]  time = 0.95, size = 48, normalized size = 0.21 \[ x + \operatorname {RootSum} {\left (343 t^{4} - 343 t^{3} + 294 t^{2} - 336 t + 128, \left (t \mapsto t \log {\left (\frac {3773 t^{3}}{304} - \frac {1029 t^{2}}{304} + \frac {1001 t}{152} + x - \frac {121}{19} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + RootSum(343*_t**4 - 343*_t**3 + 294*_t**2 - 336*_t + 128, Lambda(_t, _t*log(3773*_t**3/304 - 1029*_t**2/30
4 + 1001*_t/152 + x - 121/19)))

________________________________________________________________________________________