\(\int \frac {x (-2+x^3)}{\sqrt [3]{-1+x^3} (-1+x^3+x^6)} \, dx\) [6]

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

Optimal result

Integrand size = 26, antiderivative size = 90 \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\frac {\arctan \left (\frac {\sqrt {3} \sqrt [3]{-1+x^3}}{-2 x^2+\sqrt [3]{-1+x^3}}\right )}{\sqrt {3}}+\frac {1}{3} \log \left (x^2+\sqrt [3]{-1+x^3}\right )-\frac {1}{6} \log \left (x^4-x^2 \sqrt [3]{-1+x^3}+\left (-1+x^3\right )^{2/3}\right ) \]

[Out] 1/3*arctan(3^(1/2)*(x^3-1)^(1/3)/(-2*x^2+(x^3-1)^(1/3)))*3^(1/2)+1/3*l 
n(x^2+(x^3-1)^(1/3))-1/6*ln(x^4-x^2*(x^3-1)^(1/3)+(x^3-1)^(2/3))
 

Rubi [C] (verified)

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

Time = 0.35 (sec) , antiderivative size = 261, normalized size of antiderivative = 2.90, number of steps used = 14, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {7281, 1852, 1013, 1012} \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\frac {2 \sqrt [3]{1-x^3} x^2 \operatorname {AppellF1}\left (\frac {2}{3},\frac {1}{3},1,\frac {5}{3},x^3,-\frac {2 x^3}{1+\sqrt {5}}\right )}{\sqrt {5} \left (1+\sqrt {5}\right ) \sqrt [3]{x^3-1}}+\frac {\sqrt [3]{1-x^3} x^2 \operatorname {AppellF1}\left (\frac {2}{3},\frac {1}{3},1,\frac {5}{3},x^3,-\frac {2 x^3}{1+\sqrt {5}}\right )}{2 \sqrt {5} \sqrt [3]{x^3-1}}-\frac {2 \sqrt [3]{1-x^3} x^2 \operatorname {AppellF1}\left (\frac {2}{3},1,\frac {1}{3},\frac {5}{3},-\frac {2 x^3}{1-\sqrt {5}},x^3\right )}{\sqrt {5} \left (1-\sqrt {5}\right ) \sqrt [3]{x^3-1}}-\frac {\sqrt [3]{1-x^3} x^2 \operatorname {AppellF1}\left (\frac {2}{3},1,\frac {1}{3},\frac {5}{3},-\frac {2 x^3}{1-\sqrt {5}},x^3\right )}{2 \sqrt {5} \sqrt [3]{x^3-1}} \]

[In] Int[(x*(-2 + x^3))/((-1 + x^3)^(1/3)*(-1 + x^3 + x^6)),x]
 
[Out] (x^2*(1 - x^3)^(1/3)*AppellF1[2/3, 1/3, 1, 5/3, x^3, (-2*x^3)/(1 + Sqr 
t[5])])/(2*Sqrt[5]*(-1 + x^3)^(1/3)) + (2*x^2*(1 - x^3)^(1/3)*AppellF1 
[2/3, 1/3, 1, 5/3, x^3, (-2*x^3)/(1 + Sqrt[5])])/(Sqrt[5]*(1 + Sqrt[5] 
)*(-1 + x^3)^(1/3)) - (x^2*(1 - x^3)^(1/3)*AppellF1[2/3, 1, 1/3, 5/3, 
(-2*x^3)/(1 - Sqrt[5]), x^3])/(2*Sqrt[5]*(-1 + x^3)^(1/3)) - (2*x^2*(1 
 - x^3)^(1/3)*AppellF1[2/3, 1, 1/3, 5/3, (-2*x^3)/(1 - Sqrt[5]), x^3]) 
/(Sqrt[5]*(1 - Sqrt[5])*(-1 + x^3)^(1/3))
 

