Integrand size = 23, antiderivative size = 99 \[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {1}{6} \sqrt {3+2 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{6} \sqrt {-3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \]
[Out]
Time = 0.36 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.98, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {6860, 2160, 225, 2165, 212, 209} \[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} (1-x)}{\sqrt {x^3-1}}\right )}{2 \sqrt {3 \left (3+2 \sqrt {3}\right )}}-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {3}-3} (1-x)}{\sqrt {x^3-1}}\right )}{2 \sqrt {3 \left (2 \sqrt {3}-3\right )}} \]
[In]
[Out]
Rule 209
Rule 212
Rule 225
Rule 2160
Rule 2165
Rule 6860
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{\left (-2-2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}}+\frac {1}{\left (-2+2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}}\right ) \, dx \\ & = \int \frac {1}{\left (-2-2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}} \, dx+\int \frac {1}{\left (-2+2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}} \, dx \\ & = -\frac {\int \frac {96 \left (1-\sqrt {3}\right )-96 x}{\left (-2-2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}} \, dx}{192 \sqrt {3}}+\frac {\int \frac {96 \left (1+\sqrt {3}\right )-96 x}{\left (-2+2 \sqrt {3}+2 x\right ) \sqrt {-1+x^3}} \, dx}{192 \sqrt {3}} \\ & = -\frac {\text {Subst}\left (\int \frac {1}{1-\left (3-2 \sqrt {3}\right ) x^2} \, dx,x,\frac {1+\frac {2 \left (1-\sqrt {3}\right ) x}{-2+2 \sqrt {3}}}{\sqrt {-1+x^3}}\right )}{2 \sqrt {3}}+\frac {\text {Subst}\left (\int \frac {1}{1-\left (3+2 \sqrt {3}\right ) x^2} \, dx,x,\frac {1+\frac {2 \left (1+\sqrt {3}\right ) x}{-2-2 \sqrt {3}}}{\sqrt {-1+x^3}}\right )}{2 \sqrt {3}} \\ & = -\frac {\arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} (1-x)}{\sqrt {-1+x^3}}\right )}{2 \sqrt {3 \left (-3+2 \sqrt {3}\right )}}+\frac {\text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} (1-x)}{\sqrt {-1+x^3}}\right )}{2 \sqrt {3 \left (3+2 \sqrt {3}\right )}} \\ \end{align*}
Time = 1.28 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00 \[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {1}{6} \sqrt {3+2 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{6} \sqrt {-3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 6.24 (sec) , antiderivative size = 702, normalized size of antiderivative = 7.09
method | result | size |
default | \(\frac {\sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, -\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{2 \sqrt {x^{3}-1}}+\frac {i \sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, -\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{2 \sqrt {x^{3}-1}}-\frac {\sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{2 \sqrt {x^{3}-1}}-\frac {i \sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{2 \sqrt {x^{3}-1}}\) | \(702\) |
elliptic | \(\frac {\sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, -\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{2 \sqrt {x^{3}-1}}+\frac {i \sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, -\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{2 \sqrt {x^{3}-1}}-\frac {\sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{2 \sqrt {x^{3}-1}}-\frac {i \sqrt {\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{i \sqrt {3}+3}+\frac {i \sqrt {3}}{i \sqrt {3}+3}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x -1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{3}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{2 \sqrt {x^{3}-1}}\) | \(702\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 383 vs. \(2 (75) = 150\).
Time = 0.28 (sec) , antiderivative size = 383, normalized size of antiderivative = 3.87 \[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\frac {1}{24} \, \sqrt {2 \, \sqrt {3} - 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} + 2 \, \sqrt {x^{3} - 1} {\left (2 \, x^{2} + \sqrt {3} {\left (x^{2} + 2 \, x\right )} + 2 \, x + 2\right )} \sqrt {2 \, \sqrt {3} - 3} + 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) + \frac {1}{24} \, \sqrt {2 \, \sqrt {3} - 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} - 2 \, \sqrt {x^{3} - 1} {\left (2 \, x^{2} + \sqrt {3} {\left (x^{2} + 2 \, x\right )} + 2 \, x + 2\right )} \sqrt {2 \, \sqrt {3} - 3} + 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) - \frac {1}{24} \, \sqrt {-2 \, \sqrt {3} - 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} + 2 \, \sqrt {x^{3} - 1} {\left (2 \, x^{2} - \sqrt {3} {\left (x^{2} + 2 \, x\right )} + 2 \, x + 2\right )} \sqrt {-2 \, \sqrt {3} - 3} - 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) + \frac {1}{24} \, \sqrt {-2 \, \sqrt {3} - 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} - 2 \, \sqrt {x^{3} - 1} {\left (2 \, x^{2} - \sqrt {3} {\left (x^{2} + 2 \, x\right )} + 2 \, x + 2\right )} \sqrt {-2 \, \sqrt {3} - 3} - 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) \]
[In]
[Out]
\[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int \frac {x - 1}{\sqrt {\left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x^{2} - 2 x - 2\right )}\, dx \]
[In]
[Out]
\[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x - 1}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x - 1}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \]
[In]
[Out]
Time = 0.25 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.23 \[ \int \frac {-1+x}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\frac {\left (\Pi \left (\sqrt {3}\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right );\mathrm {asin}\left (\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )-\Pi \left (-\sqrt {3}\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right );\mathrm {asin}\left (\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\right )\,\sqrt {-\frac {x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\left (\sqrt {3}+1{}\mathrm {i}\right )}{2\,\sqrt {x^3+\left (-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-1\right )\,x+\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}} \]
[In]
[Out]