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]
\[ \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]
[Out]
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*}
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]
[Out]
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]
[Out]
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]
[Out]
\[ \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]
[Out]
\[ \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]
[Out]
\[ \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]
[Out]
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]
[Out]