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

Optimal result
Mathematica [A] (verified)
Rubi [B] (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 = 29, antiderivative size = 103 \[ \int \frac {1-x^2}{\left (1-x+x^2\right ) \left (1-x^3\right )^{2/3}} \, dx=\frac {\sqrt {3} \arctan \left (\frac {1-\frac {2 \sqrt [3]{2} (1-x)}{\sqrt [3]{1-x^3}}}{\sqrt {3}}\right )}{2^{2/3}}-\frac {\log \left (1+2 (1-x)^3-x^3\right )}{2\ 2^{2/3}}+\frac {3 \log \left (\sqrt [3]{2} (1-x)+\sqrt [3]{1-x^3}\right )}{2\ 2^{2/3}} \] Output:

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

Mathematica [A] (verified)

Time = 1.67 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.76 \[ \int \frac {1-x^2}{\left (1-x+x^2\right ) \left (1-x^3\right )^{2/3}} \, dx=-\frac {2 \sqrt {3} \arctan \left (\frac {\sqrt {3} \left (1-x^3\right )^{2/3}}{2^{2/3}+2^{2/3} x+2^{2/3} x^2-\left (1-x^3\right )^{2/3}}\right )-2 \log \left (2^{2/3}+2^{2/3} x+2^{2/3} x^2+2 \left (1-x^3\right )^{2/3}\right )+\log \left (-\left (\left (1+x+x^2\right ) \left (\sqrt [3]{2}+\sqrt [3]{2} x^2-\left (2-2 x^3\right )^{2/3}+2 \sqrt [3]{1-x^3}+x \left (\sqrt [3]{2}-2 \sqrt [3]{1-x^3}\right )\right )\right )\right )}{2\ 2^{2/3}} \] Input:

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

Output:

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(425\) vs. \(2(103)=206\).

Time = 1.52 (sec) , antiderivative size = 425, normalized size of antiderivative = 4.13, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, 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-x^2}{\left (x^2-x+1\right ) \left (1-x^3\right )^{2/3}} \, dx\)

