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

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

Optimal result

Integrand size = 33, antiderivative size = 166 \[ \int \frac {x (1+x) (1+3 x)}{(-1+x)^2 (-1+3 x) \sqrt [3]{-x+x^3}} \, dx=\frac {-3 \left (-x+x^3\right )^{2/3}+2 \sqrt {3} \left (1-2 x+x^2\right ) \arctan \left (\frac {\sqrt {3} \left (124616800+1235276981 x+1609127381 x^2\right )+612314840 \sqrt {3} (-1+x) \sqrt [3]{-x+x^3}+2605939922 \sqrt {3} \left (-x+x^3\right )^{2/3}}{-39304000+3108349623 x+2990437623 x^2}\right )-\left (1-2 x+x^2\right ) \log \left (\frac {-1+3 x+3 (-1+x) \sqrt [3]{-x+x^3}-3 \left (-x+x^3\right )^{2/3}}{-1+3 x}\right )}{2 \left (1-2 x+x^2\right )} \]

[Out] 1/2*(2*3^(1/2)*(x^2-2*x+1)*arctan((612314840*3^(1/2)*(x^3-x)^(1/3)*(-1 
+x)+3^(1/2)*(1609127381*x^2+1235276981*x+124616800)+2605939922*3^(1/2) 
*(x^3-x)^(2/3))/(2990437623*x^2+3108349623*x-39304000))-(x^2-2*x+1)*ln 
((3*(-1+x)*(x^3-x)^(1/3)+3*x-3*(x^3-x)^(2/3)-1)/(-1+3*x))-3*(x^3-x)^(2 
/3))/(x^2-2*x+1)
 

Rubi [F]

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

[In] Int[(x*(1 + x)*(1 + 3*x))/((-1 + x)^2*(-1 + 3*x)*(-x + x^3)^(1/3)),x]
 
[Out] (3*(1 - x)^(1/3)*x^2*(1 + x)^(1/3)*AppellF1[5/3, 7/3, -2/3, 8/3, x, -x 
])/(5*(-x + x^3)^(1/3)) + ((1 - x)^(1/3)*x*Hypergeometric2F1[2/3, 7/3, 
 5/3, (2*x)/(1 + x)])/((1 + x)^(1/3)*(-x + x^3)^(1/3)) + (2*(-1 + x)^( 
1/3)*x^(1/3)*(1 + x)^(1/3)*Defer[Subst][Defer[Int][(x*(1 + x^3)^(2/3)) 
/((-1 + x^3)^(7/3)*(-1 + 3*x^3)), x], x, x^(1/3)])/(-x + x^3)^(1/3)
 

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

Mathematica [F]

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

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

Maple [C] (verified)

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

Time = 0.64 (sec) , antiderivative size = 682, normalized size of antiderivative = 4.11

method result size
trager \(\text {Expression too large to display}\) \(682\)
[In] int(x*(1+x)*(1+3*x)/(-1+x)^2/(-1+3*x)/(x^3-x)^(1/3),x,method=_RETURNVE 
RBOSE)
 
