\(\int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx\) [16]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [F]
Giac [F(-2)]
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 30, antiderivative size = 194 \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=\sqrt {78+\frac {169}{9 \sqrt [3]{3}}+81 \sqrt [3]{3}} \arctan \left (\frac {1}{3} \sqrt {3+4 \sqrt [3]{3}+4\ 3^{2/3}}-\sqrt {4+\frac {28}{3\ 3^{2/3}}+\frac {20}{3 \sqrt [3]{3}}} x\right )-10 \log (x)+\left (\frac {13}{3\ 3^{2/3}}-3\ 3^{2/3}\right ) \log \left (\frac {1}{2} \left (1+\sqrt [3]{3}+3^{2/3}\right )+x\right )+\frac {1}{6} \left (-\frac {13}{3^{2/3}}+9\ 3^{2/3}\right ) \log \left (\frac {1}{2} \left (-1+\sqrt [3]{3}\right )+\frac {1}{2} \left (2-\sqrt [3]{3}-3^{2/3}\right ) x+x^2\right )+\frac {10}{3} \log \left (1-3 x+3 x^2+2 x^3\right ) \] Output:

-1/9*(6318+507*3^(2/3)+6561*3^(1/3))^(1/2)*arctan(-1/3*(3+4*3^(1/3)+4*3^(2 
/3))^(1/2)+2/3*(9+7*3^(1/3)+5*3^(2/3))^(1/2)*x)-10*ln(x)+(13/9*3^(1/3)-3*3 
^(2/3))*ln(1/2+1/2*3^(1/3)+1/2*3^(2/3)+x)+1/6*(-13/3*3^(1/3)+9*3^(2/3))*ln 
(-1/2+1/2*3^(1/3)+1/2*(2-3^(1/3)-3^(2/3))*x+x^2)+10/3*ln(2*x^3+3*x^2-3*x+1 
)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.02 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.41 \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=-10 \log (x)+\frac {1}{3} \text {RootSum}\left [1-3 \text {$\#$1}+3 \text {$\#$1}^2+2 \text {$\#$1}^3\&,\frac {-37 \log (x-\text {$\#$1})+34 \log (x-\text {$\#$1}) \text {$\#$1}+20 \log (x-\text {$\#$1}) \text {$\#$1}^2}{-1+2 \text {$\#$1}+2 \text {$\#$1}^2}\&\right ] \] Input:

Integrate[(-10 - 7*x + 4*x^2)/(x - 3*x^2 + 3*x^3 + 2*x^4),x]
 

Output:

-10*Log[x] + RootSum[1 - 3*#1 + 3*#1^2 + 2*#1^3 & , (-37*Log[x - #1] + 34* 
Log[x - #1]*#1 + 20*Log[x - #1]*#1^2)/(-1 + 2*#1 + 2*#1^2) & ]/3
 

Rubi [A] (verified)

Time = 0.83 (sec) , antiderivative size = 238, normalized size of antiderivative = 1.23, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2026, 7293, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {4 x^2-7 x-10}{2 x^4+3 x^3-3 x^2+x} \, dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {4 x^2-7 x-10}{x \left (2 x^3+3 x^2-3 x+1\right )}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {20 x^2+34 x-37}{2 x^3+3 x^2-3 x+1}-\frac {10}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \left (13+27 \sqrt [3]{3}\right ) \arctan \left (\frac {4 x-3^{2/3}-\sqrt [3]{3}+2}{\sqrt {3 \left (-6+3 \sqrt [3]{3}+3^{2/3}\right )}}\right )}{\sqrt [6]{3} \sqrt {-6+3 \sqrt [3]{3}+3^{2/3}} \left (3+3 \sqrt [3]{3}+3^{2/3}\right )}+\frac {\left (34+7 \sqrt [3]{3}+7\ 3^{2/3}\right ) \log \left (-2 x^2-\left (2-\sqrt [3]{3}-3^{2/3}\right ) x-\sqrt [3]{3}+1\right )}{3 \left (3+3 \sqrt [3]{3}+3^{2/3}\right )}+\frac {10}{3} \log \left (2 x^3+3 x^2-3 x+1\right )-10 \log (x)-\frac {2 \left (34+7 \sqrt [3]{3}+7\ 3^{2/3}\right ) \log \left (2 x+3^{2/3}+\sqrt [3]{3}+1\right )}{3 \left (3+3 \sqrt [3]{3}+3^{2/3}\right )}\)

Input:

Int[(-10 - 7*x + 4*x^2)/(x - 3*x^2 + 3*x^3 + 2*x^4),x]
 

Output:

(-2*(13 + 27*3^(1/3))*ArcTan[(2 - 3^(1/3) - 3^(2/3) + 4*x)/Sqrt[3*(-6 + 3* 
3^(1/3) + 3^(2/3))]])/(3^(1/6)*Sqrt[-6 + 3*3^(1/3) + 3^(2/3)]*(3 + 3*3^(1/ 
3) + 3^(2/3))) - 10*Log[x] - (2*(34 + 7*3^(1/3) + 7*3^(2/3))*Log[1 + 3^(1/ 
3) + 3^(2/3) + 2*x])/(3*(3 + 3*3^(1/3) + 3^(2/3))) + ((34 + 7*3^(1/3) + 7* 
3^(2/3))*Log[1 - 3^(1/3) - (2 - 3^(1/3) - 3^(2/3))*x - 2*x^2])/(3*(3 + 3*3 
^(1/3) + 3^(2/3))) + (10*Log[1 - 3*x + 3*x^2 + 2*x^3])/3
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2026
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p 
*r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ 
erQ[p] &&  !MonomialQ[Px, x] && (ILtQ[p, 0] ||  !PolyQ[u, x])
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.04 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.22

method result size
risch \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (9 \textit {\_Z}^{3}-270 \textit {\_Z}^{2}+5859 \textit {\_Z} +16262\right )}{\sum }\textit {\_R} \ln \left (180 \textit {\_R}^{2}-6627 \textit {\_R} +61246 x +121013\right )\right )}{3}-10 \ln \left (x \right )\) \(43\)
default \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (2 \textit {\_Z}^{3}+3 \textit {\_Z}^{2}-3 \textit {\_Z} +1\right )}{\sum }\frac {\left (20 \textit {\_R}^{2}+34 \textit {\_R} -37\right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{2}+2 \textit {\_R} -1}\right )}{3}-10 \ln \left (x \right )\) \(56\)

