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

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

Optimal result

Integrand size = 17, antiderivative size = 75 \[ \int \frac {1}{\sqrt [3]{9+3 x-5 x^2+x^3}} \, dx=\sqrt {3} \arctan \left (\frac {1+\frac {2 (-3+x)}{\sqrt [3]{9+3 x-5 x^2+x^3}}}{\sqrt {3}}\right )-\frac {1}{2} \log (1+x)-\frac {3}{2} \log \left (1-\frac {-3+x}{\sqrt [3]{9+3 x-5 x^2+x^3}}\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(188\) vs. \(2(75)=150\).

Time = 0.09 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.51, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2092, 2089, 62} \[ \int \frac {1}{\sqrt [3]{9+3 x-5 x^2+x^3}} \, dx=-\frac {(9-3 x)^{2/3} \sqrt [3]{x+1} \arctan \left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [3]{x+1}}{\sqrt [6]{3} \sqrt [3]{9-3 x}}\right )}{\sqrt [6]{3} \sqrt [3]{x^3-5 x^2+3 x+9}}-\frac {(9-3 x)^{2/3} \sqrt [3]{x+1} \log \left (-\frac {32}{3} (x-3)\right )}{2\ 3^{2/3} \sqrt [3]{x^3-5 x^2+3 x+9}}-\frac {\sqrt [3]{3} (9-3 x)^{2/3} \sqrt [3]{x+1} \log \left (\frac {\sqrt [3]{3} \sqrt [3]{x+1}}{\sqrt [3]{9-3 x}}+1\right )}{2 \sqrt [3]{x^3-5 x^2+3 x+9}} \]

[In]

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

[Out]

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

Rule 62

Int[1/(((a_.) + (b_.)*(x_))^(1/3)*((c_.) + (d_.)*(x_))^(2/3)), x_Symbol] :> With[{q = Rt[-d/b, 3]}, Simp[Sqrt[
3]*(q/d)*ArcTan[1/Sqrt[3] - 2*q*((a + b*x)^(1/3)/(Sqrt[3]*(c + d*x)^(1/3)))], x] + (Simp[3*(q/(2*d))*Log[q*((a
 + b*x)^(1/3)/(c + d*x)^(1/3)) + 1], x] + Simp[(q/(2*d))*Log[c + d*x], x])] /; FreeQ[{a, b, c, d}, x] && NeQ[b
*c - a*d, 0] && NegQ[d/b]

Rule 2089

Int[((a_.) + (b_.)*(x_) + (d_.)*(x_)^3)^(p_), x_Symbol] :> Dist[(a + b*x + d*x^3)^p/((3*a - b*x)^p*(3*a + 2*b*
x)^(2*p)), Int[(3*a - b*x)^p*(3*a + 2*b*x)^(2*p), x], x] /; FreeQ[{a, b, d, p}, x] && EqQ[4*b^3 + 27*a^2*d, 0]
 &&  !IntegerQ[p]

Rule 2092

Int[(P3_)^(p_), x_Symbol] :> With[{a = Coeff[P3, x, 0], b = Coeff[P3, x, 1], c = Coeff[P3, x, 2], d = Coeff[P3
, x, 3]}, Subst[Int[Simp[(2*c^3 - 9*b*c*d + 27*a*d^2)/(27*d^2) - (c^2 - 3*b*d)*(x/(3*d)) + d*x^3, x]^p, x], x,
 x + c/(3*d)] /; NeQ[c, 0]] /; FreeQ[p, x] && PolyQ[P3, x, 3]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\sqrt [3]{\frac {128}{27}-\frac {16 x}{3}+x^3}} \, dx,x,-\frac {5}{3}+x\right ) \\ & = \frac {\left (16\ 2^{2/3} (3-x)^{2/3} \sqrt [3]{1+x}\right ) \text {Subst}\left (\int \frac {1}{\left (\frac {128}{9}-\frac {32 x}{3}\right )^{2/3} \sqrt [3]{\frac {128}{9}+\frac {16 x}{3}}} \, dx,x,-\frac {5}{3}+x\right )}{3 \sqrt [3]{9+3 x-5 x^2+x^3}} \\ & = -\frac {\sqrt {3} (3-x)^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{3-x}}\right )}{\sqrt [3]{9+3 x-5 x^2+x^3}}-\frac {(3-x)^{2/3} \sqrt [3]{1+x} \log (3-x)}{2 \sqrt [3]{9+3 x-5 x^2+x^3}}-\frac {3 (3-x)^{2/3} \sqrt [3]{1+x} \log \left (\frac {\sqrt [3]{3-x}+\sqrt [3]{1+x}}{\sqrt [3]{3-x}}\right )}{2 \sqrt [3]{9+3 x-5 x^2+x^3}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [C] (verified)

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

Time = 0.57 (sec) , antiderivative size = 446, normalized size of antiderivative = 5.95

method result size
trager \(-\ln \left (-\frac {-16 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )^{2} x^{2}+27 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {2}{3}}+45 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}} x +48 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )^{2} x -24 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) x^{2}-216 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {2}{3}}-135 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}}+81 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}} x +156 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) x -9 x^{2}-243 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}}-252 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )+90 x -189}{-3+x}\right )+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \ln \left (\frac {4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )^{2} x^{2}+27 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {2}{3}}-72 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}} x -12 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )^{2} x +33 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) x^{2}+135 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {2}{3}}+216 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}}+81 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}} x -78 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right ) x -180 x^{2}-243 \left (x^{3}-5 x^{2}+3 x +9\right )^{\frac {1}{3}}-63 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3 \textit {\_Z} +9\right )+792 x -756}{-3+x}\right )}{3}\) \(446\)

