3.479 \(\int (1-2 x-2 x^2)^3 \, dx\)

Optimal. Leaf size=36 \[ -\frac {8 x^7}{7}-4 x^6-\frac {12 x^5}{5}+4 x^4+2 x^3-3 x^2+x \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {611} \[ -\frac {8 x^7}{7}-4 x^6-\frac {12 x^5}{5}+4 x^4+2 x^3-3 x^2+x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 611

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x + c*x^2)^p, x], x] /;
FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && (EqQ[a, 0] ||  !PerfectSquareQ[b^2 - 4*a*c])

Rubi steps

\begin {align*} \int \left (1-2 x-2 x^2\right )^3 \, dx &=\int \left (1-6 x+6 x^2+16 x^3-12 x^4-24 x^5-8 x^6\right ) \, dx\\ &=x-3 x^2+2 x^3+4 x^4-\frac {12 x^5}{5}-4 x^6-\frac {8 x^7}{7}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 36, normalized size = 1.00 \[ -\frac {8 x^7}{7}-4 x^6-\frac {12 x^5}{5}+4 x^4+2 x^3-3 x^2+x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.01, size = 38, normalized size = 1.06 \[ \frac {1}{35} \left (-40 x^7-140 x^6-84 x^5+140 x^4+70 x^3-105 x^2+35 x\right ) \]

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(1 - 2*x - 2*x^2)^3,x]

[Out]

(35*x - 105*x^2 + 70*x^3 + 140*x^4 - 84*x^5 - 140*x^6 - 40*x^7)/35

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 32, normalized size = 0.89 \[ -\frac {8}{7} x^{7} - 4 x^{6} - \frac {12}{5} x^{5} + 4 x^{4} + 2 x^{3} - 3 x^{2} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-8/7*x^7 - 4*x^6 - 12/5*x^5 + 4*x^4 + 2*x^3 - 3*x^2 + x

________________________________________________________________________________________

giac [A]  time = 0.61, size = 32, normalized size = 0.89 \[ -\frac {8}{7} \, x^{7} - 4 \, x^{6} - \frac {12}{5} \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - 3 \, x^{2} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-8/7*x^7 - 4*x^6 - 12/5*x^5 + 4*x^4 + 2*x^3 - 3*x^2 + x

________________________________________________________________________________________

maple [A]  time = 0.36, size = 33, normalized size = 0.92




method result size



default \(x -3 x^{2}+2 x^{3}+4 x^{4}-\frac {12}{5} x^{5}-4 x^{6}-\frac {8}{7} x^{7}\) \(33\)
norman \(x -3 x^{2}+2 x^{3}+4 x^{4}-\frac {12}{5} x^{5}-4 x^{6}-\frac {8}{7} x^{7}\) \(33\)
risch \(x -3 x^{2}+2 x^{3}+4 x^{4}-\frac {12}{5} x^{5}-4 x^{6}-\frac {8}{7} x^{7}\) \(33\)
gosper \(-\frac {x \left (40 x^{6}+140 x^{5}+84 x^{4}-140 x^{3}-70 x^{2}+105 x -35\right )}{35}\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-3*x^2+2*x^3+4*x^4-12/5*x^5-4*x^6-8/7*x^7

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 32, normalized size = 0.89 \[ -\frac {8}{7} \, x^{7} - 4 \, x^{6} - \frac {12}{5} \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - 3 \, x^{2} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-8/7*x^7 - 4*x^6 - 12/5*x^5 + 4*x^4 + 2*x^3 - 3*x^2 + x

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 32, normalized size = 0.89 \[ -\frac {8\,x^7}{7}-4\,x^6-\frac {12\,x^5}{5}+4\,x^4+2\,x^3-3\,x^2+x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.06, size = 34, normalized size = 0.94 \[ - \frac {8 x^{7}}{7} - 4 x^{6} - \frac {12 x^{5}}{5} + 4 x^{4} + 2 x^{3} - 3 x^{2} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-8*x**7/7 - 4*x**6 - 12*x**5/5 + 4*x**4 + 2*x**3 - 3*x**2 + x

________________________________________________________________________________________