3.763 \(\int (1+2 x) (x+x^2)^3 \sqrt{1-(x+x^2)^2} \, dx\)

Optimal. Leaf size=42 \[ -\frac{1}{15} \left (-x^4-2 x^3-x^2+1\right )^{3/2} \left (3 x^4+6 x^3+3 x^2+2\right ) \]

[Out]

-((1 - x^2 - 2*x^3 - x^4)^(3/2)*(2 + 3*x^2 + 6*x^3 + 3*x^4))/15

________________________________________________________________________________________

Rubi [A]  time = 0.238925, antiderivative size = 59, normalized size of antiderivative = 1.4, number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {1593, 1680, 12, 1247, 692, 629} \[ -\frac{1}{5} x^2 \left (-x^4-2 x^3-x^2+1\right )^{3/2} (x+1)^2-\frac{2}{15} \left (-x^4-2 x^3-x^2+1\right )^{3/2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*(1 - x^2 - 2*x^3 - x^4)^(3/2))/15 - (x^2*(1 + x)^2*(1 - x^2 - 2*x^3 - x^4)^(3/2))/5

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1680

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -(d/(4*e)) + x)*(a + d^4/(256*e^3
) - (b*d)/(8*e) + (c - (3*d^2)/(8*e))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2,
0] && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1247

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 692

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

Rule 629

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

Rubi steps

\begin{align*} \int (1+2 x) \left (x+x^2\right )^3 \sqrt{1-\left (x+x^2\right )^2} \, dx &=\int x^3 (1+x)^3 (1+2 x) \sqrt{1-\left (x+x^2\right )^2} \, dx\\ &=\operatorname{Subst}\left (\int \frac{1}{128} x \left (-1+4 x^2\right )^3 \sqrt{15+8 x^2-16 x^4} \, dx,x,\frac{1}{2}+x\right )\\ &=\frac{1}{128} \operatorname{Subst}\left (\int x \left (-1+4 x^2\right )^3 \sqrt{15+8 x^2-16 x^4} \, dx,x,\frac{1}{2}+x\right )\\ &=\frac{1}{256} \operatorname{Subst}\left (\int (-1+4 x)^3 \sqrt{15+8 x-16 x^2} \, dx,x,\left (\frac{1}{2}+x\right )^2\right )\\ &=-\frac{1}{5} x^2 (1+x)^2 \left (1-x^2-2 x^3-x^4\right )^{3/2}+\frac{1}{40} \operatorname{Subst}\left (\int (-1+4 x) \sqrt{15+8 x-16 x^2} \, dx,x,\left (\frac{1}{2}+x\right )^2\right )\\ &=-\frac{2}{15} \left (1-x^2-2 x^3-x^4\right )^{3/2}-\frac{1}{5} x^2 (1+x)^2 \left (1-x^2-2 x^3-x^4\right )^{3/2}\\ \end{align*}

Mathematica [A]  time = 0.302387, size = 62, normalized size = 1.48 \[ \frac{1}{15} \sqrt{-x^4-2 x^3-x^2+1} \left (3 x^8+12 x^7+18 x^6+12 x^5+2 x^4-2 x^3-x^2-2\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[1 - x^2 - 2*x^3 - x^4]*(-2 - x^2 - 2*x^3 + 2*x^4 + 12*x^5 + 18*x^6 + 12*x^7 + 3*x^8))/15

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 51, normalized size = 1.2 \begin{align*}{\frac{ \left ( 3\,{x}^{4}+6\,{x}^{3}+3\,{x}^{2}+2 \right ) \left ({x}^{2}+x+1 \right ) \left ({x}^{2}+x-1 \right ) }{15}\sqrt{-{x}^{4}-2\,{x}^{3}-{x}^{2}+1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/15*(x^2+x+1)*(x^2+x-1)*(3*x^4+6*x^3+3*x^2+2)*(-x^4-2*x^3-x^2+1)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.1783, size = 80, normalized size = 1.9 \begin{align*} \frac{1}{15} \,{\left (3 \, x^{8} + 12 \, x^{7} + 18 \, x^{6} + 12 \, x^{5} + 2 \, x^{4} - 2 \, x^{3} - x^{2} - 2\right )} \sqrt{x^{2} + x + 1} \sqrt{-x^{2} - x + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/15*(3*x^8 + 12*x^7 + 18*x^6 + 12*x^5 + 2*x^4 - 2*x^3 - x^2 - 2)*sqrt(x^2 + x + 1)*sqrt(-x^2 - x + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.7886, size = 130, normalized size = 3.1 \begin{align*} \frac{1}{15} \,{\left (3 \, x^{8} + 12 \, x^{7} + 18 \, x^{6} + 12 \, x^{5} + 2 \, x^{4} - 2 \, x^{3} - x^{2} - 2\right )} \sqrt{-x^{4} - 2 \, x^{3} - x^{2} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/15*(3*x^8 + 12*x^7 + 18*x^6 + 12*x^5 + 2*x^4 - 2*x^3 - x^2 - 2)*sqrt(-x^4 - 2*x^3 - x^2 + 1)

________________________________________________________________________________________

Sympy [B]  time = 12.3649, size = 182, normalized size = 4.33 \begin{align*} \frac{x^{8} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{5} + \frac{4 x^{7} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{5} + \frac{6 x^{6} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{5} + \frac{4 x^{5} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{5} + \frac{2 x^{4} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{15} - \frac{2 x^{3} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{15} - \frac{x^{2} \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{15} - \frac{2 \sqrt{- x^{4} - 2 x^{3} - x^{2} + 1}}{15} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**8*sqrt(-x**4 - 2*x**3 - x**2 + 1)/5 + 4*x**7*sqrt(-x**4 - 2*x**3 - x**2 + 1)/5 + 6*x**6*sqrt(-x**4 - 2*x**3
 - x**2 + 1)/5 + 4*x**5*sqrt(-x**4 - 2*x**3 - x**2 + 1)/5 + 2*x**4*sqrt(-x**4 - 2*x**3 - x**2 + 1)/15 - 2*x**3
*sqrt(-x**4 - 2*x**3 - x**2 + 1)/15 - x**2*sqrt(-x**4 - 2*x**3 - x**2 + 1)/15 - 2*sqrt(-x**4 - 2*x**3 - x**2 +
 1)/15

________________________________________________________________________________________

Giac [A]  time = 1.17992, size = 69, normalized size = 1.64 \begin{align*} \frac{1}{15} \, \sqrt{-x^{4} - 2 \, x^{3} - x^{2} + 1}{\left ({\left ({\left ({\left (3 \,{\left ({\left ({\left (x + 4\right )} x + 6\right )} x + 4\right )} x + 2\right )} x - 2\right )} x - 1\right )} x^{2} - 2\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/15*sqrt(-x^4 - 2*x^3 - x^2 + 1)*((((3*(((x + 4)*x + 6)*x + 4)*x + 2)*x - 2)*x - 1)*x^2 - 2)