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

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

Optimal result

Integrand size = 32, antiderivative size = 38 \[ \int \frac {\sqrt {-1+x^3} \left (2+x^3\right )}{x^2 \left (-2-4 x^2+2 x^3\right )} \, dx=\frac {\sqrt {-1+x^3}}{x}-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} x}{\sqrt {-1+x^3}}\right ) \]

[Out]

(x^3-1)^(1/2)/x-2^(1/2)*arctanh(2^(1/2)*x/(x^3-1)^(1/2))

Rubi [F]

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

[In]

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

[Out]

(3*Sqrt[-1 + x^3])/(1 - Sqrt[3] - x) + Sqrt[-1 + x^3]/x - (3*3^(1/4)*Sqrt[2 + Sqrt[3]]*(1 - x)*Sqrt[(1 + x + x
^2)/(1 - Sqrt[3] - x)^2]*EllipticE[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(2*Sqrt[-((1
- x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3]) + (Sqrt[2]*3^(3/4)*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2]*
EllipticF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*
Sqrt[-1 + x^3]) - 2*Defer[Int][Sqrt[-1 + x^3]/(-1 - 2*x^2 + x^3), x] + (3*Defer[Int][(x*Sqrt[-1 + x^3])/(-1 -
2*x^2 + x^3), x])/2

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {\sqrt {-1+x^3}}{x^2}+\frac {(-4+3 x) \sqrt {-1+x^3}}{2 \left (-1-2 x^2+x^3\right )}\right ) \, dx \\ & = \frac {1}{2} \int \frac {(-4+3 x) \sqrt {-1+x^3}}{-1-2 x^2+x^3} \, dx-\int \frac {\sqrt {-1+x^3}}{x^2} \, dx \\ & = \frac {\sqrt {-1+x^3}}{x}+\frac {1}{2} \int \left (-\frac {4 \sqrt {-1+x^3}}{-1-2 x^2+x^3}+\frac {3 x \sqrt {-1+x^3}}{-1-2 x^2+x^3}\right ) \, dx-\frac {3}{2} \int \frac {x}{\sqrt {-1+x^3}} \, dx \\ & = \frac {\sqrt {-1+x^3}}{x}+\frac {3}{2} \int \frac {1+\sqrt {3}-x}{\sqrt {-1+x^3}} \, dx+\frac {3}{2} \int \frac {x \sqrt {-1+x^3}}{-1-2 x^2+x^3} \, dx-2 \int \frac {\sqrt {-1+x^3}}{-1-2 x^2+x^3} \, dx-\frac {1}{2} \left (3 \left (1+\sqrt {3}\right )\right ) \int \frac {1}{\sqrt {-1+x^3}} \, dx \\ & = \frac {3 \sqrt {-1+x^3}}{1-\sqrt {3}-x}+\frac {\sqrt {-1+x^3}}{x}-\frac {3 \sqrt [4]{3} \sqrt {2+\sqrt {3}} (1-x) \sqrt {\frac {1+x+x^2}{\left (1-\sqrt {3}-x\right )^2}} E\left (\arcsin \left (\frac {1+\sqrt {3}-x}{1-\sqrt {3}-x}\right )|-7+4 \sqrt {3}\right )}{2 \sqrt {-\frac {1-x}{\left (1-\sqrt {3}-x\right )^2}} \sqrt {-1+x^3}}+\frac {\sqrt {2} 3^{3/4} (1-x) \sqrt {\frac {1+x+x^2}{\left (1-\sqrt {3}-x\right )^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {1+\sqrt {3}-x}{1-\sqrt {3}-x}\right ),-7+4 \sqrt {3}\right )}{\sqrt {-\frac {1-x}{\left (1-\sqrt {3}-x\right )^2}} \sqrt {-1+x^3}}+\frac {3}{2} \int \frac {x \sqrt {-1+x^3}}{-1-2 x^2+x^3} \, dx-2 \int \frac {\sqrt {-1+x^3}}{-1-2 x^2+x^3} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.64 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {-1+x^3} \left (2+x^3\right )}{x^2 \left (-2-4 x^2+2 x^3\right )} \, dx=\frac {\sqrt {-1+x^3}}{x}-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} x}{\sqrt {-1+x^3}}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 2.64 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.89

