Integrand size = 29, antiderivative size = 111 \[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=-\frac {3 \left (-1+x^3\right )^{2/3}}{1+x+x^2}-\sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [3]{-1+x^3}}{-2+2 x+\sqrt [3]{-1+x^3}}\right )-\log \left (1-x+\sqrt [3]{-1+x^3}\right )+\frac {1}{2} \log \left (1-2 x+x^2+(-1+x) \sqrt [3]{-1+x^3}+\left (-1+x^3\right )^{2/3}\right ) \]
[Out]
Time = 0.14 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.06, number of steps used = 16, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.414, Rules used = {2182, 21, 197, 272, 53, 58, 632, 210, 31, 267, 294, 245} \[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\frac {\arctan \left (\frac {\frac {2 x}{\sqrt [3]{x^3-1}}+1}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\arctan \left (\frac {1-2 \sqrt [3]{x^3-1}}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {3 x}{\sqrt [3]{x^3-1}}+\frac {3}{\sqrt [3]{x^3-1}}-\frac {1}{2} \log \left (\sqrt [3]{x^3-1}+1\right )-\frac {1}{2} \log \left (\sqrt [3]{x^3-1}-x\right )+\frac {\log (x)}{2} \]
[In]
[Out]
Rule 21
Rule 31
Rule 53
Rule 58
Rule 197
Rule 210
Rule 245
Rule 267
Rule 272
Rule 294
Rule 632
Rule 2182
Rubi steps \begin{align*} \text {integral}= \int \left (-\frac {2}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}}+\frac {1}{x \left (1-x^3\right ) \sqrt [3]{-1+x^3}}+\frac {2 x^2}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}}-\frac {x^3}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}}\right ) \, dx \\ = -\left (2 \int \frac {1}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}} \, dx\right )+2 \int \frac {x^2}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}} \, dx+\int \frac {1}{x \left (1-x^3\right ) \sqrt [3]{-1+x^3}} \, dx-\int \frac {x^3}{\left (1-x^3\right ) \sqrt [3]{-1+x^3}} \, dx \\ = 2 \int \frac {1}{\left (-1+x^3\right )^{4/3}} \, dx-2 \int \frac {x^2}{\left (-1+x^3\right )^{4/3}} \, dx-\int \frac {1}{x \left (-1+x^3\right )^{4/3}} \, dx+\int \frac {x^3}{\left (-1+x^3\right )^{4/3}} \, dx \\ = \frac {2}{\sqrt [3]{-1+x^3}}-\frac {3 x}{\sqrt [3]{-1+x^3}}-\frac {1}{3} \text {Subst}\left (\int \frac {1}{(-1+x)^{4/3} x} \, dx,x,x^3\right )+\int \frac {1}{\sqrt [3]{-1+x^3}} \, dx \\ = \frac {3}{\sqrt [3]{-1+x^3}}-\frac {3 x}{\sqrt [3]{-1+x^3}}+\frac {\arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{-1+x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{2} \log \left (-x+\sqrt [3]{-1+x^3}\right )+\frac {1}{3} \text {Subst}\left (\int \frac {1}{\sqrt [3]{-1+x} x} \, dx,x,x^3\right ) \\ = \frac {3}{\sqrt [3]{-1+x^3}}-\frac {3 x}{\sqrt [3]{-1+x^3}}+\frac {\arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{-1+x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\log (x)}{2}-\frac {1}{2} \log \left (-x+\sqrt [3]{-1+x^3}\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x} \, dx,x,\sqrt [3]{-1+x^3}\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\sqrt [3]{-1+x^3}\right ) \\ = \frac {3}{\sqrt [3]{-1+x^3}}-\frac {3 x}{\sqrt [3]{-1+x^3}}+\frac {\arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{-1+x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\log (x)}{2}-\frac {1}{2} \log \left (1+\sqrt [3]{-1+x^3}\right )-\frac {1}{2} \log \left (-x+\sqrt [3]{-1+x^3}\right )-\text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \sqrt [3]{-1+x^3}\right ) \\ = \frac {3}{\sqrt [3]{-1+x^3}}-\frac {3 x}{\sqrt [3]{-1+x^3}}+\frac {\arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{-1+x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\arctan \left (\frac {-1+2 \sqrt [3]{-1+x^3}}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {\log (x)}{2}-\frac {1}{2} \log \left (1+\sqrt [3]{-1+x^3}\right )-\frac {1}{2} \log \left (-x+\sqrt [3]{-1+x^3}\right ) \\ \end{align*}
Time = 0.59 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.00 \[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=-\frac {3 \left (-1+x^3\right )^{2/3}}{1+x+x^2}-\sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [3]{-1+x^3}}{-2+2 x+\sqrt [3]{-1+x^3}}\right )-\log \left (1-x+\sqrt [3]{-1+x^3}\right )+\frac {1}{2} \log \left (1-2 x+x^2+(-1+x) \sqrt [3]{-1+x^3}+\left (-1+x^3\right )^{2/3}\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.94 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.13
method | result | size |
risch | \(-\frac {3 \left (-1+x \right )}{\left (x^{3}-1\right )^{\frac {1}{3}}}+\frac {\sqrt {3}\, \Gamma \left (\frac {2}{3}\right ) {\left (-\operatorname {signum}\left (x^{3}-1\right )\right )}^{\frac {1}{3}} \left (\frac {2 \left (-\frac {\pi \sqrt {3}}{6}-\frac {3 \ln \left (3\right )}{2}+3 \ln \left (x \right )+i \pi \right ) \pi \sqrt {3}}{3 \Gamma \left (\frac {2}{3}\right )}+\frac {2 \pi \sqrt {3}\, x^{3} \operatorname {hypergeom}\left (\left [1, 1, \frac {4}{3}\right ], \left [2, 2\right ], x^{3}\right )}{9 \Gamma \left (\frac {2}{3}\right )}\right )}{6 \pi \operatorname {signum}\left (x^{3}-1\right )^{\frac {1}{3}}}+\frac {{\left (-\operatorname {signum}\left (x^{3}-1\right )\right )}^{\frac {1}{3}} x \operatorname {hypergeom}\left (\left [\frac {1}{3}, \frac {1}{3}\right ], \left [\frac {4}{3}\right ], x^{3}\right )}{\operatorname {signum}\left (x^{3}-1\right )^{\frac {1}{3}}}\) | \(125\) |
trager | \(\text {Expression too large to display}\) | \(635\) |
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.07 \[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\frac {2 \, \sqrt {3} {\left (x^{2} + x + 1\right )} \arctan \left (-\frac {4 \, \sqrt {3} {\left (x^{3} - 1\right )}^{\frac {1}{3}} {\left (x - 1\right )} + \sqrt {3} {\left (x^{2} + x + 1\right )} - 2 \, \sqrt {3} {\left (x^{3} - 1\right )}^{\frac {2}{3}}}{3 \, {\left (3 \, x^{2} - 5 \, x + 3\right )}}\right ) - {\left (x^{2} + x + 1\right )} \log \left (\frac {{\left (x^{3} - 1\right )}^{\frac {1}{3}} {\left (x - 1\right )} + x - {\left (x^{3} - 1\right )}^{\frac {2}{3}}}{x}\right ) - 6 \, {\left (x^{3} - 1\right )}^{\frac {2}{3}}}{2 \, {\left (x^{2} + x + 1\right )}} \]
[In]
[Out]
\[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\int \frac {\left (x - 1\right )^{2} \left (x + 1\right )}{x \sqrt [3]{\left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x^{2} + x + 1\right )}\, dx \]
[In]
[Out]
\[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\int { \frac {{\left (x + 1\right )} {\left (x - 1\right )}^{2}}{{\left (x^{3} - 1\right )}^{\frac {1}{3}} {\left (x^{2} + x + 1\right )} x} \,d x } \]
[In]
[Out]
\[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\int { \frac {{\left (x + 1\right )} {\left (x - 1\right )}^{2}}{{\left (x^{3} - 1\right )}^{\frac {1}{3}} {\left (x^{2} + x + 1\right )} x} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(-1+x)^2 (1+x)}{x \left (1+x+x^2\right ) \sqrt [3]{-1+x^3}} \, dx=\int \frac {{\left (x-1\right )}^2\,\left (x+1\right )}{x\,{\left (x^3-1\right )}^{1/3}\,\left (x^2+x+1\right )} \,d x \]
[In]
[Out]