3.272 \(\int (1+x+x^2)^{3/2} \, dx\)

Optimal. Leaf size=55 \[ \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}+\frac{27}{128} \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right ) \]

[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

________________________________________________________________________________________

Rubi [A]  time = 0.0138136, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {612, 619, 215} \[ \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}+\frac{27}{128} \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right ) \]

Antiderivative was successfully verified.

[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 612

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 619

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]

Rule 215

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]

Rubi steps

\begin{align*} \int \left (1+x+x^2\right )^{3/2} \, dx &=\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 ) \operatorname{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} \sinh ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0151152, size = 46, normalized size = 0.84 \[ \frac{1}{128} \left (2 \sqrt{x^2+x+1} \left (16 x^3+24 x^2+42 x+17\right )+27 \sinh ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 43, normalized size = 0.8 \begin{align*}{\frac{1+2\,x}{8} \left ({x}^{2}+x+1 \right ) ^{{\frac{3}{2}}}}+{\frac{9+18\,x}{64}\sqrt{{x}^{2}+x+1}}+{\frac{27}{128}{\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]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.43395, size = 76, normalized size = 1.38 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

Fricas [A]  time = 2.10879, size = 134, normalized size = 2.44 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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 [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (x^{2} + x + 1\right )^{\frac{3}{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.0686, size = 59, normalized size = 1.07 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)