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

Optimal result
Mathematica [F]
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 27, antiderivative size = 199 \[ \int \frac {(1-2 x) \left (1-x^3\right )^{2/3}}{\left (1-x+x^2\right )^2} \, dx=\frac {\left (1-x^3\right )^{2/3}}{1-x+x^2}-\frac {2 \arctan \left (\frac {1-\frac {2 x}{\sqrt [3]{1-x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {2^{2/3} \arctan \left (\frac {1-\frac {2 \sqrt [3]{2} x}{\sqrt [3]{1-x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {2^{2/3} \arctan \left (\frac {1+2^{2/3} \sqrt [3]{1-x^3}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\log \left (\sqrt [3]{2}-\sqrt [3]{1-x^3}\right )}{\sqrt [3]{2}}-\frac {\log \left (-\sqrt [3]{2} x-\sqrt [3]{1-x^3}\right )}{\sqrt [3]{2}}+\log \left (x+\sqrt [3]{1-x^3}\right ) \] Output:

(-x^3+1)^(2/3)/(x^2-x+1)+1/2*ln(2^(1/3)-(-x^3+1)^(1/3))*2^(2/3)-1/2*ln(-2^ 
(1/3)*x-(-x^3+1)^(1/3))*2^(2/3)+ln(x+(-x^3+1)^(1/3))-2/3*arctan(1/3*(1-2*x 
/(-x^3+1)^(1/3))*3^(1/2))*3^(1/2)+1/3*arctan(1/3*(1-2*2^(1/3)*x/(-x^3+1)^( 
1/3))*3^(1/2))*2^(2/3)*3^(1/2)+1/3*arctan(1/3*(1+2^(2/3)*(-x^3+1)^(1/3))*3 
^(1/2))*2^(2/3)*3^(1/2)
 

Mathematica [F]

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

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

Output:

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

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.26, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2583, 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 {(1-2 x) \left (1-x^3\right )^{2/3}}{\left (x^2-x+1\right )^2} \, dx\)

\(\Big \downarrow \) 2583

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \arctan \left (\frac {1-\frac {2 x}{\sqrt [3]{1-x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {2^{2/3} \arctan \left (\frac {1-\frac {2 \sqrt [3]{2} x}{\sqrt [3]{1-x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {2^{2/3} \arctan \left (\frac {2^{2/3} \sqrt [3]{1-x^3}+1}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\left (1-x^3\right )^{2/3} x}{x^3+1}+\frac {\left (1-x^3\right )^{2/3}}{x^3+1}+\frac {\log \left (\sqrt [3]{2}-\sqrt [3]{1-x^3}\right )}{\sqrt [3]{2}}-\frac {2}{3} 2^{2/3} \log \left (-\sqrt [3]{1-x^3}-\sqrt [3]{2} x\right )+\frac {\log \left (-\sqrt [3]{1-x^3}-\sqrt [3]{2} x\right )}{3 \sqrt [3]{2}}+\log \left (\sqrt [3]{1-x^3}+x\right )\)

Input:

Int[((1 - 2*x)*(1 - x^3)^(2/3))/(1 - x + x^2)^2,x]
 

Output:

(1 - x^3)^(2/3)/(1 + x^3) + (x*(1 - x^3)^(2/3))/(1 + x^3) - (2*ArcTan[(1 - 
 (2*x)/(1 - x^3)^(1/3))/Sqrt[3]])/Sqrt[3] + (2^(2/3)*ArcTan[(1 - (2*2^(1/3 
)*x)/(1 - x^3)^(1/3))/Sqrt[3]])/Sqrt[3] + (2^(2/3)*ArcTan[(1 + 2^(2/3)*(1 
- x^3)^(1/3))/Sqrt[3]])/Sqrt[3] + Log[2^(1/3) - (1 - x^3)^(1/3)]/2^(1/3) + 
 Log[-(2^(1/3)*x) - (1 - x^3)^(1/3)]/(3*2^(1/3)) - (2*2^(2/3)*Log[-(2^(1/3 
)*x) - (1 - x^3)^(1/3)])/3 + Log[x + (1 - x^3)^(1/3)]
 

Defintions of rubi rules used

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

rule 2583
Int[(Px_.)*((c_) + (d_.)*(x_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^3)^(p 
_.), x_Symbol] :> Simp[1/c^q   Int[ExpandIntegrand[(c^3 - d^3*x^3)^q*(a + b 
*x^3)^p, Px/(c - d*x)^q, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && Poly 
Q[Px, x] && EqQ[d^2 - c*e, 0] && ILtQ[q, 0] && RationalQ[p] && EqQ[Denomina 
tor[p], 3]
 
Maple [C] (warning: unable to verify)

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

Time = 24.92 (sec) , antiderivative size = 842, normalized size of antiderivative = 4.23

\[\text {Expression too large to display}\]

Input:

int((1-2*x)*(-x^3+1)^(2/3)/(x^2-x+1)^2,x)
 

Output:

-(x^3-1)/(x^2-x+1)/(-x^3+1)^(1/3)-2/3*RootOf(_Z^2-_Z+1)*ln(RootOf(_Z^2-_Z+ 
1)^2*x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)*RootOf(_Z^3-324+648*RootOf(_Z^2-_Z+1))*ln((6*RootOf(_Z^3-3 
24+648*RootOf(_Z^2-_Z+1))*RootOf(_Z^2-_Z+1)*x^2-(-x^3+1)^(1/3)*RootOf(_Z^3 
-324+648*RootOf(_Z^2-_Z+1))^2-6*RootOf(_Z^3-324+648*RootOf(_Z^2-_Z+1))*Roo 
tOf(_Z^2-_Z+1)*x-3*RootOf(_Z^3-324+648*RootOf(_Z^2-_Z+1))*x^2+54*(-x^3+1)^ 
(2/3)-6*RootOf(_Z^2-_Z+1)*RootOf(_Z^3-324+648*RootOf(_Z^2-_Z+1))+3*Root...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2155 vs. \(2 (163) = 326\).

Time = 1.68 (sec) , antiderivative size = 2155, normalized size of antiderivative = 10.83 \[ \int \frac {(1-2 x) \left (1-x^3\right )^{2/3}}{\left (1-x+x^2\right )^2} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/12*(8*sqrt(3)*(x^2 - x + 1)*arctan((4*sqrt(3)*(-x^3 + 1)^(1/3)*x^2 + 2* 
sqrt(3)*(-x^3 + 1)^(2/3)*x - sqrt(3)*(x^3 - 1))/(9*x^3 - 1)) + (-16/27)^(1 
/6)*(x^2 + sqrt(-3)*(x^2 - x + 1) - x + 1)*log(-(4*2^(2/3)*(15*x^6 - 200*x 
^5 + 5*x^4 + 216*x^3 + 157*x^2 + sqrt(-3)*(15*x^6 - 200*x^5 + 5*x^4 + 216* 
x^3 + 157*x^2 - 124*x - 42) - 124*x - 42) - 16*(31*x^4 + 107*x^3 - 243*x^2 
 + 3*sqrt(-1/3)*(23*x^4 - 85*x^3 - 57*x^2 + 104*x - 4) - 26*x + 50)*(-x^3 
+ 1)^(2/3) + (-x^3 + 1)^(1/3)*(27*(-16/27)^(5/6)*(4*x^5 + 69*x^4 - 58*x^3 
- 77*x^2 - sqrt(-3)*(4*x^5 + 69*x^4 - 58*x^3 - 77*x^2 + 12*x + 23) + 12*x 
+ 23) - 8*(-2)^(1/3)*(50*x^5 - 93*x^4 - 88*x^3 - 7*x^2 - sqrt(-3)*(50*x^5 
- 93*x^4 - 88*x^3 - 7*x^2 + 150*x - 31) + 150*x - 31)) + 4*(-16/27)^(1/6)* 
(131*x^6 - 48*x^5 - 381*x^4 - 152*x^3 + 267*x^2 + sqrt(-3)*(131*x^6 - 48*x 
^5 - 381*x^4 - 152*x^3 + 267*x^2 + 276*x - 112) + 276*x - 112))/(x^6 - 3*x 
^5 + 6*x^4 - 7*x^3 + 6*x^2 - 3*x + 1)) - (-16/27)^(1/6)*(x^2 + sqrt(-3)*(x 
^2 - x + 1) - x + 1)*log(-(4*2^(2/3)*(15*x^6 - 200*x^5 + 5*x^4 + 216*x^3 + 
 157*x^2 + sqrt(-3)*(15*x^6 - 200*x^5 + 5*x^4 + 216*x^3 + 157*x^2 - 124*x 
- 42) - 124*x - 42) - 16*(31*x^4 + 107*x^3 - 243*x^2 - 3*sqrt(-1/3)*(23*x^ 
4 - 85*x^3 - 57*x^2 + 104*x - 4) - 26*x + 50)*(-x^3 + 1)^(2/3) - (-x^3 + 1 
)^(1/3)*(27*(-16/27)^(5/6)*(4*x^5 + 69*x^4 - 58*x^3 - 77*x^2 - sqrt(-3)*(4 
*x^5 + 69*x^4 - 58*x^3 - 77*x^2 + 12*x + 23) + 12*x + 23) + 8*(-2)^(1/3)*( 
50*x^5 - 93*x^4 - 88*x^3 - 7*x^2 - sqrt(-3)*(50*x^5 - 93*x^4 - 88*x^3 -...
 

Sympy [F]

\[ \int \frac {(1-2 x) \left (1-x^3\right )^{2/3}}{\left (1-x+x^2\right )^2} \, dx=- \int \left (- \frac {\left (1 - x^{3}\right )^{\frac {2}{3}}}{x^{4} - 2 x^{3} + 3 x^{2} - 2 x + 1}\right )\, dx - \int \frac {2 x \left (1 - x^{3}\right )^{\frac {2}{3}}}{x^{4} - 2 x^{3} + 3 x^{2} - 2 x + 1}\, dx \] Input:

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

Output:

-Integral(-(1 - x**3)**(2/3)/(x**4 - 2*x**3 + 3*x**2 - 2*x + 1), x) - Inte 
gral(2*x*(1 - x**3)**(2/3)/(x**4 - 2*x**3 + 3*x**2 - 2*x + 1), x)
                                                                                    
                                                                                    
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

int(-((2*x - 1)*(1 - x^3)^(2/3))/(x^2 - x + 1)^2,x)
 

Output:

-int(((2*x - 1)*(1 - x^3)^(2/3))/(x^2 - x + 1)^2, x)
 

Reduce [F]

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

int((1-2*x)*(-x^3+1)^(2/3)/(x^2-x+1)^2,x)
 

Output:

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