### 3.290 $$\int (d+e x)^2 (3+2 x+5 x^2) (2+x+3 x^2-5 x^3+4 x^4) \, dx$$

Optimal. Leaf size=157 $\frac{1}{7} x^7 \left (20 d^2-34 d e+17 e^2\right )-\frac{1}{6} x^6 \left (17 d^2-34 d e+4 e^2\right )+\frac{1}{5} x^5 \left (17 d^2-8 d e+21 e^2\right )-\frac{1}{4} x^4 \left (4 d^2-42 d e-7 e^2\right )+\frac{1}{3} x^3 \left (21 d^2+14 d e+6 e^2\right )+6 d^2 x+\frac{1}{8} e x^8 (40 d-17 e)+\frac{1}{2} d x^2 (7 d+12 e)+\frac{20 e^2 x^9}{9}$

[Out]

6*d^2*x + (d*(7*d + 12*e)*x^2)/2 + ((21*d^2 + 14*d*e + 6*e^2)*x^3)/3 - ((4*d^2 - 42*d*e - 7*e^2)*x^4)/4 + ((17
*d^2 - 8*d*e + 21*e^2)*x^5)/5 - ((17*d^2 - 34*d*e + 4*e^2)*x^6)/6 + ((20*d^2 - 34*d*e + 17*e^2)*x^7)/7 + ((40*
d - 17*e)*e*x^8)/8 + (20*e^2*x^9)/9

________________________________________________________________________________________

Rubi [A]  time = 0.166052, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 36, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.028, Rules used = {1628} $\frac{1}{7} x^7 \left (20 d^2-34 d e+17 e^2\right )-\frac{1}{6} x^6 \left (17 d^2-34 d e+4 e^2\right )+\frac{1}{5} x^5 \left (17 d^2-8 d e+21 e^2\right )-\frac{1}{4} x^4 \left (4 d^2-42 d e-7 e^2\right )+\frac{1}{3} x^3 \left (21 d^2+14 d e+6 e^2\right )+6 d^2 x+\frac{1}{8} e x^8 (40 d-17 e)+\frac{1}{2} d x^2 (7 d+12 e)+\frac{20 e^2 x^9}{9}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x)^2*(3 + 2*x + 5*x^2)*(2 + x + 3*x^2 - 5*x^3 + 4*x^4),x]

[Out]

6*d^2*x + (d*(7*d + 12*e)*x^2)/2 + ((21*d^2 + 14*d*e + 6*e^2)*x^3)/3 - ((4*d^2 - 42*d*e - 7*e^2)*x^4)/4 + ((17
*d^2 - 8*d*e + 21*e^2)*x^5)/5 - ((17*d^2 - 34*d*e + 4*e^2)*x^6)/6 + ((20*d^2 - 34*d*e + 17*e^2)*x^7)/7 + ((40*
d - 17*e)*e*x^8)/8 + (20*e^2*x^9)/9

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin{align*} \int (d+e x)^2 \left (3+2 x+5 x^2\right ) \left (2+x+3 x^2-5 x^3+4 x^4\right ) \, dx &=\int \left (6 d^2+d (7 d+12 e) x+\left (21 d^2+14 d e+6 e^2\right ) x^2-\left (4 d^2-42 d e-7 e^2\right ) x^3+\left (17 d^2-8 d e+21 e^2\right ) x^4-\left (17 d^2-34 d e+4 e^2\right ) x^5+\left (20 d^2-34 d e+17 e^2\right ) x^6+(40 d-17 e) e x^7+20 e^2 x^8\right ) \, dx\\ &=6 d^2 x+\frac{1}{2} d (7 d+12 e) x^2+\frac{1}{3} \left (21 d^2+14 d e+6 e^2\right ) x^3-\frac{1}{4} \left (4 d^2-42 d e-7 e^2\right ) x^4+\frac{1}{5} \left (17 d^2-8 d e+21 e^2\right ) x^5-\frac{1}{6} \left (17 d^2-34 d e+4 e^2\right ) x^6+\frac{1}{7} \left (20 d^2-34 d e+17 e^2\right ) x^7+\frac{1}{8} (40 d-17 e) e x^8+\frac{20 e^2 x^9}{9}\\ \end{align*}

Mathematica [A]  time = 0.0332222, size = 136, normalized size = 0.87 $d^2 \left (\frac{20 x^7}{7}-\frac{17 x^6}{6}+\frac{17 x^5}{5}-x^4+7 x^3+\frac{7 x^2}{2}+6 x\right )+d e \left (5 x^8-\frac{34 x^7}{7}+\frac{17 x^6}{3}-\frac{8 x^5}{5}+\frac{21 x^4}{2}+\frac{14 x^3}{3}+6 x^2\right )+\frac{e^2 \left (5600 x^6-5355 x^5+6120 x^4-1680 x^3+10584 x^2+4410 x+5040\right ) x^3}{2520}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(d + e*x)^2*(3 + 2*x + 5*x^2)*(2 + x + 3*x^2 - 5*x^3 + 4*x^4),x]

