\(\int \frac {(-2+2 x^4+5 x^7) \sqrt [3]{x-x^3+x^5+x^8}}{(2+x^2+2 x^4+2 x^7)^2} \, dx\) [2666]

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

Optimal result

Integrand size = 47, antiderivative size = 238 \[ \int \frac {\left (-2+2 x^4+5 x^7\right ) \sqrt [3]{x-x^3+x^5+x^8}}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx=-\frac {x \sqrt [3]{x-x^3+x^5+x^8}}{2 \left (2+x^2+2 x^4+2 x^7\right )}+\frac {\arctan \left (\frac {\sqrt {3} \sqrt [3]{x-x^3+x^5+x^8}}{2^{2/3} \sqrt [3]{3} x-\sqrt [3]{x-x^3+x^5+x^8}}\right )}{6 \sqrt [3]{2} \sqrt [6]{3}}+\frac {\log \left (2^{2/3} \sqrt [3]{3} x+2 \sqrt [3]{x-x^3+x^5+x^8}\right )}{6 \sqrt [3]{2} 3^{2/3}}-\frac {\log \left (\sqrt [3]{2} 3^{2/3} x^2-2^{2/3} \sqrt [3]{3} x \sqrt [3]{x-x^3+x^5+x^8}+2 \left (x-x^3+x^5+x^8\right )^{2/3}\right )}{12 \sqrt [3]{2} 3^{2/3}} \]

[Out]

-x*(x^8+x^5-x^3+x)^(1/3)/(4*x^7+4*x^4+2*x^2+4)+1/36*arctan(3^(1/2)*(x^8+x^5-x^3+x)^(1/3)/(2^(2/3)*3^(1/3)*x-(x
^8+x^5-x^3+x)^(1/3)))*2^(2/3)*3^(5/6)+1/36*ln(2^(2/3)*3^(1/3)*x+2*(x^8+x^5-x^3+x)^(1/3))*2^(2/3)*3^(1/3)-1/72*
ln(2^(1/3)*3^(2/3)*x^2-2^(2/3)*3^(1/3)*x*(x^8+x^5-x^3+x)^(1/3)+2*(x^8+x^5-x^3+x)^(2/3))*2^(2/3)*3^(1/3)

Rubi [F]

\[ \int \frac {\left (-2+2 x^4+5 x^7\right ) \sqrt [3]{x-x^3+x^5+x^8}}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx=\int \frac {\left (-2+2 x^4+5 x^7\right ) \sqrt [3]{x-x^3+x^5+x^8}}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx \]

[In]

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

[Out]

