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

Optimal. Leaf size=225 \[ -\log \left (\sqrt [3]{x^3-x^2+x}-x\right )+\sqrt [3]{2} \log \left (2^{2/3} \sqrt [3]{x^3-x^2+x}-2 x\right )+\frac {1}{2} \log \left (x^2+\sqrt [3]{x^3-x^2+x} x+\left (x^3-x^2+x\right )^{2/3}\right )-\frac {\log \left (2 x^2+2^{2/3} \sqrt [3]{x^3-x^2+x} x+\sqrt [3]{2} \left (x^3-x^2+x\right )^{2/3}\right )}{2^{2/3}}-\sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{2 \sqrt [3]{x^3-x^2+x}+x}\right )+\sqrt [3]{2} \sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{2^{2/3} \sqrt [3]{x^3-x^2+x}+x}\right ) \]

________________________________________________________________________________________

Rubi [F]  time = 1.74, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {(-2+x) \sqrt [3]{x-x^2+x^3}}{(-1+x) \left (-1+x+x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

-(((x - x^2 + x^3)^(1/3)*Defer[Subst][Defer[Int][(1 - x^3 + x^6)^(1/3)/(-1 + x), x], x, x^(1/3)])/(x^(1/3)*(1
- x + x^2)^(1/3))) + ((1 - I*Sqrt[3])*(x - x^2 + x^3)^(1/3)*Defer[Subst][Defer[Int][(1 - x^3 + x^6)^(1/3)/(1 -
 I*Sqrt[3] + 2*x), x], x, x^(1/3)])/(x^(1/3)*(1 - x + x^2)^(1/3)) + ((1 + I*Sqrt[3])*(x - x^2 + x^3)^(1/3)*Def
er[Subst][Defer[Int][(1 - x^3 + x^6)^(1/3)/(1 + I*Sqrt[3] + 2*x), x], x, x^(1/3)])/(x^(1/3)*(1 - x + x^2)^(1/3
)) + (6*(x - x^2 + x^3)^(1/3)*Defer[Subst][Defer[Int][(1 - x^3 + x^6)^(1/3)/(1 - Sqrt[5] + 2*x^3), x], x, x^(1
/3)])/(x^(1/3)*(1 - x + x^2)^(1/3)) + (6*(x - x^2 + x^3)^(1/3)*Defer[Subst][Defer[Int][(1 - x^3 + x^6)^(1/3)/(
1 + Sqrt[5] + 2*x^3), x], x, x^(1/3)])/(x^(1/3)*(1 - x + x^2)^(1/3))

Rubi steps

\begin {align*} \int \frac {(-2+x) \sqrt [3]{x-x^2+x^3}}{(-1+x) \left (-1+x+x^2\right )} \, dx &=\frac {\sqrt [3]{x-x^2+x^3} \int \frac {(-2+x) \sqrt [3]{x} \sqrt [3]{1-x+x^2}}{(-1+x) \left (-1+x+x^2\right )} \, dx}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=\frac {\sqrt [3]{x-x^2+x^3} \int \frac {(-2+x) \sqrt [3]{x} \sqrt [3]{1-x+x^2}}{1-2 x+x^3} \, dx}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=\frac {\left (3 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {x^3 \left (-2+x^3\right ) \sqrt [3]{1-x^3+x^6}}{1-2 x^3+x^9} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=\frac {\left (3 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \left (-\frac {\sqrt [3]{1-x^3+x^6}}{3 (-1+x)}+\frac {(2+x) \sqrt [3]{1-x^3+x^6}}{3 \left (1+x+x^2\right )}+\frac {\left (1+2 x^3\right ) \sqrt [3]{1-x^3+x^6}}{-1+x^3+x^6}\right ) \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=-\frac {\sqrt [3]{x-x^2+x^3} \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{-1+x} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\sqrt [3]{x-x^2+x^3} \operatorname {Subst}\left (\int \frac {(2+x) \sqrt [3]{1-x^3+x^6}}{1+x+x^2} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (3 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {\left (1+2 x^3\right ) \sqrt [3]{1-x^3+x^6}}{-1+x^3+x^6} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=-\frac {\sqrt [3]{x-x^2+x^3} \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{-1+x} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\sqrt [3]{x-x^2+x^3} \operatorname {Subst}\left (\int \left (\frac {\left (1-i \sqrt {3}\right ) \sqrt [3]{1-x^3+x^6}}{1-i \sqrt {3}+2 x}+\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{1-x^3+x^6}}{1+i \sqrt {3}+2 x}\right ) \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (3 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \left (\frac {2 \sqrt [3]{1-x^3+x^6}}{1-\sqrt {5}+2 x^3}+\frac {2 \sqrt [3]{1-x^3+x^6}}{1+\sqrt {5}+2 x^3}\right ) \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ &=-\frac {\sqrt [3]{x-x^2+x^3} \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{-1+x} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (6 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{1-\sqrt {5}+2 x^3} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (6 \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{1+\sqrt {5}+2 x^3} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (\left (1-i \sqrt {3}\right ) \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{1-i \sqrt {3}+2 x} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}+\frac {\left (\left (1+i \sqrt {3}\right ) \sqrt [3]{x-x^2+x^3}\right ) \operatorname {Subst}\left (\int \frac {\sqrt [3]{1-x^3+x^6}}{1+i \sqrt {3}+2 x} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1-x+x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]  time = 1.63, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(-2+x) \sqrt [3]{x-x^2+x^3}}{(-1+x) \left (-1+x+x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.59, size = 225, normalized size = 1.00 \begin {gather*} -\log \left (\sqrt [3]{x^3-x^2+x}-x\right )+\sqrt [3]{2} \log \left (2^{2/3} \sqrt [3]{x^3-x^2+x}-2 x\right )+\frac {1}{2} \log \left (x^2+\sqrt [3]{x^3-x^2+x} x+\left (x^3-x^2+x\right )^{2/3}\right )-\frac {\log \left (2 x^2+2^{2/3} \sqrt [3]{x^3-x^2+x} x+\sqrt [3]{2} \left (x^3-x^2+x\right )^{2/3}\right )}{2^{2/3}}-\sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{2 \sqrt [3]{x^3-x^2+x}+x}\right )+\sqrt [3]{2} \sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{2^{2/3} \sqrt [3]{x^3-x^2+x}+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (re
sidue poly has multiple non-linear factors)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (x^{3} - x^{2} + x\right )}^{\frac {1}{3}} {\left (x - 2\right )}}{{\left (x^{2} + x - 1\right )} {\left (x - 1\right )}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 10.95, size = 1645, normalized size = 7.31 \begin {gather*} \text {Expression too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

RootOf(_Z^3-2)*ln((19*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)^2*RootOf(_Z^3-2)^3*x^2+5*RootOf(_Z^3-2)^
4*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*x^2-76*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)^2*Roo
tOf(_Z^3-2)^3*x-20*RootOf(_Z^3-2)^4*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*x+76*RootOf(RootOf(_Z^3-2)
^2+_Z*RootOf(_Z^3-2)+_Z^2)^2*RootOf(_Z^3-2)^3+20*RootOf(_Z^3-2)^4*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z
^2)+513*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*RootOf(_Z^3-2)*x^2+135*RootOf(_Z^3-2)^2*x^2-582*(x^3-x
^2+x)^(1/3)*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*x-582*(x^3-x^2+x)^(1/3)*RootOf(_Z^3-2)*x-209*RootO
f(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*RootOf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^2)*RootOf(_Z^3-2)^2*ln((-RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)^2*RootOf(_Z^3-2)^4*x^2+4*
RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)^2*RootOf(_Z^3-2)^4*x-4*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-
2)+_Z^2)^2*RootOf(_Z^3-2)^4-2*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*RootOf(_Z^3-2)^2*x^2-66*RootOf(R
ootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*RootOf(_Z^3-2)^2*x+66*RootOf(RootOf(_Z^3-2)^2+_Z*RootOf(_Z^3-2)+_Z^2)*
RootOf(_Z^3-2)^2+444*(x^3-x^2+x)^(2/3)+444*x*(x^3-x^2+x)^(1/3)+440*x^2-280*x+280)/(-1+x))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (x^{3} - x^{2} + x\right )}^{\frac {1}{3}} {\left (x - 2\right )}}{{\left (x^{2} + x - 1\right )} {\left (x - 1\right )}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (x-2\right )\,{\left (x^3-x^2+x\right )}^{1/3}}{\left (x-1\right )\,\left (x^2+x-1\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt [3]{x \left (x^{2} - x + 1\right )} \left (x - 2\right )}{\left (x - 1\right ) \left (x^{2} + x - 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________