[Out] -3/2/(-1+x)^2*(x^3-x)^(2/3)-3*ln(-(12735*RootOf(9*_Z^2-3*_Z+1)^2*x^2+9 
702*RootOf(9*_Z^2-3*_Z+1)*(x^3-x)^(2/3)+9702*RootOf(9*_Z^2-3*_Z+1)*(x^ 
3-x)^(1/3)*x-33111*RootOf(9*_Z^2-3*_Z+1)^2*x+5457*RootOf(9*_Z^2-3*_Z+1 
)*x^2-2127*(x^3-x)^(2/3)-9702*RootOf(9*_Z^2-3*_Z+1)*(x^3-x)^(1/3)-2127 
*(x^3-x)^(1/3)*x+15282*RootOf(9*_Z^2-3*_Z+1)^2+7716*RootOf(9*_Z^2-3*_Z 
+1)*x-712*x^2+2127*(x^3-x)^(1/3)-753*RootOf(9*_Z^2-3*_Z+1)-445*x-89)/( 
-1+3*x))*RootOf(9*_Z^2-3*_Z+1)+3*RootOf(9*_Z^2-3*_Z+1)*ln((-12735*Root 
Of(9*_Z^2-3*_Z+1)^2*x^2+9702*RootOf(9*_Z^2-3*_Z+1)*(x^3-x)^(2/3)+9702* 
RootOf(9*_Z^2-3*_Z+1)*(x^3-x)^(1/3)*x+33111*RootOf(9*_Z^2-3*_Z+1)^2*x+ 
13947*RootOf(9*_Z^2-3*_Z+1)*x^2-1107*(x^3-x)^(2/3)-9702*RootOf(9*_Z^2- 
3*_Z+1)*(x^3-x)^(1/3)-1107*(x^3-x)^(1/3)*x-15282*RootOf(9*_Z^2-3*_Z+1) 
^2-14358*RootOf(9*_Z^2-3*_Z+1)*x-2522*x^2+1107*(x^3-x)^(1/3)+9435*Root 
Of(9*_Z^2-3*_Z+1)+1552*x-1358)/(-1+3*x))+ln(-(12735*RootOf(9*_Z^2-3*_Z 
+1)^2*x^2+9702*RootOf(9*_Z^2-3*_Z+1)*(x^3-x)^(2/3)+9702*RootOf(9*_Z^2- 
3*_Z+1)*(x^3-x)^(1/3)*x-33111*RootOf(9*_Z^2-3*_Z+1)^2*x+5457*RootOf(9* 
_Z^2-3*_Z+1)*x^2-2127*(x^3-x)^(2/3)-9702*RootOf(9*_Z^2-3*_Z+1)*(x^3-x) 
^(1/3)-2127*(x^3-x)^(1/3)*x+15282*RootOf(9*_Z^2-3*_Z+1)^2+7716*RootOf( 
9*_Z^2-3*_Z+1)*x-712*x^2+2127*(x^3-x)^(1/3)-753*RootOf(9*_Z^2-3*_Z+1)- 
445*x-89)/(-1+3*x))
 

Fricas [A] (verification not implemented)

none

Time = 0.65 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.88 \[ \int \frac {x (1+x) (1+3 x)}{(-1+x)^2 (-1+3 x) \sqrt [3]{-x+x^3}} \, dx=\frac {2 \, \sqrt {3} {\left (x^{2} - 2 \, x + 1\right )} \arctan \left (\frac {612314840 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {1}{3}} {\left (x - 1\right )} + \sqrt {3} {\left (1609127381 \, x^{2} + 1235276981 \, x + 124616800\right )} + 2605939922 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {2}{3}}}{2990437623 \, x^{2} + 3108349623 \, x - 39304000}\right ) - {\left (x^{2} - 2 \, x + 1\right )} \log \left (\frac {3 \, {\left (x^{3} - x\right )}^{\frac {1}{3}} {\left (x - 1\right )} + 3 \, x - 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}} - 1}{3 \, x - 1}\right ) - 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}}}{2 \, {\left (x^{2} - 2 \, x + 1\right )}} \]

[In] integrate(x*(1+x)*(1+3*x)/(-1+x)^2/(-1+3*x)/(x^3-x)^(1/3),x, algorithm 
="fricas")
 
[Out] 1/2*(2*sqrt(3)*(x^2 - 2*x + 1)*arctan((612314840*sqrt(3)*(x^3 - x)^(1/ 
3)*(x - 1) + sqrt(3)*(1609127381*x^2 + 1235276981*x + 124616800) + 260 
5939922*sqrt(3)*(x^3 - x)^(2/3))/(2990437623*x^2 + 3108349623*x - 3930 
4000)) - (x^2 - 2*x + 1)*log((3*(x^3 - x)^(1/3)*(x - 1) + 3*x - 3*(x^3 
 - x)^(2/3) - 1)/(3*x - 1)) - 3*(x^3 - x)^(2/3))/(x^2 - 2*x + 1)
 

Sympy [F]

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

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

Maxima [F]

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

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

Giac [F]

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

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

Mupad [F(-1)]

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

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