Rule 1012

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ 
))^(q_), x_Symbol] :> Simp[a^p*c^q*((e*x)^(m + 1)/(e*(m + 1)))*AppellF1[(m 
+ 1)/n, -p, -q, 1 + (m + 1)/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, 
 b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, n 
 - 1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
 

Rule 1013

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ 
))^(q_), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^ 
n/a))^FracPart[p])   Int[(e*x)^m*(1 + b*(x^n/a))^p*(c + d*x^n)^q, x], x] /; 
 FreeQ[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] & 
& NeQ[m, n - 1] &&  !(IntegerQ[p] || GtQ[a, 0])
 

Rule 1852

Int[(((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(n_))^(q_))/((a_) + (c_.)*(x_)^( 
n2_.) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q, ( 
f*x)^m/(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, f, q, n}, x 
] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IGtQ[n, 0] &&  !IntegerQ[q] && 
IntegerQ[m]
 

Rule 7281

Int[u_, x_Symbol] :> With[{lst = FunctionOfLinear[u, x]}, Simp[1/lst[[3]] 
 Subst[Int[lst[[1]], x], x, lst[[2]] + lst[[3]]*x], x] /;  !FalseQ[lst]]
 

Rubi steps \begin{align*} \text {integral}= \int \left (-\frac {2 x}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )}+\frac {x^4}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )}\right ) \, dx \\ = -\left (2 \int \frac {x}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx\right )+\int \frac {x^4}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx \\ = -\left (2 \int \left (-\frac {2 x}{\sqrt {5} \left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{-1+x^3}}-\frac {2 x}{\sqrt {5} \sqrt [3]{-1+x^3} \left (1+\sqrt {5}+2 x^3\right )}\right ) \, dx\right )+\int \left (-\frac {\left (-1+\sqrt {5}\right ) x}{\sqrt {5} \left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{-1+x^3}}+\frac {\left (1+\sqrt {5}\right ) x}{\sqrt {5} \sqrt [3]{-1+x^3} \left (1+\sqrt {5}+2 x^3\right )}\right ) \, dx \\ = \frac {4}{\sqrt {5}} \int \frac {x}{\left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{-1+x^3}} \, dx+\frac {4}{\sqrt {5}} \int \frac {x}{\sqrt [3]{-1+x^3} \left (1+\sqrt {5}+2 x^3\right )} \, dx-\frac {1}{5} \left (5-\sqrt {5}\right ) \int \frac {x}{\left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{-1+x^3}} \, dx+\frac {1}{5} \left (5+\sqrt {5}\right ) \int \frac {x}{\sqrt [3]{-1+x^3} \left (1+\sqrt {5}+2 x^3\right )} \, dx \\ = \frac {4 \sqrt [3]{1-x^3}}{\sqrt {5} \sqrt [3]{-1+x^3}} \int \frac {x}{\left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{1-x^3}} \, dx+\frac {4 \sqrt [3]{1-x^3}}{\sqrt {5} \sqrt [3]{-1+x^3}} \int \frac {x}{\sqrt [3]{1-x^3} \left (1+\sqrt {5}+2 x^3\right )} \, dx-\frac {\left (5-\sqrt {5}\right ) \sqrt [3]{1-x^3}}{5 \sqrt [3]{-1+x^3}} \int \frac {x}{\left (-1+\sqrt {5}-2 x^3\right ) \sqrt [3]{1-x^3}} \, dx+\frac {\left (5+\sqrt {5}\right ) \sqrt [3]{1-x^3}}{5 \sqrt [3]{-1+x^3}} \int \frac {x}{\sqrt [3]{1-x^3} \left (1+\sqrt {5}+2 x^3\right )} \, dx \\ = \frac {2 x^2 \sqrt [3]{1-x^3} F_1\left (\frac {2}{3};\frac {1}{3},1;\frac {5}{3};x^3,-\frac {2 x^3}{1+\sqrt {5}}\right )}{\sqrt {5} \left (1+\sqrt {5}\right ) \sqrt [3]{-1+x^3}}+\frac {\left (5+\sqrt {5}\right ) x^2 \sqrt [3]{1-x^3} F_1\left (\frac {2}{3};\frac {1}{3},1;\frac {5}{3};x^3,-\frac {2 x^3}{1+\sqrt {5}}\right )}{10 \left (1+\sqrt {5}\right ) \sqrt [3]{-1+x^3}}-\frac {2 x^2 \sqrt [3]{1-x^3} F_1\left (\frac {2}{3};1,\frac {1}{3};\frac {5}{3};-\frac {2 x^3}{1-\sqrt {5}},x^3\right )}{\sqrt {5} \left (1-\sqrt {5}\right ) \sqrt [3]{-1+x^3}}+\frac {\left (5-\sqrt {5}\right ) x^2 \sqrt [3]{1-x^3} F_1\left (\frac {2}{3};1,\frac {1}{3};\frac {5}{3};-\frac {2 x^3}{1-\sqrt {5}},x^3\right )}{10 \left (1-\sqrt {5}\right ) \sqrt [3]{-1+x^3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00 \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\frac {\arctan \left (\frac {\sqrt {3} \sqrt [3]{-1+x^3}}{-2 x^2+\sqrt [3]{-1+x^3}}\right )}{\sqrt {3}}+\frac {1}{3} \log \left (x^2+\sqrt [3]{-1+x^3}\right )-\frac {1}{6} \log \left (x^4-x^2 \sqrt [3]{-1+x^3}+\left (-1+x^3\right )^{2/3}\right ) \]

[In] Integrate[(x*(-2 + x^3))/((-1 + x^3)^(1/3)*(-1 + x^3 + x^6)),x]
 
[Out] ArcTan[(Sqrt[3]*(-1 + x^3)^(1/3))/(-2*x^2 + (-1 + x^3)^(1/3))]/Sqrt[3] 
 + Log[x^2 + (-1 + x^3)^(1/3)]/3 - Log[x^4 - x^2*(-1 + x^3)^(1/3) + (- 
1 + x^3)^(2/3)]/6
 

Maple [C] (verified)

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

Time = 0.47 (sec) , antiderivative size = 290, normalized size of antiderivative = 3.22

method result size
trager \(\frac {\ln \left (-\frac {-9 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right )^{2} x^{6}-9 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) x^{6}-9 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) \left (x^{3}-1\right )^{\frac {1}{3}} x^{4}-2 x^{6}+3 \left (x^{3}-1\right )^{\frac {2}{3}} x^{2}+3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) x^{3}+2 x^{3}-3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right )-2}{x^{6}+x^{3}-1}\right )}{3}+\operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) \ln \left (\frac {-9 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right )^{2} x^{6}-3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) x^{6}+6 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) \left (x^{3}-1\right )^{\frac {1}{3}} x^{4}+3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) \left (x^{3}-1\right )^{\frac {2}{3}} x^{2}+\left (x^{3}-1\right )^{\frac {1}{3}} x^{4}-\left (x^{3}-1\right )^{\frac {2}{3}} x^{2}-3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right ) x^{3}-x^{3}+3 \operatorname {RootOf}\left (9 \textit {\_Z}^{2}+3 \textit {\_Z} +1\right )+1}{x^{6}+x^{3}-1}\right )\) \(290\)
[In] int(x*(x^3-2)/(x^3-1)^(1/3)/(x^6+x^3-1),x,method=_RETURNVERBOSE)
 
