\(\int (1+x+x^2)^{3/2} \, dx\) [272]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 55 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {9}{64} (1+2 x) \sqrt {1+x+x^2}+\frac {1}{8} (1+2 x) \left (1+x+x^2\right )^{3/2}+\frac {27}{128} \text {arcsinh}\left (\frac {1+2 x}{\sqrt {3}}\right ) \]

[Out]

1/8*(1+2*x)*(x^2+x+1)^(3/2)+27/128*arcsinh(1/3*(1+2*x)*3^(1/2))+9/64*(1+2*x)*(x^2+x+1)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {626, 633, 221} \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {27}{128} \text {arcsinh}\left (\frac {2 x+1}{\sqrt {3}}\right )+\frac {1}{8} (2 x+1) \left (x^2+x+1\right )^{3/2}+\frac {9}{64} (2 x+1) \sqrt {x^2+x+1} \]

[In]

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

[Out]

(9*(1 + 2*x)*Sqrt[1 + x + x^2])/64 + ((1 + 2*x)*(1 + x + x^2)^(3/2))/8 + (27*ArcSinh[(1 + 2*x)/Sqrt[3]])/128

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 626

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1
))), x] - Dist[p*((b^2 - 4*a*c)/(2*c*(2*p + 1))), Int[(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c}, x]
 && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 0] && IntegerQ[4*p]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{8} (1+2 x) \left (1+x+x^2\right )^{3/2}+\frac {9}{16} \int \sqrt {1+x+x^2} \, dx \\ & = \frac {9}{64} (1+2 x) \sqrt {1+x+x^2}+\frac {1}{8} (1+2 x) \left (1+x+x^2\right )^{3/2}+\frac {27}{128} \int \frac {1}{\sqrt {1+x+x^2}} \, dx \\ & = \frac {9}{64} (1+2 x) \sqrt {1+x+x^2}+\frac {1}{8} (1+2 x) \left (1+x+x^2\right )^{3/2}+\frac {1}{128} \left (9 \sqrt {3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{3}}} \, dx,x,1+2 x\right ) \\ & = \frac {9}{64} (1+2 x) \sqrt {1+x+x^2}+\frac {1}{8} (1+2 x) \left (1+x+x^2\right )^{3/2}+\frac {27}{128} \text {arcsinh}\left (\frac {1+2 x}{\sqrt {3}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.95 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {1}{64} \sqrt {1+x+x^2} \left (17+42 x+24 x^2+16 x^3\right )-\frac {27}{128} \log \left (-1-2 x+2 \sqrt {1+x+x^2}\right ) \]

[In]

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

[Out]

(Sqrt[1 + x + x^2]*(17 + 42*x + 24*x^2 + 16*x^3))/64 - (27*Log[-1 - 2*x + 2*Sqrt[1 + x + x^2]])/128

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.69

method result size
risch \(\frac {\left (16 x^{3}+24 x^{2}+42 x +17\right ) \sqrt {x^{2}+x +1}}{64}+\frac {27 \,\operatorname {arcsinh}\left (\frac {2 \sqrt {3}\, \left (x +\frac {1}{2}\right )}{3}\right )}{128}\) \(38\)
default \(\frac {\left (1+2 x \right ) \left (x^{2}+x +1\right )^{\frac {3}{2}}}{8}+\frac {9 \left (1+2 x \right ) \sqrt {x^{2}+x +1}}{64}+\frac {27 \,\operatorname {arcsinh}\left (\frac {2 \sqrt {3}\, \left (x +\frac {1}{2}\right )}{3}\right )}{128}\) \(43\)
trager \(\left (\frac {1}{4} x^{3}+\frac {3}{8} x^{2}+\frac {21}{32} x +\frac {17}{64}\right ) \sqrt {x^{2}+x +1}+\frac {27 \ln \left (1+2 x +2 \sqrt {x^{2}+x +1}\right )}{128}\) \(44\)

[In]

int((x^2+x+1)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/64*(16*x^3+24*x^2+42*x+17)*(x^2+x+1)^(1/2)+27/128*arcsinh(2/3*3^(1/2)*(x+1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.80 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {1}{64} \, {\left (16 \, x^{3} + 24 \, x^{2} + 42 \, x + 17\right )} \sqrt {x^{2} + x + 1} - \frac {27}{128} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x + 1} - 1\right ) \]

[In]

integrate((x^2+x+1)^(3/2),x, algorithm="fricas")

[Out]

1/64*(16*x^3 + 24*x^2 + 42*x + 17)*sqrt(x^2 + x + 1) - 27/128*log(-2*x + 2*sqrt(x^2 + x + 1) - 1)

Sympy [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.55 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\left (\frac {x}{2} + \frac {1}{4}\right ) \sqrt {x^{2} + x + 1} + \left (\frac {x^{2}}{3} + \frac {x}{12} + \frac {5}{24}\right ) \sqrt {x^{2} + x + 1} + \sqrt {x^{2} + x + 1} \left (\frac {x^{3}}{4} + \frac {x^{2}}{24} + \frac {7 x}{96} - \frac {37}{192}\right ) + \frac {27 \operatorname {asinh}{\left (\frac {2 \sqrt {3} \left (x + \frac {1}{2}\right )}{3} \right )}}{128} \]

[In]

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

[Out]

(x/2 + 1/4)*sqrt(x**2 + x + 1) + (x**2/3 + x/12 + 5/24)*sqrt(x**2 + x + 1) + sqrt(x**2 + x + 1)*(x**3/4 + x**2
/24 + 7*x/96 - 37/192) + 27*asinh(2*sqrt(3)*(x + 1/2)/3)/128

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.02 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {1}{4} \, {\left (x^{2} + x + 1\right )}^{\frac {3}{2}} x + \frac {1}{8} \, {\left (x^{2} + x + 1\right )}^{\frac {3}{2}} + \frac {9}{32} \, \sqrt {x^{2} + x + 1} x + \frac {9}{64} \, \sqrt {x^{2} + x + 1} + \frac {27}{128} \, \operatorname {arsinh}\left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) \]

