Optimal. Leaf size=79 \[ -\frac{x^4}{6}-\frac{x^3}{9}+\frac{1}{6} \left (x^2+x+1\right )^{3/2} x-\frac{5}{36} \left (x^2+x+1\right )^{3/2}+\frac{1}{96} (2 x+1) \sqrt{x^2+x+1}+\frac{1}{64} \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.135887, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {6742, 742, 640, 612, 619, 215} \[ -\frac{x^4}{6}-\frac{x^3}{9}+\frac{1}{6} \left (x^2+x+1\right )^{3/2} x-\frac{5}{36} \left (x^2+x+1\right )^{3/2}+\frac{1}{96} (2 x+1) \sqrt{x^2+x+1}+\frac{1}{64} \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6742
Rule 742
Rule 640
Rule 612
Rule 619
Rule 215
Rubi steps
\begin{align*} \int \frac{x^2}{1+2 x+2 \sqrt{1+x+x^2}} \, dx &=\int \left (-\frac{x^2}{3}-\frac{2 x^3}{3}+\frac{2}{3} x^2 \sqrt{1+x+x^2}\right ) \, dx\\ &=-\frac{x^3}{9}-\frac{x^4}{6}+\frac{2}{3} \int x^2 \sqrt{1+x+x^2} \, dx\\ &=-\frac{x^3}{9}-\frac{x^4}{6}+\frac{1}{6} x \left (1+x+x^2\right )^{3/2}+\frac{1}{6} \int \left (-1-\frac{5 x}{2}\right ) \sqrt{1+x+x^2} \, dx\\ &=-\frac{x^3}{9}-\frac{x^4}{6}-\frac{5}{36} \left (1+x+x^2\right )^{3/2}+\frac{1}{6} x \left (1+x+x^2\right )^{3/2}+\frac{1}{24} \int \sqrt{1+x+x^2} \, dx\\ &=-\frac{x^3}{9}-\frac{x^4}{6}+\frac{1}{96} (1+2 x) \sqrt{1+x+x^2}-\frac{5}{36} \left (1+x+x^2\right )^{3/2}+\frac{1}{6} x \left (1+x+x^2\right )^{3/2}+\frac{1}{64} \int \frac{1}{\sqrt{1+x+x^2}} \, dx\\ &=-\frac{x^3}{9}-\frac{x^4}{6}+\frac{1}{96} (1+2 x) \sqrt{1+x+x^2}-\frac{5}{36} \left (1+x+x^2\right )^{3/2}+\frac{1}{6} x \left (1+x+x^2\right )^{3/2}+\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{1+\frac{x^2}{3}}} \, dx,x,1+2 x\right )}{64 \sqrt{3}}\\ &=-\frac{x^3}{9}-\frac{x^4}{6}+\frac{1}{96} (1+2 x) \sqrt{1+x+x^2}-\frac{5}{36} \left (1+x+x^2\right )^{3/2}+\frac{1}{6} x \left (1+x+x^2\right )^{3/2}+\frac{1}{64} \sinh ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )\\ \end{align*}
Mathematica [A] time = 0.0742065, size = 71, normalized size = 0.9 \[ \frac{1}{576} \left (-96 x^4-64 x^3+96 \left (x^2+x+1\right )^{3/2} x-80 \left (x^2+x+1\right )^{3/2}+6 (2 x+1) \sqrt{x^2+x+1}+9 \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 59, normalized size = 0.8 \begin{align*} -{\frac{{x}^{3}}{9}}-{\frac{{x}^{4}}{6}}+{\frac{x}{6} \left ({x}^{2}+x+1 \right ) ^{{\frac{3}{2}}}}-{\frac{5}{36} \left ({x}^{2}+x+1 \right ) ^{{\frac{3}{2}}}}+{\frac{1+2\,x}{96}\sqrt{{x}^{2}+x+1}}+{\frac{1}{64}{\it Arcsinh} \left ({\frac{2\,\sqrt{3}}{3} \left ( x+{\frac{1}{2}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{2 \, x + 2 \, \sqrt{x^{2} + x + 1} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.86522, size = 159, normalized size = 2.01 \begin{align*} -\frac{1}{6} \, x^{4} - \frac{1}{9} \, x^{3} + \frac{1}{288} \,{\left (48 \, x^{3} + 8 \, x^{2} + 14 \, x - 37\right )} \sqrt{x^{2} + x + 1} - \frac{1}{64} \, \log \left (-2 \, x + 2 \, \sqrt{x^{2} + x + 1} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{2 x + 2 \sqrt{x^{2} + x + 1} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06957, size = 73, normalized size = 0.92 \begin{align*} -\frac{1}{6} \, x^{4} - \frac{1}{9} \, x^{3} + \frac{1}{288} \,{\left (2 \,{\left (4 \,{\left (6 \, x + 1\right )} x + 7\right )} x - 37\right )} \sqrt{x^{2} + x + 1} - \frac{1}{64} \, \log \left (-2 \, x + 2 \, \sqrt{x^{2} + x + 1} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]