(-21*(x - x^3 + x^5 + x^8)^(1/3)*Defer[Subst][Defer[Int][(x^3*(1 - x^6 + x^12 + x^21)^(1/3))/(2 + x^6 + 2*x^12
 + 2*x^21)^2, x], x, x^(1/3)])/(x^(1/3)*(1 - x^2 + x^4 + x^7)^(1/3)) - (15*(x - x^3 + x^5 + x^8)^(1/3)*Defer[S
ubst][Defer[Int][(x^9*(1 - x^6 + x^12 + x^21)^(1/3))/(2 + x^6 + 2*x^12 + 2*x^21)^2, x], x, x^(1/3)])/(2*x^(1/3
)*(1 - x^2 + x^4 + x^7)^(1/3)) - (9*(x - x^3 + x^5 + x^8)^(1/3)*Defer[Subst][Defer[Int][(x^15*(1 - x^6 + x^12
+ x^21)^(1/3))/(2 + x^6 + 2*x^12 + 2*x^21)^2, x], x, x^(1/3)])/(x^(1/3)*(1 - x^2 + x^4 + x^7)^(1/3)) + (15*(x
- x^3 + x^5 + x^8)^(1/3)*Defer[Subst][Defer[Int][(x^3*(1 - x^6 + x^12 + x^21)^(1/3))/(2 + x^6 + 2*x^12 + 2*x^2
1), x], x, x^(1/3)])/(2*x^(1/3)*(1 - x^2 + x^4 + x^7)^(1/3))

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt [3]{x-x^3+x^5+x^8} \int \frac {\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7} \left (-2+2 x^4+5 x^7\right )}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx}{\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ & = \frac {\left (3 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}} \left (-2+2 x^{12}+5 x^{21}\right )}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ & = \frac {\left (3 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \left (-\frac {x^3 \left (14+5 x^6+6 x^{12}\right ) \sqrt [3]{1-x^6+x^{12}+x^{21}}}{2 \left (2+x^6+2 x^{12}+2 x^{21}\right )^2}+\frac {5 x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{2 \left (2+x^6+2 x^{12}+2 x^{21}\right )}\right ) \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ & = -\frac {\left (3 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \left (14+5 x^6+6 x^{12}\right ) \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2} \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}}+\frac {\left (15 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{2+x^6+2 x^{12}+2 x^{21}} \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ & = -\frac {\left (3 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \left (\frac {14 x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2}+\frac {5 x^9 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2}+\frac {6 x^{15} \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2}\right ) \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}}+\frac {\left (15 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{2+x^6+2 x^{12}+2 x^{21}} \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ & = -\frac {\left (15 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^9 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2} \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}}+\frac {\left (15 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{2+x^6+2 x^{12}+2 x^{21}} \, dx,x,\sqrt [3]{x}\right )}{2 \sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}}-\frac {\left (9 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^{15} \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}}-\frac {\left (21 \sqrt [3]{x-x^3+x^5+x^8}\right ) \text {Subst}\left (\int \frac {x^3 \sqrt [3]{1-x^6+x^{12}+x^{21}}}{\left (2+x^6+2 x^{12}+2 x^{21}\right )^2} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x^2+x^4+x^7}} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.29 (sec) , antiderivative size = 296, normalized size of antiderivative = 1.24 \[ \int \frac {\left (-2+2 x^4+5 x^7\right ) \sqrt [3]{x-x^3+x^5+x^8}}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx=\frac {\sqrt [3]{x-x^3+x^5+x^8} \left (-\frac {36 x^{4/3}}{2+x^2+2 x^4+2 x^7}+\frac {2\ 2^{2/3} 3^{5/6} \arctan \left (\frac {3^{5/6} x^{2/3}}{\sqrt [3]{3} x^{2/3}-2 \sqrt [3]{2} \sqrt [3]{1-x^2+x^4+x^7}}\right )}{\sqrt [3]{1-x^2+x^4+x^7}}+\frac {2\ 2^{2/3} \sqrt [3]{3} \log \left (3 x^{2/3}+\sqrt [3]{2} 3^{2/3} \sqrt [3]{1-x^2+x^4+x^7}\right )}{\sqrt [3]{1-x^2+x^4+x^7}}-\frac {2^{2/3} \sqrt [3]{3} \log \left (3 x^{4/3}-\sqrt [3]{2} 3^{2/3} x^{2/3} \sqrt [3]{1-x^2+x^4+x^7}+2^{2/3} \sqrt [3]{3} \left (1-x^2+x^4+x^7\right )^{2/3}\right )}{\sqrt [3]{1-x^2+x^4+x^7}}\right )}{72 \sqrt [3]{x}} \]

[In]

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

[Out]

((x - x^3 + x^5 + x^8)^(1/3)*((-36*x^(4/3))/(2 + x^2 + 2*x^4 + 2*x^7) + (2*2^(2/3)*3^(5/6)*ArcTan[(3^(5/6)*x^(
2/3))/(3^(1/3)*x^(2/3) - 2*2^(1/3)*(1 - x^2 + x^4 + x^7)^(1/3))])/(1 - x^2 + x^4 + x^7)^(1/3) + (2*2^(2/3)*3^(
1/3)*Log[3*x^(2/3) + 2^(1/3)*3^(2/3)*(1 - x^2 + x^4 + x^7)^(1/3)])/(1 - x^2 + x^4 + x^7)^(1/3) - (2^(2/3)*3^(1
/3)*Log[3*x^(4/3) - 2^(1/3)*3^(2/3)*x^(2/3)*(1 - x^2 + x^4 + x^7)^(1/3) + 2^(2/3)*3^(1/3)*(1 - x^2 + x^4 + x^7
)^(2/3)])/(1 - x^2 + x^4 + x^7)^(1/3)))/(72*x^(1/3))

Maple [F(-1)]

Timed out.

\[\int \frac {\left (5 x^{7}+2 x^{4}-2\right ) \left (x^{8}+x^{5}-x^{3}+x \right )^{\frac {1}{3}}}{\left (2 x^{7}+2 x^{4}+x^{2}+2\right )^{2}}d x\]

[In]

int((5*x^7+2*x^4-2)*(x^8+x^5-x^3+x)^(1/3)/(2*x^7+2*x^4+x^2+2)^2,x)

[Out]

int((5*x^7+2*x^4-2)*(x^8+x^5-x^3+x)^(1/3)/(2*x^7+2*x^4+x^2+2)^2,x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 635 vs. \(2 (188) = 376\).

Time = 34.00 (sec) , antiderivative size = 635, normalized size of antiderivative = 2.67 \[ \int \frac {\left (-2+2 x^4+5 x^7\right ) \sqrt [3]{x-x^3+x^5+x^8}}{\left (2+x^2+2 x^4+2 x^7\right )^2} \, dx=-\frac {6 \cdot 18^{\frac {1}{6}} \sqrt {6} {\left (2 \, x^{7} + 2 \, x^{4} + x^{2} + 2\right )} \arctan \left (-\frac {18^{\frac {1}{6}} {\left (6 \cdot 18^{\frac {2}{3}} \sqrt {6} {\left (4 \, x^{15} + 8 \, x^{12} - 50 \, x^{10} + 4 \, x^{9} + 8 \, x^{8} - 50 \, x^{7} + 63 \, x^{5} - 50 \, x^{3} + 4 \, x\right )} {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {1}{3}} - 72 \, \sqrt {6} {\left (2 \, x^{14} + 4 \, x^{11} - 7 \, x^{9} + 2 \, x^{8} + 4 \, x^{7} - 7 \, x^{6} - 7 \, x^{2} + 2\right )} {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {2}{3}} + 18^{\frac {1}{3}} \sqrt {6} {\left (8 \, x^{21} + 24 \, x^{18} - 204 \, x^{16} + 24 \, x^{15} + 24 \, x^{14} - 408 \, x^{13} + 8 \, x^{12} + 648 \, x^{11} - 204 \, x^{10} - 408 \, x^{9} + 624 \, x^{8} + 24 \, x^{7} - 785 \, x^{6} + 624 \, x^{4} - 204 \, x^{2} + 8\right )}\right )}}{18 \, {\left (8 \, x^{21} + 24 \, x^{18} + 12 \, x^{16} + 24 \, x^{15} + 24 \, x^{14} + 24 \, x^{13} + 8 \, x^{12} - 432 \, x^{11} + 12 \, x^{10} + 24 \, x^{9} - 456 \, x^{8} + 24 \, x^{7} + 511 \, x^{6} - 456 \, x^{4} + 12 \, x^{2} + 8\right )}}\right ) + 18^{\frac {2}{3}} {\left (2 \, x^{7} + 2 \, x^{4} + x^{2} + 2\right )} \log \left (-\frac {36 \cdot 18^{\frac {1}{3}} {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {2}{3}} {\left (x^{7} + x^{4} - 4 \, x^{2} + 1\right )} - 18^{\frac {2}{3}} {\left (4 \, x^{14} + 8 \, x^{11} - 50 \, x^{9} + 4 \, x^{8} + 8 \, x^{7} - 50 \, x^{6} + 63 \, x^{4} - 50 \, x^{2} + 4\right )} - 54 \, {\left (4 \, x^{8} + 4 \, x^{5} - 7 \, x^{3} + 4 \, x\right )} {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {1}{3}}}{4 \, x^{14} + 8 \, x^{11} + 4 \, x^{9} + 4 \, x^{8} + 8 \, x^{7} + 4 \, x^{6} + 9 \, x^{4} + 4 \, x^{2} + 4}\right ) - 2 \cdot 18^{\frac {2}{3}} {\left (2 \, x^{7} + 2 \, x^{4} + x^{2} + 2\right )} \log \left (\frac {3 \cdot 18^{\frac {2}{3}} {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {1}{3}} x + 18^{\frac {1}{3}} {\left (2 \, x^{7} + 2 \, x^{4} + x^{2} + 2\right )} + 18 \, {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {2}{3}}}{2 \, x^{7} + 2 \, x^{4} + x^{2} + 2}\right ) + 324 \, {\left (x^{8} + x^{5} - x^{3} + x\right )}^{\frac {1}{3}} x}{648 \, {\left (2 \, x^{7} + 2 \, x^{4} + x^{2} + 2\right )}} \]

[In]

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

[Out]

-1/648*(6*18^(1/6)*sqrt(6)*(2*x^7 + 2*x^4 + x^2 + 2)*arctan(-1/18*18^(1/6)*(6*18^(2/3)*sqrt(6)*(4*x^15 + 8*x^1
2 - 50*x^10 + 4*x^9 + 8*x^8 - 50*x^7 + 63*x^5 - 50*x^3 + 4*x)*(x^8 + x^5 - x^3 + x)^(1/3) - 72*sqrt(6)*(2*x^14
 + 4*x^11 - 7*x^9 + 2*x^8 + 4*x^7 - 7*x^6 - 7*x^2 + 2)*(x^8 + x^5 - x^3 + x)^(2/3) + 18^(1/3)*sqrt(6)*(8*x^21
+ 24*x^18 - 204*x^16 + 24*x^15 + 24*x^14 - 408*x^13 + 8*x^12 + 648*x^11 - 204*x^10 - 408*x^9 + 624*x^8 + 24*x^
7 - 785*x^6 + 624*x^4 - 204*x^2 + 8))/(8*x^21 + 24*x^18 + 12*x^16 + 24*x^15 + 24*x^14 + 24*x^13 + 8*x^12 - 432
*x^11 + 12*x^10 + 24*x^9 - 456*x^8 + 24*x^7 + 511*x^6 - 456*x^4 + 12*x^2 + 8)) + 18^(2/3)*(2*x^7 + 2*x^4 + x^2
 + 2)*log(-(36*18^(1/3)*(x^8 + x^5 - x^3 + x)^(2/3)*(x^7 + x^4 - 4*x^2 + 1) - 18^(2/3)*(4*x^14 + 8*x^11 - 50*x
^9 + 4*x^8 + 8*x^7 - 50*x^6 + 63*x^4 - 50*x^2 + 4) - 54*(4*x^8 + 4*x^5 - 7*x^3 + 4*x)*(x^8 + x^5 - x^3 + x)^(1
/3))/(4*x^14 + 8*x^11 + 4*x^9 + 4*x^8 + 8*x^7 + 4*x^6 + 9*x^4 + 4*x^2 + 4)) - 2*18^(2/3)*(2*x^7 + 2*x^4 + x^2
+ 2)*log((3*18^(2/3)*(x^8 + x^5 - x^3 + x)^(1/3)*x + 18^(1/3)*(2*x^7 + 2*x^4 + x^2 + 2) + 18*(x^8 + x^5 - x^3
+ x)^(2/3))/(2*x^7 + 2*x^4 + x^2 + 2)) + 324*(x^8 + x^5 - x^3 + x)^(1/3)*x)/(2*x^7 + 2*x^4 + x^2 + 2)

Sympy [F]

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

[In]

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

[Out]

Integral((x*(x + 1)*(x**6 - x**5 + x**4 - x + 1))**(1/3)*(5*x**7 + 2*x**4 - 2)/(2*x**7 + 2*x**4 + x**2 + 2)**2
, x)

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

int(((2*x^4 + 5*x^7 - 2)*(x - x^3 + x^5 + x^8)^(1/3))/(x^2 + 2*x^4 + 2*x^7 + 2)^2,x)

[Out]

int(((2*x^4 + 5*x^7 - 2)*(x - x^3 + x^5 + x^8)^(1/3))/(x^2 + 2*x^4 + 2*x^7 + 2)^2, x)