\(\int (1-2 x-2 x^2)^3 \, dx\) [479]

   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 = 12, antiderivative size = 36 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=x-3 x^2+2 x^3+4 x^4-\frac {12 x^5}{5}-4 x^6-\frac {8 x^7}{7} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {625} \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=-\frac {8 x^7}{7}-4 x^6-\frac {12 x^5}{5}+4 x^4+2 x^3-3 x^2+x \]

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

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*} \text {integral}& = \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] (verified)

Time = 0.00 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=x-3 x^2+2 x^3+4 x^4-\frac {12 x^5}{5}-4 x^6-\frac {8 x^7}{7} \]

[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

Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 33, normalized size of antiderivative = 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\)
parallelrisch \(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\)

[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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.89 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=-\frac {8}{7} \, x^{7} - 4 \, x^{6} - \frac {12}{5} \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - 3 \, x^{2} + x \]

[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

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.94 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=- \frac {8 x^{7}}{7} - 4 x^{6} - \frac {12 x^{5}}{5} + 4 x^{4} + 2 x^{3} - 3 x^{2} + x \]

[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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.89 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=-\frac {8}{7} \, x^{7} - 4 \, x^{6} - \frac {12}{5} \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - 3 \, x^{2} + x \]

[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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.89 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=-\frac {8}{7} \, x^{7} - 4 \, x^{6} - \frac {12}{5} \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - 3 \, x^{2} + x \]

[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

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.89 \[ \int \left (1-2 x-2 x^2\right )^3 \, dx=-\frac {8\,x^7}{7}-4\,x^6-\frac {12\,x^5}{5}+4\,x^4+2\,x^3-3\,x^2+x \]

[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