Optimal. Leaf size=65 \[ \frac {1}{64} (1+2 x) \sqrt {1+x+x^2}-\frac {5}{24} \left (1+x+x^2\right )^{3/2}+\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {3}{128} \sinh ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {756, 654, 626,
633, 221} \begin {gather*} \frac {1}{4} x \left (x^2+x+1\right )^{3/2}-\frac {5}{24} \left (x^2+x+1\right )^{3/2}+\frac {1}{64} (2 x+1) \sqrt {x^2+x+1}+\frac {3}{128} \sinh ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 626
Rule 633
Rule 654
Rule 756
Rubi steps
\begin {align*} \int x^2 \sqrt {1+x+x^2} \, dx &=\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {1}{4} \int \left (-1-\frac {5 x}{2}\right ) \sqrt {1+x+x^2} \, dx\\ &=-\frac {5}{24} \left (1+x+x^2\right )^{3/2}+\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {1}{16} \int \sqrt {1+x+x^2} \, dx\\ &=\frac {1}{64} (1+2 x) \sqrt {1+x+x^2}-\frac {5}{24} \left (1+x+x^2\right )^{3/2}+\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {3}{128} \int \frac {1}{\sqrt {1+x+x^2}} \, dx\\ &=\frac {1}{64} (1+2 x) \sqrt {1+x+x^2}-\frac {5}{24} \left (1+x+x^2\right )^{3/2}+\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {1}{128} \sqrt {3} \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{3}}} \, dx,x,1+2 x\right )\\ &=\frac {1}{64} (1+2 x) \sqrt {1+x+x^2}-\frac {5}{24} \left (1+x+x^2\right )^{3/2}+\frac {1}{4} x \left (1+x+x^2\right )^{3/2}+\frac {3}{128} \sinh ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 52, normalized size = 0.80 \begin {gather*} \frac {1}{192} \sqrt {1+x+x^2} \left (-37+14 x+8 x^2+48 x^3\right )-\frac {3}{128} \log \left (-1-2 x+2 \sqrt {1+x+x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 49, normalized size = 0.75
method | result | size |
risch | \(\frac {\left (48 x^{3}+8 x^{2}+14 x -37\right ) \sqrt {x^{2}+x +1}}{192}+\frac {3 \arcsinh \left (\frac {2 \sqrt {3}\, \left (x +\frac {1}{2}\right )}{3}\right )}{128}\) | \(38\) |
trager | \(\left (\frac {1}{4} x^{3}+\frac {1}{24} x^{2}+\frac {7}{96} x -\frac {37}{192}\right ) \sqrt {x^{2}+x +1}-\frac {3 \ln \left (2 \sqrt {x^{2}+x +1}-1-2 x \right )}{128}\) | \(44\) |
default | \(\frac {x \left (x^{2}+x +1\right )^{\frac {3}{2}}}{4}-\frac {5 \left (x^{2}+x +1\right )^{\frac {3}{2}}}{24}+\frac {\left (1+2 x \right ) \sqrt {x^{2}+x +1}}{64}+\frac {3 \arcsinh \left (\frac {2 \sqrt {3}\, \left (x +\frac {1}{2}\right )}{3}\right )}{128}\) | \(49\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 3.71, size = 56, normalized size = 0.86 \begin {gather*} \frac {1}{4} \, {\left (x^{2} + x + 1\right )}^{\frac {3}{2}} x - \frac {5}{24} \, {\left (x^{2} + x + 1\right )}^{\frac {3}{2}} + \frac {1}{32} \, \sqrt {x^{2} + x + 1} x + \frac {1}{64} \, \sqrt {x^{2} + x + 1} + \frac {3}{128} \, \operatorname {arsinh}\left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.90, size = 44, normalized size = 0.68 \begin {gather*} \frac {1}{192} \, {\left (48 \, x^{3} + 8 \, x^{2} + 14 \, x - 37\right )} \sqrt {x^{2} + x + 1} - \frac {3}{128} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x + 1} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \sqrt {x^{2} + x + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.89, size = 44, normalized size = 0.68 \begin {gather*} \frac {1}{192} \, {\left (2 \, {\left (4 \, {\left (6 \, x + 1\right )} x + 7\right )} x - 37\right )} \sqrt {x^{2} + x + 1} - \frac {3}{128} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x + 1} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.13, size = 61, normalized size = 0.94 \begin {gather*} \frac {3\,\ln \left (x+\sqrt {x^2+x+1}+\frac {1}{2}\right )}{128}-\frac {\left (\frac {x}{2}+\frac {1}{4}\right )\,\sqrt {x^2+x+1}}{4}-\frac {5\,\left (8\,x^2+2\,x+5\right )\,\sqrt {x^2+x+1}}{192}+\frac {x\,{\left (x^2+x+1\right )}^{3/2}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________