[Out] 1/3*ln(-(-9*RootOf(9*_Z^2+3*_Z+1)^2*x^6-9*RootOf(9*_Z^2+3*_Z+1)*x^6-9* 
RootOf(9*_Z^2+3*_Z+1)*(x^3-1)^(1/3)*x^4-2*x^6+3*(x^3-1)^(2/3)*x^2+3*Ro 
otOf(9*_Z^2+3*_Z+1)*x^3+2*x^3-3*RootOf(9*_Z^2+3*_Z+1)-2)/(x^6+x^3-1))+ 
RootOf(9*_Z^2+3*_Z+1)*ln((-9*RootOf(9*_Z^2+3*_Z+1)^2*x^6-3*RootOf(9*_Z 
^2+3*_Z+1)*x^6+6*RootOf(9*_Z^2+3*_Z+1)*(x^3-1)^(1/3)*x^4+3*RootOf(9*_Z 
^2+3*_Z+1)*(x^3-1)^(2/3)*x^2+(x^3-1)^(1/3)*x^4-(x^3-1)^(2/3)*x^2-3*Roo 
tOf(9*_Z^2+3*_Z+1)*x^3-x^3+3*RootOf(9*_Z^2+3*_Z+1)+1)/(x^6+x^3-1))
 

Fricas [A] (verification not implemented)