[In]

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

[Out]

-ln(-(-16*RootOf(_Z^2-3*_Z+9)^2*x^2+27*RootOf(_Z^2-3*_Z+9)*(x^3-5*x^2+3*x+9)^(2/3)+45*RootOf(_Z^2-3*_Z+9)*(x^3
-5*x^2+3*x+9)^(1/3)*x+48*RootOf(_Z^2-3*_Z+9)^2*x-24*RootOf(_Z^2-3*_Z+9)*x^2-216*(x^3-5*x^2+3*x+9)^(2/3)-135*Ro
otOf(_Z^2-3*_Z+9)*(x^3-5*x^2+3*x+9)^(1/3)+81*(x^3-5*x^2+3*x+9)^(1/3)*x+156*RootOf(_Z^2-3*_Z+9)*x-9*x^2-243*(x^
3-5*x^2+3*x+9)^(1/3)-252*RootOf(_Z^2-3*_Z+9)+90*x-189)/(-3+x))+1/3*RootOf(_Z^2-3*_Z+9)*ln((4*RootOf(_Z^2-3*_Z+
9)^2*x^2+27*RootOf(_Z^2-3*_Z+9)*(x^3-5*x^2+3*x+9)^(2/3)-72*RootOf(_Z^2-3*_Z+9)*(x^3-5*x^2+3*x+9)^(1/3)*x-12*Ro
otOf(_Z^2-3*_Z+9)^2*x+33*RootOf(_Z^2-3*_Z+9)*x^2+135*(x^3-5*x^2+3*x+9)^(2/3)+216*RootOf(_Z^2-3*_Z+9)*(x^3-5*x^
2+3*x+9)^(1/3)+81*(x^3-5*x^2+3*x+9)^(1/3)*x-78*RootOf(_Z^2-3*_Z+9)*x-180*x^2-243*(x^3-5*x^2+3*x+9)^(1/3)-63*Ro
otOf(_Z^2-3*_Z+9)+792*x-756)/(-3+x))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.71 \[ \int \frac {1}{\sqrt [3]{9+3 x-5 x^2+x^3}} \, dx=-\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (x - 3\right )} + 2 \, \sqrt {3} {\left (x^{3} - 5 \, x^{2} + 3 \, x + 9\right )}^{\frac {1}{3}}}{3 \, {\left (x - 3\right )}}\right ) + \frac {1}{2} \, \log \left (\frac {x^{2} + {\left (x^{3} - 5 \, x^{2} + 3 \, x + 9\right )}^{\frac {1}{3}} {\left (x - 3\right )} - 6 \, x + {\left (x^{3} - 5 \, x^{2} + 3 \, x + 9\right )}^{\frac {2}{3}} + 9}{x^{2} - 6 \, x + 9}\right ) - \log \left (-\frac {x - {\left (x^{3} - 5 \, x^{2} + 3 \, x + 9\right )}^{\frac {1}{3}} - 3}{x - 3}\right ) \]

[In]

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

[Out]

-sqrt(3)*arctan(1/3*(sqrt(3)*(x - 3) + 2*sqrt(3)*(x^3 - 5*x^2 + 3*x + 9)^(1/3))/(x - 3)) + 1/2*log((x^2 + (x^3
 - 5*x^2 + 3*x + 9)^(1/3)*(x - 3) - 6*x + (x^3 - 5*x^2 + 3*x + 9)^(2/3) + 9)/(x^2 - 6*x + 9)) - log(-(x - (x^3
 - 5*x^2 + 3*x + 9)^(1/3) - 3)/(x - 3))

Sympy [F]

\[ \int \frac {1}{\sqrt [3]{9+3 x-5 x^2+x^3}} \, dx=\int \frac {1}{\sqrt [3]{x^{3} - 5 x^{2} + 3 x + 9}}\, dx \]

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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