\(\int x^2 (a+b x+c x^2+d x^3)^p (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3) \, dx\) [235]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 51, antiderivative size = 23 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx=x^3 \left (a+b x+c x^2+d x^3\right )^{1+p} \]

[Out]

x^3*(d*x^3+c*x^2+b*x+a)^(p+1)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.020, Rules used = {1602} \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx=x^3 \left (a+b x+c x^2+d x^3\right )^{p+1} \]

[In]

Int[x^2*(a + b*x + c*x^2 + d*x^3)^p*(3*a + b*(4 + p)*x + c*(5 + 2*p)*x^2 + d*(6 + 3*p)*x^3),x]

[Out]

x^3*(a + b*x + c*x^2 + d*x^3)^(1 + p)

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = x^3 \left (a+b x+c x^2+d x^3\right )^{1+p} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.16 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx=x^3 (a+x (b+x (c+d x)))^{1+p} \]

[In]

Integrate[x^2*(a + b*x + c*x^2 + d*x^3)^p*(3*a + b*(4 + p)*x + c*(5 + 2*p)*x^2 + d*(6 + 3*p)*x^3),x]

[Out]

x^3*(a + x*(b + x*(c + d*x)))^(1 + p)

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04

method result size
gosper \(x^{3} \left (x^{3} d +c \,x^{2}+b x +a \right )^{1+p}\) \(24\)
risch \(\left (x^{3} d +c \,x^{2}+b x +a \right )^{p} x^{3} \left (x^{3} d +c \,x^{2}+b x +a \right )\) \(37\)
norman \(a \,x^{3} {\mathrm e}^{p \ln \left (x^{3} d +c \,x^{2}+b x +a \right )}+b \,x^{4} {\mathrm e}^{p \ln \left (x^{3} d +c \,x^{2}+b x +a \right )}+c \,x^{5} {\mathrm e}^{p \ln \left (x^{3} d +c \,x^{2}+b x +a \right )}+d \,x^{6} {\mathrm e}^{p \ln \left (x^{3} d +c \,x^{2}+b x +a \right )}\) \(98\)
parallelrisch \(\frac {x^{6} \left (x^{3} d +c \,x^{2}+b x +a \right )^{p} c d +x^{5} \left (x^{3} d +c \,x^{2}+b x +a \right )^{p} c^{2}+x^{4} \left (x^{3} d +c \,x^{2}+b x +a \right )^{p} b c +x^{3} \left (x^{3} d +c \,x^{2}+b x +a \right )^{p} a c}{c}\) \(99\)

[In]

int(x^2*(d*x^3+c*x^2+b*x+a)^p*(3*a+b*(4+p)*x+c*(5+2*p)*x^2+d*(6+3*p)*x^3),x,method=_RETURNVERBOSE)

[Out]

x^3*(d*x^3+c*x^2+b*x+a)^(1+p)

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.70 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx={\left (d x^{6} + c x^{5} + b x^{4} + a x^{3}\right )} {\left (d x^{3} + c x^{2} + b x + a\right )}^{p} \]

[In]

integrate(x^2*(d*x^3+c*x^2+b*x+a)^p*(3*a+b*(4+p)*x+c*(5+2*p)*x^2+d*(6+3*p)*x^3),x, algorithm="fricas")

[Out]

(d*x^6 + c*x^5 + b*x^4 + a*x^3)*(d*x^3 + c*x^2 + b*x + a)^p

Sympy [F(-1)]

Timed out. \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx=\text {Timed out} \]

[In]

integrate(x**2*(d*x**3+c*x**2+b*x+a)**p*(3*a+b*(4+p)*x+c*(5+2*p)*x**2+d*(6+3*p)*x**3),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.70 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx={\left (d x^{6} + c x^{5} + b x^{4} + a x^{3}\right )} {\left (d x^{3} + c x^{2} + b x + a\right )}^{p} \]

[In]

integrate(x^2*(d*x^3+c*x^2+b*x+a)^p*(3*a+b*(4+p)*x+c*(5+2*p)*x^2+d*(6+3*p)*x^3),x, algorithm="maxima")

[Out]

(d*x^6 + c*x^5 + b*x^4 + a*x^3)*(d*x^3 + c*x^2 + b*x + a)^p

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 89 vs. \(2 (23) = 46\).

Time = 0.53 (sec) , antiderivative size = 89, normalized size of antiderivative = 3.87 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx={\left (d x^{3} + c x^{2} + b x + a\right )}^{p} d x^{6} + {\left (d x^{3} + c x^{2} + b x + a\right )}^{p} c x^{5} + {\left (d x^{3} + c x^{2} + b x + a\right )}^{p} b x^{4} + {\left (d x^{3} + c x^{2} + b x + a\right )}^{p} a x^{3} \]

[In]

integrate(x^2*(d*x^3+c*x^2+b*x+a)^p*(3*a+b*(4+p)*x+c*(5+2*p)*x^2+d*(6+3*p)*x^3),x, algorithm="giac")

[Out]

(d*x^3 + c*x^2 + b*x + a)^p*d*x^6 + (d*x^3 + c*x^2 + b*x + a)^p*c*x^5 + (d*x^3 + c*x^2 + b*x + a)^p*b*x^4 + (d
*x^3 + c*x^2 + b*x + a)^p*a*x^3

Mupad [B] (verification not implemented)

Time = 9.11 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.70 \[ \int x^2 \left (a+b x+c x^2+d x^3\right )^p \left (3 a+b (4+p) x+c (5+2 p) x^2+d (6+3 p) x^3\right ) \, dx={\left (d\,x^3+c\,x^2+b\,x+a\right )}^p\,\left (d\,x^6+c\,x^5+b\,x^4+a\,x^3\right ) \]

[In]

int(x^2*(a + b*x + c*x^2 + d*x^3)^p*(3*a + b*x*(p + 4) + c*x^2*(2*p + 5) + d*x^3*(3*p + 6)),x)

[Out]

(a + b*x + c*x^2 + d*x^3)^p*(a*x^3 + b*x^4 + c*x^5 + d*x^6)