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

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

Optimal result

Integrand size = 29, antiderivative size = 165 \[ \int \frac {(-3+2 x) \sqrt [3]{-1+x+x^3}}{x^2 \left (2-2 x+x^3\right )} \, dx=\frac {3 \sqrt [3]{-1+x+x^3}}{2 x}+\frac {3^{5/6} \arctan \left (\frac {3^{5/6} x}{\sqrt [3]{3} x+2 \sqrt [3]{2} \sqrt [3]{-1+x+x^3}}\right )}{2 \sqrt [3]{2}}+\frac {1}{2} \sqrt [3]{\frac {3}{2}} \log \left (-3 x+\sqrt [3]{2} 3^{2/3} \sqrt [3]{-1+x+x^3}\right )-\frac {1}{4} \sqrt [3]{\frac {3}{2}} \log \left (3 x^2+\sqrt [3]{2} 3^{2/3} x \sqrt [3]{-1+x+x^3}+2^{2/3} \sqrt [3]{3} \left (-1+x+x^3\right )^{2/3}\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

(-9*(-1 + x + x^3)^(1/3)*Defer[Int][(((2*(3/(9 + Sqrt[93]))^(1/3) - (2*(9 + Sqrt[93]))^(1/3))/6^(2/3) + x)^(1/
3)*((6 + 6*3^(1/3)*(2/(9 + Sqrt[93]))^(2/3) + 2^(1/3)*(3*(9 + Sqrt[93]))^(2/3))/18 - (((6/(9 + Sqrt[93]))^(1/3
) - ((9 + Sqrt[93])/2)^(1/3))*x)/3^(2/3) + x^2)^(1/3))/x^2, x])/(2^(1/3)*(6^(1/3)*(2*(3/(9 + Sqrt[93]))^(1/3)
- (2*(9 + Sqrt[93]))^(1/3)) + 6*x)^(1/3)*(6 + 6*3^(1/3)*(2/(9 + Sqrt[93]))^(2/3) + 2^(1/3)*(3*(9 + Sqrt[93]))^
(2/3) - 6*3^(1/3)*((6/(9 + Sqrt[93]))^(1/3) - ((9 + Sqrt[93])/2)^(1/3))*x + 18*x^2)^(1/3)) - (3*(-1 + x + x^3)
^(1/3)*Defer[Int][(((2*(3/(9 + Sqrt[93]))^(1/3) - (2*(9 + Sqrt[93]))^(1/3))/6^(2/3) + x)^(1/3)*((6 + 6*3^(1/3)
*(2/(9 + Sqrt[93]))^(2/3) + 2^(1/3)*(3*(9 + Sqrt[93]))^(2/3))/18 - (((6/(9 + Sqrt[93]))^(1/3) - ((9 + Sqrt[93]
)/2)^(1/3))*x)/3^(2/3) + x^2)^(1/3))/x, x])/(2^(1/3)*(6^(1/3)*(2*(3/(9 + Sqrt[93]))^(1/3) - (2*(9 + Sqrt[93]))
^(1/3)) + 6*x)^(1/3)*(6 + 6*3^(1/3)*(2/(9 + Sqrt[93]))^(2/3) + 2^(1/3)*(3*(9 + Sqrt[93]))^(2/3) - 6*3^(1/3)*((
6/(9 + Sqrt[93]))^(1/3) - ((9 + Sqrt[93])/2)^(1/3))*x + 18*x^2)^(1/3)) - Defer[Int][(-1 + x + x^3)^(1/3)/(2 -
2*x + x^3), x] + (3*Defer[Int][(x*(-1 + x + x^3)^(1/3))/(2 - 2*x + x^3), x])/2 + Defer[Int][(x^2*(-1 + x + x^3
)^(1/3))/(2 - 2*x + x^3), x]/2

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {3 \sqrt [3]{-1+x+x^3}}{2 x^2}-\frac {\sqrt [3]{-1+x+x^3}}{2 x}+\frac {\left (-2+3 x+x^2\right ) \sqrt [3]{-1+x+x^3}}{2 \left (2-2 x+x^3\right )}\right ) \, dx \\ & = -\left (\frac {1}{2} \int \frac {\sqrt [3]{-1+x+x^3}}{x} \, dx\right )+\frac {1}{2} \int \frac {\left (-2+3 x+x^2\right ) \sqrt [3]{-1+x+x^3}}{2-2 x+x^3} \, dx-\frac {3}{2} \int \frac {\sqrt [3]{-1+x+x^3}}{x^2} \, dx \\ & = \frac {1}{2} \int \left (-\frac {2 \sqrt [3]{-1+x+x^3}}{2-2 x+x^3}+\frac {3 x \sqrt [3]{-1+x+x^3}}{2-2 x+x^3}+\frac {x^2 \sqrt [3]{-1+x+x^3}}{2-2 x+x^3}\right ) \, dx-\frac {\sqrt [3]{-1+x+x^3} \int \frac {\sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}{x} \, dx}{2 \sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}-\frac {\left (3 \sqrt [3]{-1+x+x^3}\right ) \int \frac {\sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}{x^2} \, dx}{2 \sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}} \\ & = \frac {1}{2} \int \frac {x^2 \sqrt [3]{-1+x+x^3}}{2-2 x+x^3} \, dx+\frac {3}{2} \int \frac {x \sqrt [3]{-1+x+x^3}}{2-2 x+x^3} \, dx-\frac {\sqrt [3]{-1+x+x^3} \int \frac {\sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}{x} \, dx}{2 \sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}-\frac {\left (3 \sqrt [3]{-1+x+x^3}\right ) \int \frac {\sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}{x^2} \, dx}{2 \sqrt [3]{\frac {2 \sqrt [3]{\frac {3}{9+\sqrt {93}}}-\sqrt [3]{2 \left (9+\sqrt {93}\right )}}{6^{2/3}}+x} \sqrt [3]{\frac {1}{18} \left (6+6 \sqrt [3]{3} \left (\frac {2}{9+\sqrt {93}}\right )^{2/3}+\sqrt [3]{2} \left (3 \left (9+\sqrt {93}\right )\right )^{2/3}\right )-\frac {\left (\sqrt [3]{\frac {6}{9+\sqrt {93}}}-\sqrt [3]{\frac {1}{2} \left (9+\sqrt {93}\right )}\right ) x}{3^{2/3}}+x^2}}-\int \frac {\sqrt [3]{-1+x+x^3}}{2-2 x+x^3} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00 \[ \int \frac {(-3+2 x) \sqrt [3]{-1+x+x^3}}{x^2 \left (2-2 x+x^3\right )} \, dx=\frac {3 \sqrt [3]{-1+x+x^3}}{2 x}+\frac {3^{5/6} \arctan \left (\frac {3^{5/6} x}{\sqrt [3]{3} x+2 \sqrt [3]{2} \sqrt [3]{-1+x+x^3}}\right )}{2 \sqrt [3]{2}}+\frac {1}{2} \sqrt [3]{\frac {3}{2}} \log \left (-3 x+\sqrt [3]{2} 3^{2/3} \sqrt [3]{-1+x+x^3}\right )-\frac {1}{4} \sqrt [3]{\frac {3}{2}} \log \left (3 x^2+\sqrt [3]{2} 3^{2/3} x \sqrt [3]{-1+x+x^3}+2^{2/3} \sqrt [3]{3} \left (-1+x+x^3\right )^{2/3}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 15.72 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.92

method result size
pseudoelliptic \(\frac {-2 \,2^{\frac {2}{3}} 3^{\frac {5}{6}} \arctan \left (\frac {\sqrt {3}\, \left (2 \,2^{\frac {1}{3}} 3^{\frac {2}{3}} \left (x^{3}+x -1\right )^{\frac {1}{3}}+3 x \right )}{9 x}\right ) x -2^{\frac {2}{3}} 3^{\frac {1}{3}} x \ln \left (2\right )+2 \,2^{\frac {2}{3}} 3^{\frac {1}{3}} x \ln \left (\frac {-2^{\frac {2}{3}} 3^{\frac {1}{3}} x +2 \left (x^{3}+x -1\right )^{\frac {1}{3}}}{x}\right )-2^{\frac {2}{3}} 3^{\frac {1}{3}} x \ln \left (\frac {2^{\frac {1}{3}} 3^{\frac {2}{3}} x^{2}+2^{\frac {2}{3}} 3^{\frac {1}{3}} \left (x^{3}+x -1\right )^{\frac {1}{3}} x +2 \left (x^{3}+x -1\right )^{\frac {2}{3}}}{x^{2}}\right )+12 \left (x^{3}+x -1\right )^{\frac {1}{3}}}{8 x}\) \(151\)
trager \(\text {Expression too large to display}\) \(848\)
risch \(\text {Expression too large to display}\) \(2200\)

[In]

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

[Out]

1/8*(-2*2^(2/3)*3^(5/6)*arctan(1/9*3^(1/2)*(2*2^(1/3)*3^(2/3)*(x^3+x-1)^(1/3)+3*x)/x)*x-2^(2/3)*3^(1/3)*x*ln(2
)+2*2^(2/3)*3^(1/3)*x*ln((-2^(2/3)*3^(1/3)*x+2*(x^3+x-1)^(1/3))/x)-2^(2/3)*3^(1/3)*x*ln((2^(1/3)*3^(2/3)*x^2+2
^(2/3)*3^(1/3)*(x^3+x-1)^(1/3)*x+2*(x^3+x-1)^(2/3))/x^2)+12*(x^3+x-1)^(1/3))/x

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (123) = 246\).

Time = 8.29 (sec) , antiderivative size = 406, normalized size of antiderivative = 2.46 \[ \int \frac {(-3+2 x) \sqrt [3]{-1+x+x^3}}{x^2 \left (2-2 x+x^3\right )} \, dx=\frac {2 \cdot 3^{\frac {5}{6}} 2^{\frac {2}{3}} x \arctan \left (\frac {\sqrt {3} 2^{\frac {1}{6}} {\left (24 \cdot 3^{\frac {1}{3}} \sqrt {2} {\left (4 \, x^{7} - 7 \, x^{5} + 7 \, x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x\right )} {\left (x^{3} + x - 1\right )}^{\frac {2}{3}} - 12 \cdot 3^{\frac {2}{3}} 2^{\frac {1}{6}} {\left (55 \, x^{8} + 50 \, x^{6} - 50 \, x^{5} + 4 \, x^{4} - 8 \, x^{3} + 4 \, x^{2}\right )} {\left (x^{3} + x - 1\right )}^{\frac {1}{3}} - 2^{\frac {5}{6}} {\left (377 \, x^{9} + 600 \, x^{7} - 600 \, x^{6} + 204 \, x^{5} - 408 \, x^{4} + 212 \, x^{3} - 24 \, x^{2} + 24 \, x - 8\right )}\right )}}{6 \, {\left (487 \, x^{9} + 480 \, x^{7} - 480 \, x^{6} + 12 \, x^{5} - 24 \, x^{4} + 4 \, x^{3} + 24 \, x^{2} - 24 \, x + 8\right )}}\right ) + 2 \cdot 3^{\frac {1}{3}} 2^{\frac {2}{3}} x \log \left (-\frac {9 \cdot 3^{\frac {1}{3}} 2^{\frac {2}{3}} {\left (x^{3} + x - 1\right )}^{\frac {1}{3}} x^{2} - 3^{\frac {2}{3}} 2^{\frac {1}{3}} {\left (x^{3} - 2 \, x + 2\right )} - 18 \, {\left (x^{3} + x - 1\right )}^{\frac {2}{3}} x}{x^{3} - 2 \, x + 2}\right ) - 3^{\frac {1}{3}} 2^{\frac {2}{3}} x \log \left (\frac {12 \cdot 3^{\frac {2}{3}} 2^{\frac {1}{3}} {\left (4 \, x^{4} + x^{2} - x\right )} {\left (x^{3} + x - 1\right )}^{\frac {2}{3}} + 3^{\frac {1}{3}} 2^{\frac {2}{3}} {\left (55 \, x^{6} + 50 \, x^{4} - 50 \, x^{3} + 4 \, x^{2} - 8 \, x + 4\right )} + 18 \, {\left (7 \, x^{5} + 4 \, x^{3} - 4 \, x^{2}\right )} {\left (x^{3} + x - 1\right )}^{\frac {1}{3}}}{x^{6} - 4 \, x^{4} + 4 \, x^{3} + 4 \, x^{2} - 8 \, x + 4}\right ) + 36 \, {\left (x^{3} + x - 1\right )}^{\frac {1}{3}}}{24 \, x} \]

[In]

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

[Out]

1/24*(2*3^(5/6)*2^(2/3)*x*arctan(1/6*sqrt(3)*2^(1/6)*(24*3^(1/3)*sqrt(2)*(4*x^7 - 7*x^5 + 7*x^4 - 2*x^3 + 4*x^
2 - 2*x)*(x^3 + x - 1)^(2/3) - 12*3^(2/3)*2^(1/6)*(55*x^8 + 50*x^6 - 50*x^5 + 4*x^4 - 8*x^3 + 4*x^2)*(x^3 + x
- 1)^(1/3) - 2^(5/6)*(377*x^9 + 600*x^7 - 600*x^6 + 204*x^5 - 408*x^4 + 212*x^3 - 24*x^2 + 24*x - 8))/(487*x^9
 + 480*x^7 - 480*x^6 + 12*x^5 - 24*x^4 + 4*x^3 + 24*x^2 - 24*x + 8)) + 2*3^(1/3)*2^(2/3)*x*log(-(9*3^(1/3)*2^(
2/3)*(x^3 + x - 1)^(1/3)*x^2 - 3^(2/3)*2^(1/3)*(x^3 - 2*x + 2) - 18*(x^3 + x - 1)^(2/3)*x)/(x^3 - 2*x + 2)) -
3^(1/3)*2^(2/3)*x*log((12*3^(2/3)*2^(1/3)*(4*x^4 + x^2 - x)*(x^3 + x - 1)^(2/3) + 3^(1/3)*2^(2/3)*(55*x^6 + 50
*x^4 - 50*x^3 + 4*x^2 - 8*x + 4) + 18*(7*x^5 + 4*x^3 - 4*x^2)*(x^3 + x - 1)^(1/3))/(x^6 - 4*x^4 + 4*x^3 + 4*x^
2 - 8*x + 4)) + 36*(x^3 + x - 1)^(1/3))/x

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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