none

Time = 1.36 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.16 \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=-\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} x^{6} + 2 \, \sqrt {3} {\left (x^{3} - 1\right )}^{\frac {1}{3}} x^{4} + 4 \, \sqrt {3} {\left (x^{3} - 1\right )}^{\frac {2}{3}} x^{2}}{x^{6} - 8 \, x^{3} + 8}\right ) + \frac {1}{6} \, \log \left (\frac {x^{6} + 3 \, {\left (x^{3} - 1\right )}^{\frac {1}{3}} x^{4} + x^{3} + 3 \, {\left (x^{3} - 1\right )}^{\frac {2}{3}} x^{2} - 1}{x^{6} + x^{3} - 1}\right ) \]

[In] integrate(x*(x^3-2)/(x^3-1)^(1/3)/(x^6+x^3-1),x, algorithm="fricas")
 
[Out] -1/3*sqrt(3)*arctan((sqrt(3)*x^6 + 2*sqrt(3)*(x^3 - 1)^(1/3)*x^4 + 4*s 
qrt(3)*(x^3 - 1)^(2/3)*x^2)/(x^6 - 8*x^3 + 8)) + 1/6*log((x^6 + 3*(x^3 
 - 1)^(1/3)*x^4 + x^3 + 3*(x^3 - 1)^(2/3)*x^2 - 1)/(x^6 + x^3 - 1))
 

Sympy [F(-1)]

Timed out. \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\text {Timed out} \]

[In] integrate(x*(x**3-2)/(x**3-1)**(1/3)/(x**6+x**3-1),x)
 
[Out] Timed out
 

Maxima [F]

\[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\int { \frac {{\left (x^{3} - 2\right )} x}{{\left (x^{6} + x^{3} - 1\right )} {\left (x^{3} - 1\right )}^{\frac {1}{3}}} \,d x } \]

[In] integrate(x*(x^3-2)/(x^3-1)^(1/3)/(x^6+x^3-1),x, algorithm="maxima")
 
[Out] integrate((x^3 - 2)*x/((x^6 + x^3 - 1)*(x^3 - 1)^(1/3)), x)
 

Giac [F]

\[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\int { \frac {{\left (x^{3} - 2\right )} x}{{\left (x^{6} + x^{3} - 1\right )} {\left (x^{3} - 1\right )}^{\frac {1}{3}}} \,d x } \]

[In] integrate(x*(x^3-2)/(x^3-1)^(1/3)/(x^6+x^3-1),x, algorithm="giac")
 
[Out] integrate((x^3 - 2)*x/((x^6 + x^3 - 1)*(x^3 - 1)^(1/3)), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x \left (-2+x^3\right )}{\sqrt [3]{-1+x^3} \left (-1+x^3+x^6\right )} \, dx=\int \frac {x\,\left (x^3-2\right )}{{\left (x^3-1\right )}^{1/3}\,\left (x^6+x^3-1\right )} \,d x \]

[In] int((x*(x^3 - 2))/((x^3 - 1)^(1/3)*(x^3 + x^6 - 1)),x)
 
[Out] int((x*(x^3 - 2))/((x^3 - 1)^(1/3)*(x^3 + x^6 - 1)), x)