[Out]

(e^2*x^3*(5040 + 4410*x + 10584*x^2 - 1680*x^3 + 6120*x^4 - 5355*x^5 + 5600*x^6))/2520 + d^2*(6*x + (7*x^2)/2
+ 7*x^3 - x^4 + (17*x^5)/5 - (17*x^6)/6 + (20*x^7)/7) + d*e*(6*x^2 + (14*x^3)/3 + (21*x^4)/2 - (8*x^5)/5 + (17
*x^6)/3 - (34*x^7)/7 + 5*x^8)

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 146, normalized size = 0.9 \begin{align*}{\frac{20\,{e}^{2}{x}^{9}}{9}}+{\frac{ \left ( 40\,de-17\,{e}^{2} \right ){x}^{8}}{8}}+{\frac{ \left ( 20\,{d}^{2}-34\,de+17\,{e}^{2} \right ){x}^{7}}{7}}+{\frac{ \left ( -17\,{d}^{2}+34\,de-4\,{e}^{2} \right ){x}^{6}}{6}}+{\frac{ \left ( 17\,{d}^{2}-8\,de+21\,{e}^{2} \right ){x}^{5}}{5}}+{\frac{ \left ( -4\,{d}^{2}+42\,de+7\,{e}^{2} \right ){x}^{4}}{4}}+{\frac{ \left ( 21\,{d}^{2}+14\,de+6\,{e}^{2} \right ){x}^{3}}{3}}+{\frac{ \left ( 7\,{d}^{2}+12\,de \right ){x}^{2}}{2}}+6\,{d}^{2}x \end{align*}

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

[In]

int((e*x+d)^2*(5*x^2+2*x+3)*(4*x^4-5*x^3+3*x^2+x+2),x)

[Out]

20/9*e^2*x^9+1/8*(40*d*e-17*e^2)*x^8+1/7*(20*d^2-34*d*e+17*e^2)*x^7+1/6*(-17*d^2+34*d*e-4*e^2)*x^6+1/5*(17*d^2
-8*d*e+21*e^2)*x^5+1/4*(-4*d^2+42*d*e+7*e^2)*x^4+1/3*(21*d^2+14*d*e+6*e^2)*x^3+1/2*(7*d^2+12*d*e)*x^2+6*d^2*x

________________________________________________________________________________________

Maxima [A]  time = 0.95401, size = 196, normalized size = 1.25 \begin{align*} \frac{20}{9} \, e^{2} x^{9} + \frac{1}{8} \,{\left (40 \, d e - 17 \, e^{2}\right )} x^{8} + \frac{1}{7} \,{\left (20 \, d^{2} - 34 \, d e + 17 \, e^{2}\right )} x^{7} - \frac{1}{6} \,{\left (17 \, d^{2} - 34 \, d e + 4 \, e^{2}\right )} x^{6} + \frac{1}{5} \,{\left (17 \, d^{2} - 8 \, d e + 21 \, e^{2}\right )} x^{5} - \frac{1}{4} \,{\left (4 \, d^{2} - 42 \, d e - 7 \, e^{2}\right )} x^{4} + \frac{1}{3} \,{\left (21 \, d^{2} + 14 \, d e + 6 \, e^{2}\right )} x^{3} + 6 \, d^{2} x + \frac{1}{2} \,{\left (7 \, d^{2} + 12 \, d e\right )} x^{2} \end{align*}

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

[In]

integrate((e*x+d)^2*(5*x^2+2*x+3)*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="maxima")

[Out]

20/9*e^2*x^9 + 1/8*(40*d*e - 17*e^2)*x^8 + 1/7*(20*d^2 - 34*d*e + 17*e^2)*x^7 - 1/6*(17*d^2 - 34*d*e + 4*e^2)*
x^6 + 1/5*(17*d^2 - 8*d*e + 21*e^2)*x^5 - 1/4*(4*d^2 - 42*d*e - 7*e^2)*x^4 + 1/3*(21*d^2 + 14*d*e + 6*e^2)*x^3
+ 6*d^2*x + 1/2*(7*d^2 + 12*d*e)*x^2

________________________________________________________________________________________

Fricas [A]  time = 0.840011, size = 389, normalized size = 2.48 \begin{align*} \frac{20}{9} x^{9} e^{2} - \frac{17}{8} x^{8} e^{2} + 5 x^{8} e d + \frac{17}{7} x^{7} e^{2} - \frac{34}{7} x^{7} e d + \frac{20}{7} x^{7} d^{2} - \frac{2}{3} x^{6} e^{2} + \frac{17}{3} x^{6} e d - \frac{17}{6} x^{6} d^{2} + \frac{21}{5} x^{5} e^{2} - \frac{8}{5} x^{5} e d + \frac{17}{5} x^{5} d^{2} + \frac{7}{4} x^{4} e^{2} + \frac{21}{2} x^{4} e d - x^{4} d^{2} + 2 x^{3} e^{2} + \frac{14}{3} x^{3} e d + 7 x^{3} d^{2} + 6 x^{2} e d + \frac{7}{2} x^{2} d^{2} + 6 x d^{2} \end{align*}

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

