3.480 \(\int (-1+5 x) (-1-x+x^2)^2 \, dx\)

Optimal. Leaf size=39 \[ \frac{5 x^6}{6}-\frac{11 x^5}{5}-\frac{3 x^4}{4}+\frac{11 x^3}{3}+\frac{3 x^2}{2}-x \]

[Out]

-x + (3*x^2)/2 + (11*x^3)/3 - (3*x^4)/4 - (11*x^5)/5 + (5*x^6)/6

________________________________________________________________________________________

Rubi [A]  time = 0.0141987, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {631} \[ \frac{5 x^6}{6}-\frac{11 x^5}{5}-\frac{3 x^4}{4}+\frac{11 x^3}{3}+\frac{3 x^2}{2}-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x + (3*x^2)/2 + (11*x^3)/3 - (3*x^4)/4 - (11*x^5)/5 + (5*x^6)/6

Rule 631

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

Rubi steps

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

Mathematica [A]  time = 0.0013804, size = 39, normalized size = 1. \[ \frac{5 x^6}{6}-\frac{11 x^5}{5}-\frac{3 x^4}{4}+\frac{11 x^3}{3}+\frac{3 x^2}{2}-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x + (3*x^2)/2 + (11*x^3)/3 - (3*x^4)/4 - (11*x^5)/5 + (5*x^6)/6

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 30, normalized size = 0.8 \begin{align*} -x+{\frac{3\,{x}^{2}}{2}}+{\frac{11\,{x}^{3}}{3}}-{\frac{3\,{x}^{4}}{4}}-{\frac{11\,{x}^{5}}{5}}+{\frac{5\,{x}^{6}}{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x+3/2*x^2+11/3*x^3-3/4*x^4-11/5*x^5+5/6*x^6

________________________________________________________________________________________

Maxima [A]  time = 0.929819, size = 39, normalized size = 1. \begin{align*} \frac{5}{6} \, x^{6} - \frac{11}{5} \, x^{5} - \frac{3}{4} \, x^{4} + \frac{11}{3} \, x^{3} + \frac{3}{2} \, x^{2} - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*x^6 - 11/5*x^5 - 3/4*x^4 + 11/3*x^3 + 3/2*x^2 - x

________________________________________________________________________________________

Fricas [A]  time = 1.75093, size = 74, normalized size = 1.9 \begin{align*} \frac{5}{6} x^{6} - \frac{11}{5} x^{5} - \frac{3}{4} x^{4} + \frac{11}{3} x^{3} + \frac{3}{2} x^{2} - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*x^6 - 11/5*x^5 - 3/4*x^4 + 11/3*x^3 + 3/2*x^2 - x

________________________________________________________________________________________

Sympy [A]  time = 0.057382, size = 34, normalized size = 0.87 \begin{align*} \frac{5 x^{6}}{6} - \frac{11 x^{5}}{5} - \frac{3 x^{4}}{4} + \frac{11 x^{3}}{3} + \frac{3 x^{2}}{2} - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5*x**6/6 - 11*x**5/5 - 3*x**4/4 + 11*x**3/3 + 3*x**2/2 - x

________________________________________________________________________________________

Giac [A]  time = 1.06274, size = 39, normalized size = 1. \begin{align*} \frac{5}{6} \, x^{6} - \frac{11}{5} \, x^{5} - \frac{3}{4} \, x^{4} + \frac{11}{3} \, x^{3} + \frac{3}{2} \, x^{2} - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*x^6 - 11/5*x^5 - 3/4*x^4 + 11/3*x^3 + 3/2*x^2 - x