method result size
risch \(\frac {\sqrt {x^{3}-1}}{x}-\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{3}-1}\, \sqrt {2}}{2 x}\right )\) \(34\)
pseudoelliptic \(\frac {-\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{3}-1}\, \sqrt {2}}{2 x}\right ) x +\sqrt {x^{3}-1}}{x}\) \(35\)
default \(\frac {-2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{3}-1}\, \sqrt {2}}{2 x}\right ) x +2 \sqrt {x^{3}-1}}{2 x}\) \(38\)
trager \(\frac {\sqrt {x^{3}-1}}{x}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{3}+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{2}+4 \sqrt {x^{3}-1}\, x -\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )}{x^{3}-2 x^{2}-1}\right )}{2}\) \(76\)
elliptic \(\frac {\sqrt {x^{3}-1}}{x}+\frac {2 \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}+\frac {\sqrt {2}\, \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (\textit {\_Z}^{3}-2 \textit {\_Z}^{2}-1\right )}{\sum }\frac {\underline {\hspace {1.25 ex}}\alpha \left (-\underline {\hspace {1.25 ex}}\alpha ^{2}+\underline {\hspace {1.25 ex}}\alpha +1\right ) \left (-3-i \sqrt {3}\right ) \sqrt {\frac {x -1}{-3-i \sqrt {3}}}\, \sqrt {\frac {2 x +1-i \sqrt {3}}{3-i \sqrt {3}}}\, \sqrt {\frac {i \sqrt {3}+2 x +1}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, -\frac {3 \underline {\hspace {1.25 ex}}\alpha ^{2}}{4}+\frac {3 \underline {\hspace {1.25 ex}}\alpha }{4}+\frac {3}{4}-\frac {i \underline {\hspace {1.25 ex}}\alpha ^{2} \sqrt {3}}{4}+\frac {i \sqrt {3}\, \underline {\hspace {1.25 ex}}\alpha }{4}+\frac {i \sqrt {3}}{4}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}\right )}{2}\) \(306\)

[In]

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

[Out]

(x^3-1)^(1/2)/x-2^(1/2)*arctanh(1/2*(x^3-1)^(1/2)/x*2^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (30) = 60\).

Time = 0.33 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.61 \[ \int \frac {\sqrt {-1+x^3} \left (2+x^3\right )}{x^2 \left (-2-4 x^2+2 x^3\right )} \, dx=\frac {\sqrt {2} x \log \left (-\frac {x^{6} + 12 \, x^{5} + 4 \, x^{4} - 2 \, x^{3} - 4 \, \sqrt {2} {\left (x^{4} + 2 \, x^{3} - x\right )} \sqrt {x^{3} - 1} - 12 \, x^{2} + 1}{x^{6} - 4 \, x^{5} + 4 \, x^{4} - 2 \, x^{3} + 4 \, x^{2} + 1}\right ) + 4 \, \sqrt {x^{3} - 1}}{4 \, x} \]

[In]

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

[Out]

1/4*(sqrt(2)*x*log(-(x^6 + 12*x^5 + 4*x^4 - 2*x^3 - 4*sqrt(2)*(x^4 + 2*x^3 - x)*sqrt(x^3 - 1) - 12*x^2 + 1)/(x
^6 - 4*x^5 + 4*x^4 - 2*x^3 + 4*x^2 + 1)) + 4*sqrt(x^3 - 1))/x

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 5.85 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.47 \[ \int \frac {\sqrt {-1+x^3} \left (2+x^3\right )}{x^2 \left (-2-4 x^2+2 x^3\right )} \, dx=\frac {\sqrt {x^3-1}}{x}+\frac {\sqrt {2}\,\ln \left (\frac {2\,x^2+x^3-2\,\sqrt {2}\,x\,\sqrt {x^3-1}-1}{-8\,x^3+16\,x^2+8}\right )}{2} \]

[In]

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

[Out]

(x^3 - 1)^(1/2)/x + (2^(1/2)*log((2*x^2 + x^3 - 2*2^(1/2)*x*(x^3 - 1)^(1/2) - 1)/(16*x^2 - 8*x^3 + 8)))/2