\(\Big \downarrow \) 2583

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(2^(1/3)*ArcTan[(1 - (2*2^(1/3)*(1 - x))/(1 - x^3)^(1/3))/Sqrt[3]])/Sqrt[3 
] + ArcTan[(1 + (2^(1/3)*(1 - x))/(1 - x^3)^(1/3))/Sqrt[3]]/(2^(2/3)*Sqrt[ 
3]) - ArcTan[(1 - (2*2^(1/3)*x)/(1 - x^3)^(1/3))/Sqrt[3]]/(2^(2/3)*Sqrt[3] 
) + ArcTan[(1 + 2^(2/3)*(1 - x^3)^(1/3))/Sqrt[3]]/(2^(2/3)*Sqrt[3]) + Log[ 
1 + x^3]/(3*2^(2/3)) + Log[2^(2/3) - (1 - x)/(1 - x^3)^(1/3)]/(3*2^(2/3)) 
- Log[1 + (2^(2/3)*(1 - x)^2)/(1 - x^3)^(2/3) - (2^(1/3)*(1 - x))/(1 - x^3 
)^(1/3)]/(3*2^(2/3)) + (2^(1/3)*Log[1 + (2^(1/3)*(1 - x))/(1 - x^3)^(1/3)] 
)/3 - Log[2*2^(1/3) + (1 - x)^2/(1 - x^3)^(2/3) + (2^(2/3)*(1 - x))/(1 - x 
^3)^(1/3)]/(6*2^(2/3)) - Log[2^(1/3) - (1 - x^3)^(1/3)]/(2*2^(2/3)) - Log[ 
-(2^(1/3)*x) - (1 - x^3)^(1/3)]/(2*2^(2/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 = 6.76 (sec) , antiderivative size = 1026, normalized size of antiderivative = 9.96

method result size
trager \(\text {Expression too large to display}\) \(1026\)

Input:

int((-x^2+1)/(x^2-x+1)/(-x^3+1)^(2/3),x,method=_RETURNVERBOSE)
 

Output:

-1/2*ln((4*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)^2*RootOf(_Z 
^3-2)^3*x+2*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^ 
3-2)^4*x+2*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3 
-2)^2*(-x^3+1)^(2/3)-2*RootOf(RootO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Of(_Z^3-2)*ln(-(4*RootOf(RootOf(_Z^3-2)^2+ 
2*_Z*RootOf(_Z^3-2)+4*_Z^2)^2*RootOf(_Z^3-2)^3*x+2*RootOf(RootOf(_Z^3-2)^2 
+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)^4*x+2*RootOf(RootOf(_Z^3-2)...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 289 vs. \(2 (78) = 156\).

Time = 2.68 (sec) , antiderivative size = 289, normalized size of antiderivative = 2.81 \[ \int \frac {1-x^2}{\left (1-x+x^2\right ) \left (1-x^3\right )^{2/3}} \, dx=-\frac {1}{6} \cdot 4^{\frac {1}{6}} \sqrt {3} \arctan \left (\frac {4^{\frac {1}{6}} \sqrt {3} {\left (2 \cdot 4^{\frac {2}{3}} {\left (x^{5} - x^{4} - 3 \, x^{3} + 3 \, x^{2} + x - 1\right )} {\left (-x^{3} + 1\right )}^{\frac {1}{3}} + 4 \, {\left (x^{4} - 4 \, x^{3} + 5 \, x^{2} - 4 \, x + 1\right )} {\left (-x^{3} + 1\right )}^{\frac {2}{3}} + 4^{\frac {1}{3}} {\left (x^{6} - 7 \, x^{5} + 10 \, x^{4} - 7 \, x^{3} + 10 \, x^{2} - 7 \, x + 1\right )}\right )}}{6 \, {\left (3 \, x^{6} - 9 \, x^{5} + 6 \, x^{4} - x^{3} + 6 \, x^{2} - 9 \, x + 3\right )}}\right ) - \frac {1}{24} \cdot 4^{\frac {2}{3}} \log \left (\frac {2 \cdot 4^{\frac {1}{3}} {\left (-x^{3} + 1\right )}^{\frac {2}{3}} {\left (x^{2} - 3 \, x + 1\right )} - 4^{\frac {2}{3}} {\left (x^{4} - 3 \, x^{2} + 1\right )} - 8 \, {\left (-x^{3} + 1\right )}^{\frac {1}{3}} {\left (x^{2} - x\right )}}{x^{4} - 2 \, x^{3} + 3 \, x^{2} - 2 \, x + 1}\right ) + \frac {1}{12} \cdot 4^{\frac {2}{3}} \log \left (-\frac {4^{\frac {2}{3}} {\left (-x^{3} + 1\right )}^{\frac {1}{3}} {\left (x - 1\right )} - 4^{\frac {1}{3}} {\left (x^{2} - x + 1\right )} - 2 \, {\left (-x^{3} + 1\right )}^{\frac {2}{3}}}{x^{2} - x + 1}\right ) \] Input:

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

Output:

-1/6*4^(1/6)*sqrt(3)*arctan(1/6*4^(1/6)*sqrt(3)*(2*4^(2/3)*(x^5 - x^4 - 3* 
x^3 + 3*x^2 + x - 1)*(-x^3 + 1)^(1/3) + 4*(x^4 - 4*x^3 + 5*x^2 - 4*x + 1)* 
(-x^3 + 1)^(2/3) + 4^(1/3)*(x^6 - 7*x^5 + 10*x^4 - 7*x^3 + 10*x^2 - 7*x + 
1))/(3*x^6 - 9*x^5 + 6*x^4 - x^3 + 6*x^2 - 9*x + 3)) - 1/24*4^(2/3)*log((2 
*4^(1/3)*(-x^3 + 1)^(2/3)*(x^2 - 3*x + 1) - 4^(2/3)*(x^4 - 3*x^2 + 1) - 8* 
(-x^3 + 1)^(1/3)*(x^2 - x))/(x^4 - 2*x^3 + 3*x^2 - 2*x + 1)) + 1/12*4^(2/3 
)*log(-(4^(2/3)*(-x^3 + 1)^(1/3)*(x - 1) - 4^(1/3)*(x^2 - x + 1) - 2*(-x^3 
 + 1)^(2/3))/(x^2 - x + 1))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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