Input:

int((4*x^2-7*x-10)/(2*x^4+3*x^3-3*x^2+x),x,method=_RETURNVERBOSE)
 

Output:

1/3*sum(_R*ln(180*_R^2-6627*_R+61246*x+121013),_R=RootOf(9*_Z^3-270*_Z^2+5 
859*_Z+16262))-10*ln(x)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 295 vs. \(2 (136) = 272\).

Time = 0.70 (sec) , antiderivative size = 295, normalized size of antiderivative = 1.52 \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=\frac {1}{27} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )} \log \left (\frac {20}{9} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + 61246 \, x - \frac {28717}{3} \cdot 9^{\frac {2}{3}} + 59643 \cdot 9^{\frac {1}{3}} + 54743\right ) - \frac {1}{54} \, {\left (13 \cdot 9^{\frac {2}{3}} + 27 \, \sqrt {-\frac {1}{243} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + \frac {260}{27} \cdot 9^{\frac {2}{3}} - 60 \cdot 9^{\frac {1}{3}} - \frac {368}{3}} - 81 \cdot 9^{\frac {1}{3}} - 180\right )} \log \left (-\frac {20}{9} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + 3 \, \sqrt {-\frac {1}{243} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + \frac {260}{27} \cdot 9^{\frac {2}{3}} - 60 \cdot 9^{\frac {1}{3}} - \frac {368}{3}} {\left (260 \cdot 9^{\frac {2}{3}} - 1620 \cdot 9^{\frac {1}{3}} + 3027\right )} + 122492 \, x + \frac {28717}{3} \cdot 9^{\frac {2}{3}} - 59643 \cdot 9^{\frac {1}{3}} + 37126\right ) - \frac {1}{54} \, {\left (13 \cdot 9^{\frac {2}{3}} - 27 \, \sqrt {-\frac {1}{243} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + \frac {260}{27} \cdot 9^{\frac {2}{3}} - 60 \cdot 9^{\frac {1}{3}} - \frac {368}{3}} - 81 \cdot 9^{\frac {1}{3}} - 180\right )} \log \left (-\frac {20}{9} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} - 3 \, \sqrt {-\frac {1}{243} \, {\left (13 \cdot 9^{\frac {2}{3}} - 81 \cdot 9^{\frac {1}{3}} + 90\right )}^{2} + \frac {260}{27} \cdot 9^{\frac {2}{3}} - 60 \cdot 9^{\frac {1}{3}} - \frac {368}{3}} {\left (260 \cdot 9^{\frac {2}{3}} - 1620 \cdot 9^{\frac {1}{3}} + 3027\right )} + 122492 \, x + \frac {28717}{3} \cdot 9^{\frac {2}{3}} - 59643 \cdot 9^{\frac {1}{3}} + 37126\right ) - 10 \, \log \left (x\right ) \] Input:

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