[In]

integrate((e*x+d)^2*(5*x^2+2*x+3)*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="fricas")

[Out]

20/9*x^9*e^2 - 17/8*x^8*e^2 + 5*x^8*e*d + 17/7*x^7*e^2 - 34/7*x^7*e*d + 20/7*x^7*d^2 - 2/3*x^6*e^2 + 17/3*x^6*
e*d - 17/6*x^6*d^2 + 21/5*x^5*e^2 - 8/5*x^5*e*d + 17/5*x^5*d^2 + 7/4*x^4*e^2 + 21/2*x^4*e*d - x^4*d^2 + 2*x^3*
e^2 + 14/3*x^3*e*d + 7*x^3*d^2 + 6*x^2*e*d + 7/2*x^2*d^2 + 6*x*d^2

________________________________________________________________________________________

Sympy [A]  time = 0.094552, size = 158, normalized size = 1.01 \begin{align*} 6 d^{2} x + \frac{20 e^{2} x^{9}}{9} + x^{8} \left (5 d e - \frac{17 e^{2}}{8}\right ) + x^{7} \left (\frac{20 d^{2}}{7} - \frac{34 d e}{7} + \frac{17 e^{2}}{7}\right ) + x^{6} \left (- \frac{17 d^{2}}{6} + \frac{17 d e}{3} - \frac{2 e^{2}}{3}\right ) + x^{5} \left (\frac{17 d^{2}}{5} - \frac{8 d e}{5} + \frac{21 e^{2}}{5}\right ) + x^{4} \left (- d^{2} + \frac{21 d e}{2} + \frac{7 e^{2}}{4}\right ) + x^{3} \left (7 d^{2} + \frac{14 d e}{3} + 2 e^{2}\right ) + x^{2} \left (\frac{7 d^{2}}{2} + 6 d e\right ) \end{align*}

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

[In]

integrate((e*x+d)**2*(5*x**2+2*x+3)*(4*x**4-5*x**3+3*x**2+x+2),x)

[Out]

6*d**2*x + 20*e**2*x**9/9 + x**8*(5*d*e - 17*e**2/8) + x**7*(20*d**2/7 - 34*d*e/7 + 17*e**2/7) + x**6*(-17*d**
2/6 + 17*d*e/3 - 2*e**2/3) + x**5*(17*d**2/5 - 8*d*e/5 + 21*e**2/5) + x**4*(-d**2 + 21*d*e/2 + 7*e**2/4) + x**
3*(7*d**2 + 14*d*e/3 + 2*e**2) + x**2*(7*d**2/2 + 6*d*e)

________________________________________________________________________________________

Giac [A]  time = 1.12306, size = 216, normalized size = 1.38 \begin{align*} \frac{20}{9} \, x^{9} e^{2} + 5 \, d x^{8} e + \frac{20}{7} \, d^{2} x^{7} - \frac{17}{8} \, x^{8} e^{2} - \frac{34}{7} \, d x^{7} e - \frac{17}{6} \, d^{2} x^{6} + \frac{17}{7} \, x^{7} e^{2} + \frac{17}{3} \, d x^{6} e + \frac{17}{5} \, d^{2} x^{5} - \frac{2}{3} \, x^{6} e^{2} - \frac{8}{5} \, d x^{5} e - d^{2} x^{4} + \frac{21}{5} \, x^{5} e^{2} + \frac{21}{2} \, d x^{4} e + 7 \, d^{2} x^{3} + \frac{7}{4} \, x^{4} e^{2} + \frac{14}{3} \, d x^{3} e + \frac{7}{2} \, d^{2} x^{2} + 2 \, x^{3} e^{2} + 6 \, d x^{2} e + 6 \, d^{2} x \end{align*}

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

[In]

integrate((e*x+d)^2*(5*x^2+2*x+3)*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="giac")

[Out]

20/9*x^9*e^2 + 5*d*x^8*e + 20/7*d^2*x^7 - 17/8*x^8*e^2 - 34/7*d*x^7*e - 17/6*d^2*x^6 + 17/7*x^7*e^2 + 17/3*d*x
^6*e + 17/5*d^2*x^5 - 2/3*x^6*e^2 - 8/5*d*x^5*e - d^2*x^4 + 21/5*x^5*e^2 + 21/2*d*x^4*e + 7*d^2*x^3 + 7/4*x^4*
e^2 + 14/3*d*x^3*e + 7/2*d^2*x^2 + 2*x^3*e^2 + 6*d*x^2*e + 6*d^2*x