Integrand size = 28, antiderivative size = 147 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\sqrt {3} \arctan \left (\frac {\sqrt {3} x}{x+2 \sqrt [3]{x^2+x^3}}\right )-\log \left (-x+\sqrt [3]{x^2+x^3}\right )+\frac {1}{2} \log \left (x^2+x \sqrt [3]{x^2+x^3}+\left (x^2+x^3\right )^{2/3}\right )+\frac {1}{2} \text {RootSum}\left [2-4 \text {$\#$1}^3+3 \text {$\#$1}^6\&,\frac {-\log (x) \text {$\#$1}^2+\log \left (\sqrt [3]{x^2+x^3}-x \text {$\#$1}\right ) \text {$\#$1}^2}{-2+3 \text {$\#$1}^3}\&\right ] \]
[Out]
Result contains complex when optimal does not.
Time = 0.41 (sec) , antiderivative size = 599, normalized size of antiderivative = 4.07, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2081, 6860, 61, 925, 129, 399, 245, 384} \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\frac {i \sqrt {3} x^{2/3} \sqrt [3]{x+1} \arctan \left (\frac {1+\frac {2 \sqrt [6]{2} \sqrt [3]{x}}{\sqrt [3]{\sqrt {2}-i} \sqrt [3]{x+1}}}{\sqrt {3}}\right )}{2 \sqrt [6]{2} \left (\sqrt {2}-i\right )^{2/3} \sqrt [3]{x^3+x^2}}-\frac {i \sqrt {3} x^{2/3} \sqrt [3]{x+1} \arctan \left (\frac {1+\frac {2 \sqrt [6]{2} \sqrt [3]{x}}{\sqrt [3]{\sqrt {2}+i} \sqrt [3]{x+1}}}{\sqrt {3}}\right )}{2 \sqrt [6]{2} \left (\sqrt {2}+i\right )^{2/3} \sqrt [3]{x^3+x^2}}-\frac {\sqrt {3} x^{2/3} \sqrt [3]{x+1} \arctan \left (\frac {2 \sqrt [3]{x+1}}{\sqrt {3} \sqrt [3]{x}}+\frac {1}{\sqrt {3}}\right )}{\sqrt [3]{x^3+x^2}}-\frac {x^{2/3} \sqrt [3]{x+1} \log (x)}{2 \sqrt [3]{x^3+x^2}}-\frac {i x^{2/3} \sqrt [3]{x+1} \log \left (x-i \sqrt {2}+1\right )}{4 \sqrt [6]{2} \left (\sqrt {2}+i\right )^{2/3} \sqrt [3]{x^3+x^2}}+\frac {i x^{2/3} \sqrt [3]{x+1} \log \left (x+i \sqrt {2}+1\right )}{4 \sqrt [6]{2} \left (\sqrt {2}-i\right )^{2/3} \sqrt [3]{x^3+x^2}}-\frac {3 i x^{2/3} \sqrt [3]{x+1} \log \left (\sqrt [6]{2} \sqrt [3]{x}-\sqrt [3]{\sqrt {2}-i} \sqrt [3]{x+1}\right )}{4 \sqrt [6]{2} \left (\sqrt {2}-i\right )^{2/3} \sqrt [3]{x^3+x^2}}+\frac {3 i x^{2/3} \sqrt [3]{x+1} \log \left (\sqrt [6]{2} \sqrt [3]{x}-\sqrt [3]{\sqrt {2}+i} \sqrt [3]{x+1}\right )}{4 \sqrt [6]{2} \left (\sqrt {2}+i\right )^{2/3} \sqrt [3]{x^3+x^2}}-\frac {3 x^{2/3} \sqrt [3]{x+1} \log \left (\frac {\sqrt [3]{x+1}}{\sqrt [3]{x}}-1\right )}{2 \sqrt [3]{x^3+x^2}} \]
[In]
[Out]
Rule 61
Rule 129
Rule 245
Rule 384
Rule 399
Rule 925
Rule 2081
Rule 6860
Rubi steps \begin{align*} \text {integral}& = \frac {\left (x^{2/3} \sqrt [3]{1+x}\right ) \int \frac {2+x+x^2}{x^{2/3} \sqrt [3]{1+x} \left (3+2 x+x^2\right )} \, dx}{\sqrt [3]{x^2+x^3}} \\ & = \frac {\left (x^{2/3} \sqrt [3]{1+x}\right ) \int \left (\frac {1}{x^{2/3} \sqrt [3]{1+x}}-\frac {(1+x)^{2/3}}{x^{2/3} \left (3+2 x+x^2\right )}\right ) \, dx}{\sqrt [3]{x^2+x^3}} \\ & = \frac {\left (x^{2/3} \sqrt [3]{1+x}\right ) \int \frac {1}{x^{2/3} \sqrt [3]{1+x}} \, dx}{\sqrt [3]{x^2+x^3}}-\frac {\left (x^{2/3} \sqrt [3]{1+x}\right ) \int \frac {(1+x)^{2/3}}{x^{2/3} \left (3+2 x+x^2\right )} \, dx}{\sqrt [3]{x^2+x^3}} \\ & = -\frac {\sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{x^2+x^3}}-\frac {x^{2/3} \sqrt [3]{1+x} \log (x)}{2 \sqrt [3]{x^2+x^3}}-\frac {3 x^{2/3} \sqrt [3]{1+x} \log \left (-1+\frac {\sqrt [3]{1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{x^2+x^3}}-\frac {\left (x^{2/3} \sqrt [3]{1+x}\right ) \int \left (\frac {i (1+x)^{2/3}}{\sqrt {2} \left (-2+2 i \sqrt {2}-2 x\right ) x^{2/3}}+\frac {i (1+x)^{2/3}}{\sqrt {2} x^{2/3} \left (2+2 i \sqrt {2}+2 x\right )}\right ) \, dx}{\sqrt [3]{x^2+x^3}} \\ & = -\frac {\sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{x^2+x^3}}-\frac {x^{2/3} \sqrt [3]{1+x} \log (x)}{2 \sqrt [3]{x^2+x^3}}-\frac {3 x^{2/3} \sqrt [3]{1+x} \log \left (-1+\frac {\sqrt [3]{1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{x^2+x^3}}-\frac {\left (i x^{2/3} \sqrt [3]{1+x}\right ) \int \frac {(1+x)^{2/3}}{\left (-2+2 i \sqrt {2}-2 x\right ) x^{2/3}} \, dx}{\sqrt {2} \sqrt [3]{x^2+x^3}}-\frac {\left (i x^{2/3} \sqrt [3]{1+x}\right ) \int \frac {(1+x)^{2/3}}{x^{2/3} \left (2+2 i \sqrt {2}+2 x\right )} \, dx}{\sqrt {2} \sqrt [3]{x^2+x^3}} \\ & = -\frac {\sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{x^2+x^3}}-\frac {x^{2/3} \sqrt [3]{1+x} \log (x)}{2 \sqrt [3]{x^2+x^3}}-\frac {3 x^{2/3} \sqrt [3]{1+x} \log \left (-1+\frac {\sqrt [3]{1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{x^2+x^3}}-\frac {\left (3 i x^{2/3} \sqrt [3]{1+x}\right ) \text {Subst}\left (\int \frac {\left (1+x^3\right )^{2/3}}{-2+2 i \sqrt {2}-2 x^3} \, dx,x,\sqrt [3]{x}\right )}{\sqrt {2} \sqrt [3]{x^2+x^3}}-\frac {\left (3 i x^{2/3} \sqrt [3]{1+x}\right ) \text {Subst}\left (\int \frac {\left (1+x^3\right )^{2/3}}{2+2 i \sqrt {2}+2 x^3} \, dx,x,\sqrt [3]{x}\right )}{\sqrt {2} \sqrt [3]{x^2+x^3}} \\ & = -\frac {\sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{x^2+x^3}}-\frac {x^{2/3} \sqrt [3]{1+x} \log (x)}{2 \sqrt [3]{x^2+x^3}}-\frac {3 x^{2/3} \sqrt [3]{1+x} \log \left (-1+\frac {\sqrt [3]{1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{x^2+x^3}}+\frac {\left (3 x^{2/3} \sqrt [3]{1+x}\right ) \text {Subst}\left (\int \frac {1}{\left (-2+2 i \sqrt {2}-2 x^3\right ) \sqrt [3]{1+x^3}} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x^2+x^3}}-\frac {\left (3 x^{2/3} \sqrt [3]{1+x}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{1+x^3} \left (2+2 i \sqrt {2}+2 x^3\right )} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x^2+x^3}} \\ & = \frac {i \sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1+\frac {2 \sqrt [6]{2} \sqrt [3]{x}}{\sqrt [3]{-i+\sqrt {2}} \sqrt [3]{1+x}}}{\sqrt {3}}\right )}{2 \sqrt [6]{2} \left (-i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}-\frac {i \sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1+\frac {2 \sqrt [6]{2} \sqrt [3]{x}}{\sqrt [3]{i+\sqrt {2}} \sqrt [3]{1+x}}}{\sqrt {3}}\right )}{2 \sqrt [6]{2} \left (i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}-\frac {\sqrt {3} x^{2/3} \sqrt [3]{1+x} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{x^2+x^3}}-\frac {x^{2/3} \sqrt [3]{1+x} \log (x)}{2 \sqrt [3]{x^2+x^3}}-\frac {i x^{2/3} \sqrt [3]{1+x} \log \left (1-i \sqrt {2}+x\right )}{4 \sqrt [6]{2} \left (i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}+\frac {i x^{2/3} \sqrt [3]{1+x} \log \left (1+i \sqrt {2}+x\right )}{4 \sqrt [6]{2} \left (-i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}-\frac {3 i x^{2/3} \sqrt [3]{1+x} \log \left (\sqrt [6]{2} \sqrt [3]{x}-\sqrt [3]{-i+\sqrt {2}} \sqrt [3]{1+x}\right )}{4 \sqrt [6]{2} \left (-i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}+\frac {3 i x^{2/3} \sqrt [3]{1+x} \log \left (\sqrt [6]{2} \sqrt [3]{x}-\sqrt [3]{i+\sqrt {2}} \sqrt [3]{1+x}\right )}{4 \sqrt [6]{2} \left (i+\sqrt {2}\right )^{2/3} \sqrt [3]{x^2+x^3}}-\frac {3 x^{2/3} \sqrt [3]{1+x} \log \left (-1+\frac {\sqrt [3]{1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{x^2+x^3}} \\ \end{align*}
Time = 0.00 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.18 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\frac {x^{2/3} \sqrt [3]{1+x} \left (2 \sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [3]{x}}{\sqrt [3]{x}+2 \sqrt [3]{1+x}}\right )-2 \log \left (-\sqrt [3]{x}+\sqrt [3]{1+x}\right )+\log \left (x^{2/3}+\sqrt [3]{x} \sqrt [3]{1+x}+(1+x)^{2/3}\right )+\text {RootSum}\left [2-4 \text {$\#$1}^3+3 \text {$\#$1}^6\&,\frac {-\log \left (\sqrt [3]{x}\right ) \text {$\#$1}^2+\log \left (\sqrt [3]{1+x}-\sqrt [3]{x} \text {$\#$1}\right ) \text {$\#$1}^2}{-2+3 \text {$\#$1}^3}\&\right ]\right )}{2 \sqrt [3]{x^2 (1+x)}} \]
[In]
[Out]
Time = 24.59 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.88
method | result | size |
pseudoelliptic | \(\frac {\ln \left (\frac {\left (x^{2} \left (1+x \right )\right )^{\frac {2}{3}}+\left (x^{2} \left (1+x \right )\right )^{\frac {1}{3}} x +x^{2}}{x^{2}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\left (2 \left (x^{2} \left (1+x \right )\right )^{\frac {1}{3}}+x \right ) \sqrt {3}}{3 x}\right )+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (3 \textit {\_Z}^{6}-4 \textit {\_Z}^{3}+2\right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (\frac {-\textit {\_R} x +\left (x^{2} \left (1+x \right )\right )^{\frac {1}{3}}}{x}\right )}{3 \textit {\_R}^{3}-2}\right )}{2}-\ln \left (\frac {\left (x^{2} \left (1+x \right )\right )^{\frac {1}{3}}-x}{x}\right )\) | \(130\) |
trager | \(\text {Expression too large to display}\) | \(14032\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 3 vs. order 1.
Time = 0.27 (sec) , antiderivative size = 484, normalized size of antiderivative = 3.29 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\frac {1}{72} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (\frac {18^{\frac {1}{3}} {\left (\sqrt {2} {\left (i \, \sqrt {-3} x + i \, x\right )} - 2 \, \sqrt {-3} x - 2 \, x\right )} {\left (i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 36 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) - \frac {1}{72} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (\frac {18^{\frac {1}{3}} {\left (\sqrt {2} {\left (-i \, \sqrt {-3} x + i \, x\right )} + 2 \, \sqrt {-3} x - 2 \, x\right )} {\left (i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 36 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) - \frac {1}{72} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (\frac {18^{\frac {1}{3}} {\left (\sqrt {2} {\left (i \, \sqrt {-3} x - i \, x\right )} + 2 \, \sqrt {-3} x - 2 \, x\right )} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 36 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) + \frac {1}{72} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (\frac {18^{\frac {1}{3}} {\left (\sqrt {2} {\left (-i \, \sqrt {-3} x - i \, x\right )} - 2 \, \sqrt {-3} x - 2 \, x\right )} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 36 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) + \frac {1}{36} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} \log \left (\frac {18^{\frac {1}{3}} {\left (-i \, \sqrt {2} x + 2 \, x\right )} {\left (i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 18 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) + \frac {1}{36} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {1}{3}} \log \left (\frac {18^{\frac {1}{3}} {\left (i \, \sqrt {2} x + 2 \, x\right )} {\left (-i \, \sqrt {2} - 4\right )}^{\frac {2}{3}} + 18 \, {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) - \sqrt {3} \arctan \left (\frac {\sqrt {3} x + 2 \, \sqrt {3} {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{3 \, x}\right ) - \log \left (-\frac {x - {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}}}{x}\right ) + \frac {1}{2} \, \log \left (\frac {x^{2} + {\left (x^{3} + x^{2}\right )}^{\frac {1}{3}} x + {\left (x^{3} + x^{2}\right )}^{\frac {2}{3}}}{x^{2}}\right ) \]
[In]
[Out]
Not integrable
Time = 2.58 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.18 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\int \frac {x^{2} + x + 2}{\sqrt [3]{x^{2} \left (x + 1\right )} \left (x^{2} + 2 x + 3\right )}\, dx \]
[In]
[Out]
Not integrable
Time = 0.23 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.19 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\int { \frac {x^{2} + x + 2}{{\left (x^{3} + x^{2}\right )}^{\frac {1}{3}} {\left (x^{2} + 2 \, x + 3\right )}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Not integrable
Time = 0.00 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.19 \[ \int \frac {2+x+x^2}{\left (3+2 x+x^2\right ) \sqrt [3]{x^2+x^3}} \, dx=\int \frac {x^2+x+2}{{\left (x^3+x^2\right )}^{1/3}\,\left (x^2+2\,x+3\right )} \,d x \]
[In]
[Out]