Output:

1/27*(13*9^(2/3) - 81*9^(1/3) + 90)*log(20/9*(13*9^(2/3) - 81*9^(1/3) + 90 
)^2 + 61246*x - 28717/3*9^(2/3) + 59643*9^(1/3) + 54743) - 1/54*(13*9^(2/3 
) + 27*sqrt(-1/243*(13*9^(2/3) - 81*9^(1/3) + 90)^2 + 260/27*9^(2/3) - 60* 
9^(1/3) - 368/3) - 81*9^(1/3) - 180)*log(-20/9*(13*9^(2/3) - 81*9^(1/3) + 
90)^2 + 3*sqrt(-1/243*(13*9^(2/3) - 81*9^(1/3) + 90)^2 + 260/27*9^(2/3) - 
60*9^(1/3) - 368/3)*(260*9^(2/3) - 1620*9^(1/3) + 3027) + 122492*x + 28717 
/3*9^(2/3) - 59643*9^(1/3) + 37126) - 1/54*(13*9^(2/3) - 27*sqrt(-1/243*(1 
3*9^(2/3) - 81*9^(1/3) + 90)^2 + 260/27*9^(2/3) - 60*9^(1/3) - 368/3) - 81 
*9^(1/3) - 180)*log(-20/9*(13*9^(2/3) - 81*9^(1/3) + 90)^2 - 3*sqrt(-1/243 
*(13*9^(2/3) - 81*9^(1/3) + 90)^2 + 260/27*9^(2/3) - 60*9^(1/3) - 368/3)*( 
260*9^(2/3) - 1620*9^(1/3) + 3027) + 122492*x + 28717/3*9^(2/3) - 59643*9^ 
(1/3) + 37126) - 10*log(x)
 

Sympy [A] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.24 \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=- 10 \log {\left (x \right )} + \operatorname {RootSum} {\left (243 t^{3} - 2430 t^{2} + 17577 t + 16262, \left ( t \mapsto t \log {\left (\frac {117082989 t^{3}}{39534782968} - \frac {62553465 t^{2}}{19767391484} - \frac {4364341677 t}{39534782968} + x + \frac {42975132615}{19767391484} \right )} \right )\right )} \] Input:

integrate((4*x**2-7*x-10)/(2*x**4+3*x**3-3*x**2+x),x)
 

Output:

-10*log(x) + RootSum(243*_t**3 - 2430*_t**2 + 17577*_t + 16262, Lambda(_t, 
 _t*log(117082989*_t**3/39534782968 - 62553465*_t**2/19767391484 - 4364341 
677*_t/39534782968 + x + 42975132615/19767391484)))
 

Maxima [F]

\[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=\int { \frac {4 \, x^{2} - 7 \, x - 10}{2 \, x^{4} + 3 \, x^{3} - 3 \, x^{2} + x} \,d x } \] Input:

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

Output:

integrate((20*x^2 + 34*x - 37)/(2*x^3 + 3*x^2 - 3*x + 1), x) - 10*log(x)
 

Giac [F(-2)]

Exception generated. \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=\text {Exception raised: NotImplementedError} \] Input:

integrate((4*x^2-7*x-10)/(2*x^4+3*x^3-3*x^2+x),x, algorithm="giac")
 

Output:

Exception raised: NotImplementedError >> unable to parse Giac output: -10* 
ln(abs(sageVARx))+((7/221184*rootof([[-3,0,8640,0,-5308416],[1,0,-3456,0,2 
985984,0,254803968]])-162)/(6*(1/2654208*rootof([[-3,0,8640,0,-5308416],[1 
,0,-3456,0,2985984,
 

Mupad [B] (verification not implemented)

Time = 9.78 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.78 \[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=\left (\sum _{k=1}^3\ln \left (-\frac {721\,\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )}{4}-\frac {1301\,x}{8}+\frac {\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )\,x\,859}{16}+\frac {{\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )}^2\,x\,4407}{16}-\frac {{\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )}^3\,x\,27}{2}-\frac {1077\,{\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )}^2}{16}-\frac {81\,{\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )}^3}{16}-\frac {535}{4}\right )\,\mathrm {root}\left (z^3-10\,z^2+\frac {217\,z}{3}+\frac {16262}{243},z,k\right )\right )-10\,\ln \left (x\right ) \] Input:

int(-(7*x - 4*x^2 + 10)/(x - 3*x^2 + 3*x^3 + 2*x^4),x)
 

Output:

symsum(log((859*root(z^3 - 10*z^2 + (217*z)/3 + 16262/243, z, k)*x)/16 - ( 
1301*x)/8 - (721*root(z^3 - 10*z^2 + (217*z)/3 + 16262/243, z, k))/4 + (44 
07*root(z^3 - 10*z^2 + (217*z)/3 + 16262/243, z, k)^2*x)/16 - (27*root(z^3 
 - 10*z^2 + (217*z)/3 + 16262/243, z, k)^3*x)/2 - (1077*root(z^3 - 10*z^2 
+ (217*z)/3 + 16262/243, z, k)^2)/16 - (81*root(z^3 - 10*z^2 + (217*z)/3 + 
 16262/243, z, k)^3)/16 - 535/4)*root(z^3 - 10*z^2 + (217*z)/3 + 16262/243 
, z, k), k, 1, 3) - 10*log(x)
 

Reduce [F]

\[ \int \frac {-10-7 x+4 x^2}{x-3 x^2+3 x^3+2 x^4} \, dx=-14 \left (\int \frac {1}{2 x^{4}+3 x^{3}-3 x^{2}+x}d x \right )+\int \frac {1}{2 x^{3}+3 x^{2}-3 x +1}d x -\frac {4 \,\mathrm {log}\left (2 x^{3}+3 x^{2}-3 x +1\right )}{3}+4 \,\mathrm {log}\left (x \right ) \] Input:

int((4*x^2-7*x-10)/(2*x^4+3*x^3-3*x^2+x),x)
 

Output:

( - 42*int(1/(2*x**4 + 3*x**3 - 3*x**2 + x),x) + 3*int(1/(2*x**3 + 3*x**2 
- 3*x + 1),x) - 4*log(2*x**3 + 3*x**2 - 3*x + 1) + 12*log(x))/3