3.3.89 \(\int \frac {x^2}{1+2 x+2 \sqrt {1+x+x^2}} \, dx\) [289]

Optimal. Leaf size=79 \[ -\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 ) \]

[Out]

-1/9*x^3-1/6*x^4-5/36*(x^2+x+1)^(3/2)+1/6*x*(x^2+x+1)^(3/2)+1/64*arcsinh(1/3*(1+2*x)*3^(1/2))+1/96*(1+2*x)*(x^
2+x+1)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 79, normalized size of antiderivative = 1.00, 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 = {6874, 756, 654, 626, 633, 221} \begin {gather*} -\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 ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/9*x^3 - x^4/6 + ((1 + 2*x)*Sqrt[1 + x + x^2])/96 - (5*(1 + x + x^2)^(3/2))/36 + (x*(1 + x + x^2)^(3/2))/6 +
 ArcSinh[(1 + 2*x)/Sqrt[3]]/64

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]

Rule 654

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

Rule 756

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*
((a + b*x + c*x^2)^(p + 1)/(c*(m + 2*p + 1))), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2
*(m + 2*p + 1) - e*(a*e*(m - 1) + b*d*(p + 1)) + e*(2*c*d - b*e)*(m + p)*x, x]*(a + b*x + c*x^2)^p, x], x] /;
FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]
 && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, b, c, d, e, m,
p, x]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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 {\text {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.14, size = 64, normalized size = 0.81 \begin {gather*} -\frac {1}{18} x^3 (2+3 x)+\frac {1}{288} \sqrt {1+x+x^2} \left (-37+14 x+8 x^2+48 x^3\right )-\frac {1}{64} \log \left (-1-2 x+2 \sqrt {1+x+x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/18*(x^3*(2 + 3*x)) + (Sqrt[1 + x + x^2]*(-37 + 14*x + 8*x^2 + 48*x^3))/288 - Log[-1 - 2*x + 2*Sqrt[1 + x +
x^2]]/64

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 59, normalized size = 0.75

method result size
trager \(-\frac {\left (2+3 x \right ) x^{3}}{18}+\frac {\left (\frac {1}{2} x^{3}+\frac {1}{12} x^{2}+\frac {7}{48} x -\frac {37}{96}\right ) \sqrt {x^{2}+x +1}}{3}+\frac {\ln \left (1+2 x +2 \sqrt {x^{2}+x +1}\right )}{64}\) \(55\)
default \(-\frac {x^{3}}{9}-\frac {x^{4}}{6}+\frac {x \left (x^{2}+x +1\right )^{\frac {3}{2}}}{6}-\frac {5 \left (x^{2}+x +1\right )^{\frac {3}{2}}}{36}+\frac {\left (1+2 x \right ) \sqrt {x^{2}+x +1}}{96}+\frac {\arcsinh \left (\frac {2 \sqrt {3}\, \left (x +\frac {1}{2}\right )}{3}\right )}{64}\) \(59\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/9*x^3-1/6*x^4+1/6*x*(x^2+x+1)^(3/2)-5/36*(x^2+x+1)^(3/2)+1/96*(1+2*x)*(x^2+x+1)^(1/2)+1/64*arcsinh(2/3*3^(1
/2)*(x+1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^2/(2*x + 2*sqrt(x^2 + x + 1) + 1), x)

________________________________________________________________________________________

Fricas [A]
time = 1.44, size = 54, normalized size = 0.68 \begin {gather*} -\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 {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*x^4 - 1/9*x^3 + 1/288*(48*x^3 + 8*x^2 + 14*x - 37)*sqrt(x^2 + x + 1) - 1/64*log(-2*x + 2*sqrt(x^2 + x + 1
) - 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2}}{2 x + 2 \sqrt {x^{2} + x + 1} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 1.04, size = 54, normalized size = 0.68 \begin {gather*} -\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 {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*x^4 - 1/9*x^3 + 1/288*(2*(4*(6*x + 1)*x + 7)*x - 37)*sqrt(x^2 + x + 1) - 1/64*log(-2*x + 2*sqrt(x^2 + x +
 1) - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 71, normalized size = 0.90 \begin {gather*} \frac {\ln \left (x+\sqrt {x^2+x+1}+\frac {1}{2}\right )}{64}-\frac {\left (\frac {x}{2}+\frac {1}{4}\right )\,\sqrt {x^2+x+1}}{6}-\frac {x^3}{9}-\frac {x^4}{6}-\frac {5\,\left (8\,x^2+2\,x+5\right )\,\sqrt {x^2+x+1}}{288}+\frac {x\,{\left (x^2+x+1\right )}^{3/2}}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + (x + x^2 + 1)^(1/2) + 1/2)/64 - ((x/2 + 1/4)*(x + x^2 + 1)^(1/2))/6 - x^3/9 - x^4/6 - (5*(2*x + 8*x^2
+ 5)*(x + x^2 + 1)^(1/2))/288 + (x*(x + x^2 + 1)^(3/2))/6

________________________________________________________________________________________