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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-5+x}{\sqrt [3]{-2-x+x^2} \left (-3+4 x+x^2\right )} \, dx \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [C] (warning: unable to verify)

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

Time = 7.75 (sec) , antiderivative size = 943, normalized size of antiderivative = 5.51

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

[In]

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

[Out]

RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*ln(-(356*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^
2)^2*RootOf(_Z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^
2*RootOf(_Z^3-2)^2*x-890*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)^3*x-1500*(x^2-x-2)
^(2/3)*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)^2-1746*(x^2-x-2)^(1/3)*RootOf(RootOf
(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)*x-750*(x^2-x-2)^(1/3)*RootOf(_Z^3-2)^2*x-1746*(x^2-x-2)^
(1/3)*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)+240*RootOf(RootOf(_Z^3-2)^2+2*_Z*Root
Of(_Z^3-2)+4*_Z^2)*x^2-750*(x^2-x-2)^(1/3)*RootOf(_Z^3-2)^2-445*RootOf(_Z^3-2)*x^2+96*RootOf(RootOf(_Z^3-2)^2+
2*_Z*RootOf(_Z^3-2)+4*_Z^2)*x-178*RootOf(_Z^3-2)*x+246*(x^2-x-2)^(2/3)+1008*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootO
f(_Z^3-2)+4*_Z^2)-1869*RootOf(_Z^3-2))/(x^2+4*x-3))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 300 vs. \(2 (133) = 266\).

Time = 4.35 (sec) , antiderivative size = 300, normalized size of antiderivative = 1.75 \[ \int \frac {-5+x}{\sqrt [3]{-2-x+x^2} \left (-3+4 x+x^2\right )} \, dx=-\frac {1}{6} \cdot 4^{\frac {1}{6}} \sqrt {3} \arctan \left (\frac {4^{\frac {1}{6}} \sqrt {3} {\left (12 \cdot 4^{\frac {2}{3}} {\left (x^{4} + 5 \, x^{3} + 4 \, x^{2} + 9 \, x - 9\right )} {\left (x^{2} - x - 2\right )}^{\frac {2}{3}} + 4^{\frac {1}{3}} {\left (x^{6} + 30 \, x^{5} + 3 \, x^{4} + 100 \, x^{3} - 45 \, x^{2} - 306 \, x - 351\right )} + 12 \, {\left (x^{5} - 9 \, x^{4} + 40 \, x^{2} + 75 \, x + 45\right )} {\left (x^{2} - x - 2\right )}^{\frac {1}{3}}\right )}}{6 \, {\left (x^{6} - 42 \, x^{5} - 69 \, x^{4} + 100 \, x^{3} + 315 \, x^{2} + 486 \, x + 81\right )}}\right ) - \frac {1}{24} \cdot 4^{\frac {2}{3}} \log \left (\frac {6 \cdot 4^{\frac {2}{3}} {\left (x^{2} + x + 3\right )} {\left (x^{2} - x - 2\right )}^{\frac {2}{3}} + 4^{\frac {1}{3}} {\left (x^{4} - 10 \, x^{3} + 10 \, x^{2} + 30 \, x + 45\right )} - 6 \, {\left (x^{3} - x^{2} + 7 \, x + 9\right )} {\left (x^{2} - x - 2\right )}^{\frac {1}{3}}}{x^{4} + 8 \, x^{3} + 10 \, x^{2} - 24 \, x + 9}\right ) + \frac {1}{12} \cdot 4^{\frac {2}{3}} \log \left (\frac {4^{\frac {2}{3}} {\left (x^{2} + 4 \, x - 3\right )} + 6 \cdot 4^{\frac {1}{3}} {\left (x^{2} - x - 2\right )}^{\frac {1}{3}} {\left (x + 1\right )} + 12 \, {\left (x^{2} - x - 2\right )}^{\frac {2}{3}}}{x^{2} + 4 \, x - 3}\right ) \]

[In]

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

[Out]

-1/6*4^(1/6)*sqrt(3)*arctan(1/6*4^(1/6)*sqrt(3)*(12*4^(2/3)*(x^4 + 5*x^3 + 4*x^2 + 9*x - 9)*(x^2 - x - 2)^(2/3
) + 4^(1/3)*(x^6 + 30*x^5 + 3*x^4 + 100*x^3 - 45*x^2 - 306*x - 351) + 12*(x^5 - 9*x^4 + 40*x^2 + 75*x + 45)*(x
^2 - x - 2)^(1/3))/(x^6 - 42*x^5 - 69*x^4 + 100*x^3 + 315*x^2 + 486*x + 81)) - 1/24*4^(2/3)*log((6*4^(2/3)*(x^
2 + x + 3)*(x^2 - x - 2)^(2/3) + 4^(1/3)*(x^4 - 10*x^3 + 10*x^2 + 30*x + 45) - 6*(x^3 - x^2 + 7*x + 9)*(x^2 -
x - 2)^(1/3))/(x^4 + 8*x^3 + 10*x^2 - 24*x + 9)) + 1/12*4^(2/3)*log((4^(2/3)*(x^2 + 4*x - 3) + 6*4^(1/3)*(x^2
- x - 2)^(1/3)*(x + 1) + 12*(x^2 - x - 2)^(2/3))/(x^2 + 4*x - 3))

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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