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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 7279

\(\displaystyle \int \left (\frac {4-x}{\sqrt [3]{x^2+x+2} \left (2 x^2-x+2\right )}+\frac {1}{(x+1) \sqrt [3]{x^2+x+2}}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \int \frac {4-x}{\sqrt [3]{x^2+x+2} \left (2 x^2-x+2\right )}dx-\frac {3 \sqrt [3]{\frac {2 x-i \sqrt {7}+1}{x+1}} \sqrt [3]{\frac {2 x+i \sqrt {7}+1}{x+1}} \operatorname {AppellF1}\left (\frac {2}{3},\frac {1}{3},\frac {1}{3},\frac {5}{3},\frac {1-i \sqrt {7}}{2 (x+1)},\frac {1+i \sqrt {7}}{2 (x+1)}\right )}{2\ 2^{2/3} \sqrt [3]{x^2+x+2}}\)

Input:

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

Output:

$Aborted
 
Maple [C] (warning: unable to verify)

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

Time = 4.75 (sec) , antiderivative size = 718, normalized size of antiderivative = 5.61

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

Input:

int((x^2+2*x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ootOf(RootOf(_Z^3-4)^2+2*_Z*RootOf(_Z^3-4)+4*_Z^2)*x+(x^2+x+2)^(1/3 
)*RootOf(_Z^3-4)^2*x^2+4*(x^2+x+2)^(1/3)*RootOf(RootOf(_Z^3-4)^2+2*_Z*Root 
Of(_Z^3-4)+4*_Z^2)*RootOf(_Z^3-4)*x^2-2*(x^2+x+2)^(2/3)*x-RootOf(_Z^3-4)*x 
^2-2*RootOf(RootOf(_Z^3-4)^2+2*_Z*RootOf(_Z^3-4)+4*_Z^2)*x^2-RootOf(_Z^3-4 
)*x-2*RootOf(RootOf(_Z^3-4)^2+2*_Z*RootOf(_Z^3-4)+4*_Z^2)*x-2*RootOf(_Z^3- 
4)-4*RootOf(RootOf(_Z^3-4)^2+2*_Z*RootOf(_Z^3-4)+4*_Z^2))/(1+x)/(2*x^2-x+2 
))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 404 vs. \(2 (99) = 198\).

Time = 9.66 (sec) , antiderivative size = 404, normalized size of antiderivative = 3.16 \[ \int \frac {6+2 x+x^2}{(1+x) \sqrt [3]{2+x+x^2} \left (2-x+2 x^2\right )} \, dx=-\frac {1}{3} \cdot 2^{\frac {1}{6}} \sqrt {\frac {3}{2}} \arctan \left (\frac {2^{\frac {1}{6}} \sqrt {\frac {3}{2}} {\left (6 \cdot 2^{\frac {2}{3}} {\left (8 \, x^{7} + 2 \, x^{6} + x^{5} + 2 \, x^{4} - 5 \, x^{3} - 4 \, x^{2} - 4 \, x\right )} {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} + 2^{\frac {1}{3}} {\left (8 \, x^{9} + 48 \, x^{8} + 18 \, x^{7} + 37 \, x^{6} - 147 \, x^{5} - 111 \, x^{4} - 107 \, x^{3} + 18 \, x^{2} + 12 \, x + 8\right )} + 12 \, {\left (4 \, x^{8} - 14 \, x^{7} - 13 \, x^{6} - 26 \, x^{5} + 5 \, x^{4} + 4 \, x^{3} + 4 \, x^{2}\right )} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}}\right )}}{3 \, {\left (8 \, x^{9} - 96 \, x^{8} - 90 \, x^{7} - 179 \, x^{6} + 33 \, x^{5} + 33 \, x^{4} + 37 \, x^{3} + 18 \, x^{2} + 12 \, x + 8\right )}}\right ) + \frac {1}{6} \cdot 2^{\frac {2}{3}} \log \left (\frac {6 \cdot 2^{\frac {1}{3}} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}} x^{2} + 2^{\frac {2}{3}} {\left (2 \, x^{3} + x^{2} + x + 2\right )} + 6 \, {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} x}{2 \, x^{3} + x^{2} + x + 2}\right ) - \frac {1}{12} \cdot 2^{\frac {2}{3}} \log \left (\frac {3 \cdot 2^{\frac {2}{3}} {\left (4 \, x^{4} - x^{3} - x^{2} - 2 \, x\right )} {\left (x^{2} + x + 2\right )}^{\frac {2}{3}} + 2^{\frac {1}{3}} {\left (4 \, x^{6} - 14 \, x^{5} - 13 \, x^{4} - 26 \, x^{3} + 5 \, x^{2} + 4 \, x + 4\right )} - 12 \, {\left (x^{5} - x^{4} - x^{3} - 2 \, x^{2}\right )} {\left (x^{2} + x + 2\right )}^{\frac {1}{3}}}{4 \, x^{6} + 4 \, x^{5} + 5 \, x^{4} + 10 \, x^{3} + 5 \, x^{2} + 4 \, x + 4}\right ) \] Input:

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

Output:

-1/3*2^(1/6)*sqrt(3/2)*arctan(1/3*2^(1/6)*sqrt(3/2)*(6*2^(2/3)*(8*x^7 + 2* 
x^6 + x^5 + 2*x^4 - 5*x^3 - 4*x^2 - 4*x)*(x^2 + x + 2)^(2/3) + 2^(1/3)*(8* 
x^9 + 48*x^8 + 18*x^7 + 37*x^6 - 147*x^5 - 111*x^4 - 107*x^3 + 18*x^2 + 12 
*x + 8) + 12*(4*x^8 - 14*x^7 - 13*x^6 - 26*x^5 + 5*x^4 + 4*x^3 + 4*x^2)*(x 
^2 + x + 2)^(1/3))/(8*x^9 - 96*x^8 - 90*x^7 - 179*x^6 + 33*x^5 + 33*x^4 + 
37*x^3 + 18*x^2 + 12*x + 8)) + 1/6*2^(2/3)*log((6*2^(1/3)*(x^2 + x + 2)^(1 
/3)*x^2 + 2^(2/3)*(2*x^3 + x^2 + x + 2) + 6*(x^2 + x + 2)^(2/3)*x)/(2*x^3 
+ x^2 + x + 2)) - 1/12*2^(2/3)*log((3*2^(2/3)*(4*x^4 - x^3 - x^2 - 2*x)*(x 
^2 + x + 2)^(2/3) + 2^(1/3)*(4*x^6 - 14*x^5 - 13*x^4 - 26*x^3 + 5*x^2 + 4* 
x + 4) - 12*(x^5 - x^4 - x^3 - 2*x^2)*(x^2 + x + 2)^(1/3))/(4*x^6 + 4*x^5 
+ 5*x^4 + 10*x^3 + 5*x^2 + 4*x + 4))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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