\(\int \frac {6+2 x+x^2}{(2+x) (2+x^2) \sqrt [3]{2+x+x^2}} \, dx\) [1900]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 31, antiderivative size = 132 \[ \int \frac {6+2 x+x^2}{(2+x) \left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx=-\frac {\sqrt {3} \arctan \left (\frac {-\frac {2^{2/3} x}{\sqrt {3}}+\frac {\sqrt [3]{2+x+x^2}}{\sqrt {3}}}{\sqrt [3]{2+x+x^2}}\right )}{2^{2/3}}+\frac {\log \left (2^{2/3} x+2 \sqrt [3]{2+x+x^2}\right )}{2^{2/3}}-\frac {\log \left (\sqrt [3]{2} x^2-2^{2/3} x \sqrt [3]{2+x+x^2}+2 \left (2+x+x^2\right )^{2/3}\right )}{2\ 2^{2/3}} \]

[Out]

-1/2*3^(1/2)*arctan((-1/3*2^(2/3)*x*3^(1/2)+1/3*(x^2+x+2)^(1/3)*3^(1/2))/(x^2+x+2)^(1/3))*2^(1/3)+1/2*ln(2^(2/
3)*x+2*(x^2+x+2)^(1/3))*2^(1/3)-1/4*ln(2^(1/3)*x^2-2^(2/3)*x*(x^2+x+2)^(1/3)+2*(x^2+x+2)^(2/3))*2^(1/3)

Rubi [F]

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

[In]

Int[(6 + 2*x + x^2)/((2 + x)*(2 + x^2)*(2 + x + x^2)^(1/3)),x]

[Out]

(-3*((1 - I*Sqrt[7] + 2*x)/(2 + x))^(1/3)*((1 + I*Sqrt[7] + 2*x)/(2 + x))^(1/3)*AppellF1[2/3, 1/3, 1/3, 5/3, (
3 - I*Sqrt[7])/(2*(2 + x)), (3 + I*Sqrt[7])/(2*(2 + x))])/(2*2^(2/3)*(2 + x + x^2)^(1/3)) + 2*Defer[Int][1/((2
 + x^2)*(2 + x + x^2)^(1/3)), x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{(2+x) \sqrt [3]{2+x+x^2}}+\frac {2}{\left (2+x^2\right ) \sqrt [3]{2+x+x^2}}\right ) \, dx \\ & = 2 \int \frac {1}{\left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx+\int \frac {1}{(2+x) \sqrt [3]{2+x+x^2}} \, dx \\ & = 2 \int \frac {1}{\left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx-\frac {\left (\sqrt [3]{\frac {1-i \sqrt {7}+2 x}{2+x}} \sqrt [3]{\frac {1+i \sqrt {7}+2 x}{2+x}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{x} \sqrt [3]{1-\frac {1}{2} \left (3-i \sqrt {7}\right ) x} \sqrt [3]{1-\frac {1}{2} \left (3+i \sqrt {7}\right ) x}} \, dx,x,\frac {1}{2+x}\right )}{2^{2/3} \left (\frac {1}{2+x}\right )^{2/3} \sqrt [3]{2+x+x^2}} \\ & = -\frac {3 \sqrt [3]{\frac {1-i \sqrt {7}+2 x}{2+x}} \sqrt [3]{\frac {1+i \sqrt {7}+2 x}{2+x}} \operatorname {AppellF1}\left (\frac {2}{3},\frac {1}{3},\frac {1}{3},\frac {5}{3},\frac {3-i \sqrt {7}}{2 (2+x)},\frac {3+i \sqrt {7}}{2 (2+x)}\right )}{2\ 2^{2/3} \sqrt [3]{2+x+x^2}}+2 \int \frac {1}{\left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.82 \[ \int \frac {6+2 x+x^2}{(2+x) \left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx=-\frac {2 \sqrt {3} \arctan \left (\frac {1-\frac {2^{2/3} x}{\sqrt [3]{2+x+x^2}}}{\sqrt {3}}\right )-2 \log \left (2^{2/3} x+2 \sqrt [3]{2+x+x^2}\right )+\log \left (\sqrt [3]{2} x^2-2^{2/3} x \sqrt [3]{2+x+x^2}+2 \left (2+x+x^2\right )^{2/3}\right )}{2\ 2^{2/3}} \]

[In]

Integrate[(6 + 2*x + x^2)/((2 + x)*(2 + x^2)*(2 + x + x^2)^(1/3)),x]

[Out]

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

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 4.74 (sec) , antiderivative size = 883, normalized size of antiderivative = 6.69

method result size
trager \(\text {Expression too large to display}\) \(883\)

[In]

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

[Out]

1/2*RootOf(_Z^3-2)*ln((RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)^3*x^3-2*RootOf(RootO
f(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)^2*RootOf(_Z^3-2)^2*x^3+3*(x^2+x+2)^(1/3)*RootOf(_Z^3-2)^2*x^2+6*(x^2+x
+2)^(1/3)*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*RootOf(_Z^3-2)*x^2+6*(x^2+x+2)^(2/3)*x+2*RootOf(
_Z^3-2)*x^2-4*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*x^2+2*RootOf(_Z^3-2)*x-4*RootOf(RootOf(_Z^3-
2)^2+2*_Z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^(2/3)*x-4*RootOf(RootOf(_Z^3-2)^2+2
*_Z*RootOf(_Z^3-2)+4*_Z^2)*x^2-4*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)*x-8*RootOf(RootOf(_Z^3-2)
^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2))/(2+x)/(x^2+2))*RootOf(RootOf(_Z^3-2)^2+2*_Z*RootOf(_Z^3-2)+4*_Z^2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 395 vs. \(2 (102) = 204\).

Time = 6.07 (sec) , antiderivative size = 395, normalized size of antiderivative = 2.99 \[ \int \frac {6+2 x+x^2}{(2+x) \left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx=-\frac {1}{6} \cdot 4^{\frac {1}{6}} \sqrt {3} \arctan \left (\frac {4^{\frac {1}{6}} \sqrt {3} {\left (12 \cdot 4^{\frac {2}{3}} {\left (x^{7} + x^{6} - x^{5} - 2 \, x^{4} - 10 \, x^{3} - 8 \, x^{2} - 8 \, x\right )} {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} + 4^{\frac {1}{3}} {\left (x^{9} + 24 \, x^{8} - 36 \, x^{7} - 64 \, x^{6} - 276 \, x^{5} - 168 \, x^{4} - 136 \, x^{3} + 144 \, x^{2} + 96 \, x + 64\right )} + 12 \, {\left (x^{8} - 14 \, x^{7} - 10 \, x^{6} - 20 \, x^{5} + 20 \, x^{4} + 16 \, x^{3} + 16 \, x^{2}\right )} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}}\right )}}{6 \, {\left (x^{9} - 48 \, x^{8} - 36 \, x^{7} - 64 \, x^{6} + 84 \, x^{5} + 120 \, x^{4} + 152 \, x^{3} + 144 \, x^{2} + 96 \, x + 64\right )}}\right ) + \frac {1}{12} \cdot 4^{\frac {2}{3}} \log \left (-\frac {6 \cdot 4^{\frac {1}{3}} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}} x^{2} + 4^{\frac {2}{3}} {\left (x^{3} + 2 \, x^{2} + 2 \, x + 4\right )} + 12 \, {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} x}{x^{3} + 2 \, x^{2} + 2 \, x + 4}\right ) - \frac {1}{24} \cdot 4^{\frac {2}{3}} \log \left (\frac {6 \cdot 4^{\frac {2}{3}} {\left (x^{4} - x^{3} - x^{2} - 2 \, x\right )} {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} + 4^{\frac {1}{3}} {\left (x^{6} - 14 \, x^{5} - 10 \, x^{4} - 20 \, x^{3} + 20 \, x^{2} + 16 \, x + 16\right )} - 6 \, {\left (x^{5} - 4 \, x^{4} - 4 \, x^{3} - 8 \, x^{2}\right )} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}}}{x^{6} + 4 \, x^{5} + 8 \, x^{4} + 16 \, x^{3} + 20 \, x^{2} + 16 \, x + 16}\right ) \]

[In]

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

[Out]

-1/6*4^(1/6)*sqrt(3)*arctan(1/6*4^(1/6)*sqrt(3)*(12*4^(2/3)*(x^7 + x^6 - x^5 - 2*x^4 - 10*x^3 - 8*x^2 - 8*x)*(
x^2 + x + 2)^(2/3) + 4^(1/3)*(x^9 + 24*x^8 - 36*x^7 - 64*x^6 - 276*x^5 - 168*x^4 - 136*x^3 + 144*x^2 + 96*x +
64) + 12*(x^8 - 14*x^7 - 10*x^6 - 20*x^5 + 20*x^4 + 16*x^3 + 16*x^2)*(x^2 + x + 2)^(1/3))/(x^9 - 48*x^8 - 36*x
^7 - 64*x^6 + 84*x^5 + 120*x^4 + 152*x^3 + 144*x^2 + 96*x + 64)) + 1/12*4^(2/3)*log(-(6*4^(1/3)*(x^2 + x + 2)^
(1/3)*x^2 + 4^(2/3)*(x^3 + 2*x^2 + 2*x + 4) + 12*(x^2 + x + 2)^(2/3)*x)/(x^3 + 2*x^2 + 2*x + 4)) - 1/24*4^(2/3
)*log((6*4^(2/3)*(x^4 - x^3 - x^2 - 2*x)*(x^2 + x + 2)^(2/3) + 4^(1/3)*(x^6 - 14*x^5 - 10*x^4 - 20*x^3 + 20*x^
2 + 16*x + 16) - 6*(x^5 - 4*x^4 - 4*x^3 - 8*x^2)*(x^2 + x + 2)^(1/3))/(x^6 + 4*x^5 + 8*x^4 + 16*x^3 + 20*x^2 +
 16*x + 16))

Sympy [F]

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

[In]

integrate((x**2+2*x+6)/(2+x)/(x**2+2)/(x**2+x+2)**(1/3),x)

[Out]

Integral((x**2 + 2*x + 6)/((x + 2)*(x**2 + 2)*(x**2 + x + 2)**(1/3)), x)

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {6+2 x+x^2}{(2+x) \left (2+x^2\right ) \sqrt [3]{2+x+x^2}} \, dx=\int \frac {x^2+2\,x+6}{\left (x^2+2\right )\,\left (x+2\right )\,{\left (x^2+x+2\right )}^{1/3}} \,d x \]

[In]

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

[Out]

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