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] -3*(x^3-1)^(2/3)/(x^2+x+1)-3^(1/2)*arctan(3^(1/2)*(x^3-1)^(1/3)/(-2+2* x+(x^3-1)^(1/3)))-ln(1-x+(x^3-1)^(1/3))+1/2*ln(1-2*x+x^2+(-1+x)*(x^3-1 )^(1/3)+(x^3-1)^(2/3))
Time = 0.24 (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 = {2584, 281, 746, 798, 61, 68, 1083, 217, 16, 793, 817, 769} \[ \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] Int[((-1 + x)^2*(1 + x))/(x*(1 + x + x^2)*(-1 + x^3)^(1/3)),x]
[Out] 3/(-1 + x^3)^(1/3) - (3*x)/(-1 + x^3)^(1/3) + ArcTan[(1 + (2*x)/(-1 + x^3)^(1/3))/Sqrt[3]]/Sqrt[3] - ArcTan[(1 - 2*(-1 + x^3)^(1/3))/Sqrt[3] ]/Sqrt[3] + Log[x]/2 - Log[1 + (-1 + x^3)^(1/3)]/2 - Log[-x + (-1 + x^ 3)^(1/3)]/2
Rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Rule 61
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(( m + n + 2)/((b*c - a*d)*(m + 1))) Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && LtQ[m, -1] && !(LtQ[n, -1] && (EqQ[a, 0 ] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d , m, n, x]
Rule 68
Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(1/3)), x_Symbol] :> With[ {q = Rt[-(b*c - a*d)/b, 3]}, Simp[Log[RemoveContent[a + b*x, x]]/(2*b*q), x ] + (Simp[3/(2*b) Subst[Int[1/(q^2 - q*x + x^2), x], x, (c + d*x)^(1/3)], x] - Simp[3/(2*b*q) Subst[Int[1/(q + x), x], x, (c + d*x)^(1/3)], x])] / ; FreeQ[{a, b, c, d}, x] && NegQ[(b*c - a*d)/b]
Rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Rule 281
Int[(u_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_ Symbol] :> Simp[(b/d)^p Int[u*(c + d*x^n)^(p + q), x], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && EqQ[b*c - a*d, 0] && IntegerQ[p] && !(IntegerQ[q] & & SimplerQ[a + b*x^n, c + d*x^n])
Rule 746
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1) /a), x] /; FreeQ[{a, b, n, p}, x] && EqQ[1/n + p + 1, 0]
Rule 769
Int[((a_) + (b_.)*(x_)^3)^(-1/3), x_Symbol] :> Simp[ArcTan[(1 + 2*Rt[b, 3]* (x/(a + b*x^3)^(1/3)))/Sqrt[3]]/(Sqrt[3]*Rt[b, 3]), x] - Simp[Log[(a + b*x^ 3)^(1/3) - Rt[b, 3]*x]/(2*Rt[b, 3]), x] /; FreeQ[{a, b}, x]
Rule 793
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n) ^(p + 1)/(b*n*(p + 1)), x] /; FreeQ[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]
Rule 798
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[1/n Subst [Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]
Rule 817
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^( n - 1)*(c*x)^(m - n + 1)*((a + b*x^n)^(p + 1)/(b*n*(p + 1))), x] - Simp[c^n *((m - n + 1)/(b*n*(p + 1))) Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x], x ] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] && ! ILtQ[(m + n*(p + 1) + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]
Rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Rule 2584
Int[((c_) + (d_.)*(x_)^(n_.))^(q_)*((a_) + (b_.)*(x_)^(nn_.))^(p_), x_Symbo l] :> Int[ExpandToSum[(c - d*x^n)^(-q), x]*((a + b*x^nn)^p/(c^2 - d^2*x^(2* n))^(-q)), x] /; FreeQ[{a, b, c, d, n, nn, p}, x] && !IntegerQ[p] && ILtQ[ q, 0] && IGtQ[Log[2, nn/n], 0]
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 {\tan ^{-1}\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 {\tan ^{-1}\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 {\tan ^{-1}\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 {\tan ^{-1}\left (\frac {1+\frac {2 x}{\sqrt [3]{-1+x^3}}}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\tan ^{-1}\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] Integrate[((-1 + x)^2*(1 + x))/(x*(1 + x + x^2)*(-1 + x^3)^(1/3)),x]
[Out] (-3*(-1 + x^3)^(2/3))/(1 + x + x^2) - Sqrt[3]*ArcTan[(Sqrt[3]*(-1 + x^ 3)^(1/3))/(-2 + 2*x + (-1 + x^3)^(1/3))] - Log[1 - x + (-1 + x^3)^(1/3 )] + Log[1 - 2*x + x^2 + (-1 + x)*(-1 + x^3)^(1/3) + (-1 + x^3)^(2/3)] /2
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] int((-1+x)^2*(1+x)/x/(x^2+x+1)/(x^3-1)^(1/3),x,method=_RETURNVERBOSE)
[Out] -3*(-1+x)/(x^3-1)^(1/3)+1/6/Pi*3^(1/2)*GAMMA(2/3)/signum(x^3-1)^(1/3)* (-signum(x^3-1))^(1/3)*(2/3*(-1/6*Pi*3^(1/2)-3/2*ln(3)+3*ln(x)+I*Pi)*P i*3^(1/2)/GAMMA(2/3)+2/9*Pi*3^(1/2)/GAMMA(2/3)*x^3*hypergeom([1,1,4/3] ,[2,2],x^3))+1/signum(x^3-1)^(1/3)*(-signum(x^3-1))^(1/3)*x*hypergeom( [1/3,1/3],[4/3],x^3)
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] integrate((-1+x)^2*(1+x)/x/(x^2+x+1)/(x^3-1)^(1/3),x, algorithm="frica s")
[Out] 1/2*(2*sqrt(3)*(x^2 + x + 1)*arctan(-1/3*(4*sqrt(3)*(x^3 - 1)^(1/3)*(x - 1) + sqrt(3)*(x^2 + x + 1) - 2*sqrt(3)*(x^3 - 1)^(2/3))/(3*x^2 - 5* x + 3)) - (x^2 + x + 1)*log(((x^3 - 1)^(1/3)*(x - 1) + x - (x^3 - 1)^( 2/3))/x) - 6*(x^3 - 1)^(2/3))/(x^2 + x + 1)
\[ \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] integrate((-1+x)**2*(1+x)/x/(x**2+x+1)/(x**3-1)**(1/3),x)
[Out] Integral((x - 1)**2*(x + 1)/(x*((x - 1)*(x**2 + x + 1))**(1/3)*(x**2 + x + 1)), x)
\[ \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] integrate((-1+x)^2*(1+x)/x/(x^2+x+1)/(x^3-1)^(1/3),x, algorithm="maxim a")
[Out] integrate((x + 1)*(x - 1)^2/((x^3 - 1)^(1/3)*(x^2 + x + 1)*x), x)
\[ \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] integrate((-1+x)^2*(1+x)/x/(x^2+x+1)/(x^3-1)^(1/3),x, algorithm="giac" )
[Out] integrate((x + 1)*(x - 1)^2/((x^3 - 1)^(1/3)*(x^2 + x + 1)*x), x)
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] int(((x - 1)^2*(x + 1))/(x*(x^3 - 1)^(1/3)*(x + x^2 + 1)),x)
[Out] int(((x - 1)^2*(x + 1))/(x*(x^3 - 1)^(1/3)*(x + x^2 + 1)), x)