Integrand size = 22, antiderivative size = 41 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=-2 x+\frac {x^2}{2}+\frac {11 \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {3}{2} \log \left (1+x+x^2\right ) \]
[Out]
Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {1671, 648, 632, 210, 642} \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {11 \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {x^2}{2}+\frac {3}{2} \log \left (x^2+x+1\right )-2 x \]
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 1671
Rubi steps \begin{align*} \text {integral}& = \int \left (-2+x+\frac {7+3 x}{1+x+x^2}\right ) \, dx \\ & = -2 x+\frac {x^2}{2}+\int \frac {7+3 x}{1+x+x^2} \, dx \\ & = -2 x+\frac {x^2}{2}+\frac {3}{2} \int \frac {1+2 x}{1+x+x^2} \, dx+\frac {11}{2} \int \frac {1}{1+x+x^2} \, dx \\ & = -2 x+\frac {x^2}{2}+\frac {3}{2} \log \left (1+x+x^2\right )-11 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x\right ) \\ & = -2 x+\frac {x^2}{2}+\frac {11 \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {3}{2} \log \left (1+x+x^2\right ) \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=-2 x+\frac {x^2}{2}+\frac {11 \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {3}{2} \log \left (1+x+x^2\right ) \]
[In]
[Out]
Time = 1.19 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.85
method | result | size |
default | \(-2 x +\frac {x^{2}}{2}+\frac {3 \ln \left (x^{2}+x +1\right )}{2}+\frac {11 \arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(35\) |
risch | \(-2 x +\frac {x^{2}}{2}+\frac {3 \ln \left (4 x^{2}+4 x +4\right )}{2}+\frac {11 \arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(39\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.83 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {1}{2} \, x^{2} + \frac {11}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - 2 \, x + \frac {3}{2} \, \log \left (x^{2} + x + 1\right ) \]
[In]
[Out]
Time = 0.05 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.12 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {x^{2}}{2} - 2 x + \frac {3 \log {\left (x^{2} + x + 1 \right )}}{2} + \frac {11 \sqrt {3} \operatorname {atan}{\left (\frac {2 \sqrt {3} x}{3} + \frac {\sqrt {3}}{3} \right )}}{3} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.83 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {1}{2} \, x^{2} + \frac {11}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - 2 \, x + \frac {3}{2} \, \log \left (x^{2} + x + 1\right ) \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.83 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {1}{2} \, x^{2} + \frac {11}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - 2 \, x + \frac {3}{2} \, \log \left (x^{2} + x + 1\right ) \]
[In]
[Out]
Time = 0.03 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.88 \[ \int \frac {5+2 x-x^2+x^3}{1+x+x^2} \, dx=\frac {3\,\ln \left (x^2+x+1\right )}{2}-2\,x+\frac {11\,\sqrt {3}\,\mathrm {atan}\left (\frac {2\,\sqrt {3}\,x}{3}+\frac {\sqrt {3}}{3}\right )}{3}+\frac {x^2}{2} \]
[In]
[Out]