[In]

integrate((x^2+x+1)^(3/2),x, algorithm="maxima")

[Out]

1/4*(x^2 + x + 1)^(3/2)*x + 1/8*(x^2 + x + 1)^(3/2) + 9/32*sqrt(x^2 + x + 1)*x + 9/64*sqrt(x^2 + x + 1) + 27/1
28*arcsinh(1/3*sqrt(3)*(2*x + 1))

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.80 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {1}{64} \, {\left (2 \, {\left (4 \, {\left (2 \, x + 3\right )} x + 21\right )} x + 17\right )} \sqrt {x^{2} + x + 1} - \frac {27}{128} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x + 1} - 1\right ) \]

[In]

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

[Out]

1/64*(2*(4*(2*x + 3)*x + 21)*x + 17)*sqrt(x^2 + x + 1) - 27/128*log(-2*x + 2*sqrt(x^2 + x + 1) - 1)

Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.78 \[ \int \left (1+x+x^2\right )^{3/2} \, dx=\frac {27\,\ln \left (x+\sqrt {x^2+x+1}+\frac {1}{2}\right )}{128}+\frac {\left (x+\frac {1}{2}\right )\,{\left (x^2+x+1\right )}^{3/2}}{4}+\frac {9\,\left (\frac {x}{2}+\frac {1}{4}\right )\,\sqrt {x^2+x+1}}{16} \]

[In]

int((x + x^2 + 1)^(3/2),x)

[Out]

(27*log(x + (x + x^2 + 1)^(1/2) + 1/2))/128 + ((x + 1/2)*(x + x^2 + 1)^(3/2))/4 + (9*(x/2 + 1/4)*(x + x^2 + 1)
^(1/2))/16