### 3.2119 $$\int (d+e x)^3 (a+b x+c x^2)^2 \, dx$$

Optimal. Leaf size=156 $\frac{(d+e x)^6 \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{6 e^5}-\frac{2 (d+e x)^5 (2 c d-b e) \left (a e^2-b d e+c d^2\right )}{5 e^5}+\frac{(d+e x)^4 \left (a e^2-b d e+c d^2\right )^2}{4 e^5}-\frac{2 c (d+e x)^7 (2 c d-b e)}{7 e^5}+\frac{c^2 (d+e x)^8}{8 e^5}$

[Out]

((c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^4)/(4*e^5) - (2*(2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^5)/(5*e^5
) + ((6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*(d + e*x)^6)/(6*e^5) - (2*c*(2*c*d - b*e)*(d + e*x)^7)/(7*e^5
) + (c^2*(d + e*x)^8)/(8*e^5)

________________________________________________________________________________________

Rubi [A]  time = 0.174232, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 20, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.05, Rules used = {698} $\frac{(d+e x)^6 \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{6 e^5}-\frac{2 (d+e x)^5 (2 c d-b e) \left (a e^2-b d e+c d^2\right )}{5 e^5}+\frac{(d+e x)^4 \left (a e^2-b d e+c d^2\right )^2}{4 e^5}-\frac{2 c (d+e x)^7 (2 c d-b e)}{7 e^5}+\frac{c^2 (d+e x)^8}{8 e^5}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x)^3*(a + b*x + c*x^2)^2,x]

[Out]

((c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^4)/(4*e^5) - (2*(2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^5)/(5*e^5
) + ((6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*(d + e*x)^6)/(6*e^5) - (2*c*(2*c*d - b*e)*(d + e*x)^7)/(7*e^5
) + (c^2*(d + e*x)^8)/(8*e^5)

Rule 698

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

Rubi steps

\begin{align*} \int (d+e x)^3 \left (a+b x+c x^2\right )^2 \, dx &=\int \left (\frac{\left (c d^2-b d e+a e^2\right )^2 (d+e x)^3}{e^4}+\frac{2 (-2 c d+b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^4}{e^4}+\frac{\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^5}{e^4}-\frac{2 c (2 c d-b e) (d+e x)^6}{e^4}+\frac{c^2 (d+e x)^7}{e^4}\right ) \, dx\\ &=\frac{\left (c d^2-b d e+a e^2\right )^2 (d+e x)^4}{4 e^5}-\frac{2 (2 c d-b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^5}{5 e^5}+\frac{\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^6}{6 e^5}-\frac{2 c (2 c d-b e) (d+e x)^7}{7 e^5}+\frac{c^2 (d+e x)^8}{8 e^5}\\ \end{align*}

Mathematica [A]  time = 0.0646776, size = 223, normalized size = 1.43 $\frac{1}{4} x^4 \left (a^2 e^3+6 a b d e^2+6 a c d^2 e+3 b^2 d^2 e+2 b c d^3\right )+a^2 d^3 x+\frac{1}{6} e x^6 \left (2 c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right )+\frac{1}{3} d x^3 \left (6 a b d e+a \left (3 a e^2+2 c d^2\right )+b^2 d^2\right )+\frac{1}{5} x^5 \left (6 c d e (a e+b d)+b e^2 (2 a e+3 b d)+c^2 d^3\right )+\frac{1}{2} a d^2 x^2 (3 a e+2 b d)+\frac{1}{7} c e^2 x^7 (2 b e+3 c d)+\frac{1}{8} c^2 e^3 x^8$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(d + e*x)^3*(a + b*x + c*x^2)^2,x]

[Out]

a^2*d^3*x + (a*d^2*(2*b*d + 3*a*e)*x^2)/2 + (d*(b^2*d^2 + 6*a*b*d*e + a*(2*c*d^2 + 3*a*e^2))*x^3)/3 + ((2*b*c*
d^3 + 3*b^2*d^2*e + 6*a*c*d^2*e + 6*a*b*d*e^2 + a^2*e^3)*x^4)/4 + ((c^2*d^3 + 6*c*d*e*(b*d + a*e) + b*e^2*(3*b
*d + 2*a*e))*x^5)/5 + (e*(3*c^2*d^2 + b^2*e^2 + 2*c*e*(3*b*d + a*e))*x^6)/6 + (c*e^2*(3*c*d + 2*b*e)*x^7)/7 +
(c^2*e^3*x^8)/8

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 219, normalized size = 1.4 \begin{align*}{\frac{{c}^{2}{e}^{3}{x}^{8}}{8}}+{\frac{ \left ( 2\,{e}^{3}bc+3\,d{e}^{2}{c}^{2} \right ){x}^{7}}{7}}+{\frac{ \left ( 3\,{d}^{2}e{c}^{2}+6\,d{e}^{2}bc+{e}^{3} \left ( 2\,ac+{b}^{2} \right ) \right ){x}^{6}}{6}}+{\frac{ \left ({c}^{2}{d}^{3}+6\,{d}^{2}ebc+3\,d{e}^{2} \left ( 2\,ac+{b}^{2} \right ) +2\,ab{e}^{3} \right ){x}^{5}}{5}}+{\frac{ \left ( 2\,{d}^{3}bc+3\,{d}^{2}e \left ( 2\,ac+{b}^{2} \right ) +6\,d{e}^{2}ab+{a}^{2}{e}^{3} \right ){x}^{4}}{4}}+{\frac{ \left ({d}^{3} \left ( 2\,ac+{b}^{2} \right ) +6\,{d}^{2}eab+3\,d{e}^{2}{a}^{2} \right ){x}^{3}}{3}}+{\frac{ \left ( 3\,{d}^{2}e{a}^{2}+2\,{d}^{3}ab \right ){x}^{2}}{2}}+{d}^{3}{a}^{2}x \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^3*(c*x^2+b*x+a)^2,x)

[Out]

1/8*c^2*e^3*x^8+1/7*(2*b*c*e^3+3*c^2*d*e^2)*x^7+1/6*(3*d^2*e*c^2+6*d*e^2*b*c+e^3*(2*a*c+b^2))*x^6+1/5*(c^2*d^3
+6*d^2*e*b*c+3*d*e^2*(2*a*c+b^2)+2*a*b*e^3)*x^5+1/4*(2*d^3*b*c+3*d^2*e*(2*a*c+b^2)+6*d*e^2*a*b+a^2*e^3)*x^4+1/
3*(d^3*(2*a*c+b^2)+6*d^2*e*a*b+3*d*e^2*a^2)*x^3+1/2*(3*a^2*d^2*e+2*a*b*d^3)*x^2+d^3*a^2*x

________________________________________________________________________________________

Maxima [A]  time = 0.977418, size = 294, normalized size = 1.88 \begin{align*} \frac{1}{8} \, c^{2} e^{3} x^{8} + \frac{1}{7} \,{\left (3 \, c^{2} d e^{2} + 2 \, b c e^{3}\right )} x^{7} + \frac{1}{6} \,{\left (3 \, c^{2} d^{2} e + 6 \, b c d e^{2} +{\left (b^{2} + 2 \, a c\right )} e^{3}\right )} x^{6} + a^{2} d^{3} x + \frac{1}{5} \,{\left (c^{2} d^{3} + 6 \, b c d^{2} e + 2 \, a b e^{3} + 3 \,{\left (b^{2} + 2 \, a c\right )} d e^{2}\right )} x^{5} + \frac{1}{4} \,{\left (2 \, b c d^{3} + 6 \, a b d e^{2} + a^{2} e^{3} + 3 \,{\left (b^{2} + 2 \, a c\right )} d^{2} e\right )} x^{4} + \frac{1}{3} \,{\left (6 \, a b d^{2} e + 3 \, a^{2} d e^{2} +{\left (b^{2} + 2 \, a c\right )} d^{3}\right )} x^{3} + \frac{1}{2} \,{\left (2 \, a b d^{3} + 3 \, a^{2} d^{2} e\right )} x^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)^2,x, algorithm="maxima")

[Out]

1/8*c^2*e^3*x^8 + 1/7*(3*c^2*d*e^2 + 2*b*c*e^3)*x^7 + 1/6*(3*c^2*d^2*e + 6*b*c*d*e^2 + (b^2 + 2*a*c)*e^3)*x^6
+ a^2*d^3*x + 1/5*(c^2*d^3 + 6*b*c*d^2*e + 2*a*b*e^3 + 3*(b^2 + 2*a*c)*d*e^2)*x^5 + 1/4*(2*b*c*d^3 + 6*a*b*d*e
^2 + a^2*e^3 + 3*(b^2 + 2*a*c)*d^2*e)*x^4 + 1/3*(6*a*b*d^2*e + 3*a^2*d*e^2 + (b^2 + 2*a*c)*d^3)*x^3 + 1/2*(2*a
*b*d^3 + 3*a^2*d^2*e)*x^2

________________________________________________________________________________________

Fricas [A]  time = 1.80195, size = 587, normalized size = 3.76 \begin{align*} \frac{1}{8} x^{8} e^{3} c^{2} + \frac{3}{7} x^{7} e^{2} d c^{2} + \frac{2}{7} x^{7} e^{3} c b + \frac{1}{2} x^{6} e d^{2} c^{2} + x^{6} e^{2} d c b + \frac{1}{6} x^{6} e^{3} b^{2} + \frac{1}{3} x^{6} e^{3} c a + \frac{1}{5} x^{5} d^{3} c^{2} + \frac{6}{5} x^{5} e d^{2} c b + \frac{3}{5} x^{5} e^{2} d b^{2} + \frac{6}{5} x^{5} e^{2} d c a + \frac{2}{5} x^{5} e^{3} b a + \frac{1}{2} x^{4} d^{3} c b + \frac{3}{4} x^{4} e d^{2} b^{2} + \frac{3}{2} x^{4} e d^{2} c a + \frac{3}{2} x^{4} e^{2} d b a + \frac{1}{4} x^{4} e^{3} a^{2} + \frac{1}{3} x^{3} d^{3} b^{2} + \frac{2}{3} x^{3} d^{3} c a + 2 x^{3} e d^{2} b a + x^{3} e^{2} d a^{2} + x^{2} d^{3} b a + \frac{3}{2} x^{2} e d^{2} a^{2} + x d^{3} a^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)^2,x, algorithm="fricas")

[Out]

1/8*x^8*e^3*c^2 + 3/7*x^7*e^2*d*c^2 + 2/7*x^7*e^3*c*b + 1/2*x^6*e*d^2*c^2 + x^6*e^2*d*c*b + 1/6*x^6*e^3*b^2 +
1/3*x^6*e^3*c*a + 1/5*x^5*d^3*c^2 + 6/5*x^5*e*d^2*c*b + 3/5*x^5*e^2*d*b^2 + 6/5*x^5*e^2*d*c*a + 2/5*x^5*e^3*b*
a + 1/2*x^4*d^3*c*b + 3/4*x^4*e*d^2*b^2 + 3/2*x^4*e*d^2*c*a + 3/2*x^4*e^2*d*b*a + 1/4*x^4*e^3*a^2 + 1/3*x^3*d^
3*b^2 + 2/3*x^3*d^3*c*a + 2*x^3*e*d^2*b*a + x^3*e^2*d*a^2 + x^2*d^3*b*a + 3/2*x^2*e*d^2*a^2 + x*d^3*a^2

________________________________________________________________________________________

Sympy [A]  time = 0.098688, size = 260, normalized size = 1.67 \begin{align*} a^{2} d^{3} x + \frac{c^{2} e^{3} x^{8}}{8} + x^{7} \left (\frac{2 b c e^{3}}{7} + \frac{3 c^{2} d e^{2}}{7}\right ) + x^{6} \left (\frac{a c e^{3}}{3} + \frac{b^{2} e^{3}}{6} + b c d e^{2} + \frac{c^{2} d^{2} e}{2}\right ) + x^{5} \left (\frac{2 a b e^{3}}{5} + \frac{6 a c d e^{2}}{5} + \frac{3 b^{2} d e^{2}}{5} + \frac{6 b c d^{2} e}{5} + \frac{c^{2} d^{3}}{5}\right ) + x^{4} \left (\frac{a^{2} e^{3}}{4} + \frac{3 a b d e^{2}}{2} + \frac{3 a c d^{2} e}{2} + \frac{3 b^{2} d^{2} e}{4} + \frac{b c d^{3}}{2}\right ) + x^{3} \left (a^{2} d e^{2} + 2 a b d^{2} e + \frac{2 a c d^{3}}{3} + \frac{b^{2} d^{3}}{3}\right ) + x^{2} \left (\frac{3 a^{2} d^{2} e}{2} + a b d^{3}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**3*(c*x**2+b*x+a)**2,x)

[Out]

a**2*d**3*x + c**2*e**3*x**8/8 + x**7*(2*b*c*e**3/7 + 3*c**2*d*e**2/7) + x**6*(a*c*e**3/3 + b**2*e**3/6 + b*c*
d*e**2 + c**2*d**2*e/2) + x**5*(2*a*b*e**3/5 + 6*a*c*d*e**2/5 + 3*b**2*d*e**2/5 + 6*b*c*d**2*e/5 + c**2*d**3/5
) + x**4*(a**2*e**3/4 + 3*a*b*d*e**2/2 + 3*a*c*d**2*e/2 + 3*b**2*d**2*e/4 + b*c*d**3/2) + x**3*(a**2*d*e**2 +
2*a*b*d**2*e + 2*a*c*d**3/3 + b**2*d**3/3) + x**2*(3*a**2*d**2*e/2 + a*b*d**3)

________________________________________________________________________________________

Giac [A]  time = 1.09897, size = 342, normalized size = 2.19 \begin{align*} \frac{1}{8} \, c^{2} x^{8} e^{3} + \frac{3}{7} \, c^{2} d x^{7} e^{2} + \frac{1}{2} \, c^{2} d^{2} x^{6} e + \frac{1}{5} \, c^{2} d^{3} x^{5} + \frac{2}{7} \, b c x^{7} e^{3} + b c d x^{6} e^{2} + \frac{6}{5} \, b c d^{2} x^{5} e + \frac{1}{2} \, b c d^{3} x^{4} + \frac{1}{6} \, b^{2} x^{6} e^{3} + \frac{1}{3} \, a c x^{6} e^{3} + \frac{3}{5} \, b^{2} d x^{5} e^{2} + \frac{6}{5} \, a c d x^{5} e^{2} + \frac{3}{4} \, b^{2} d^{2} x^{4} e + \frac{3}{2} \, a c d^{2} x^{4} e + \frac{1}{3} \, b^{2} d^{3} x^{3} + \frac{2}{3} \, a c d^{3} x^{3} + \frac{2}{5} \, a b x^{5} e^{3} + \frac{3}{2} \, a b d x^{4} e^{2} + 2 \, a b d^{2} x^{3} e + a b d^{3} x^{2} + \frac{1}{4} \, a^{2} x^{4} e^{3} + a^{2} d x^{3} e^{2} + \frac{3}{2} \, a^{2} d^{2} x^{2} e + a^{2} d^{3} x \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)^2,x, algorithm="giac")

[Out]

1/8*c^2*x^8*e^3 + 3/7*c^2*d*x^7*e^2 + 1/2*c^2*d^2*x^6*e + 1/5*c^2*d^3*x^5 + 2/7*b*c*x^7*e^3 + b*c*d*x^6*e^2 +
6/5*b*c*d^2*x^5*e + 1/2*b*c*d^3*x^4 + 1/6*b^2*x^6*e^3 + 1/3*a*c*x^6*e^3 + 3/5*b^2*d*x^5*e^2 + 6/5*a*c*d*x^5*e^
2 + 3/4*b^2*d^2*x^4*e + 3/2*a*c*d^2*x^4*e + 1/3*b^2*d^3*x^3 + 2/3*a*c*d^3*x^3 + 2/5*a*b*x^5*e^3 + 3/2*a*b*d*x^
4*e^2 + 2*a*b*d^2*x^3*e + a*b*d^3*x^2 + 1/4*a^2*x^4*e^3 + a^2*d*x^3*e^2 + 3/2*a^2*d^2*x^2*e + a^2*d^3*x