### 3.18 $$\int (d+e x)^3 (a+c x^2) (A+B x+C x^2) \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.313178, antiderivative size = 173, normalized size of antiderivative = 0.99, number of steps used = 2, number of rules used = 1, integrand size = 25, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.04, Rules used = {1628} $\frac{(d+e x)^6 \left (a C e^2-c e (3 B d-A e)+6 c C d^2\right )}{6 e^5}-\frac{(d+e x)^5 \left (a e^2 (2 C d-B e)-c d e (3 B d-2 A e)+4 c C d^3\right )}{5 e^5}+\frac{(d+e x)^4 \left (a e^2+c d^2\right ) \left (A e^2-B d e+C d^2\right )}{4 e^5}-\frac{c (d+e x)^7 (4 C d-B e)}{7 e^5}+\frac{c C (d+e x)^8}{8 e^5}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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)^3 \left (a+c x^2\right ) \left (A+B x+C x^2\right ) \, dx &=\int \left (\frac{\left (c d^2+a e^2\right ) \left (C d^2-B d e+A e^2\right ) (d+e x)^3}{e^4}+\frac{\left (-4 c C d^3+c d e (3 B d-2 A e)-a e^2 (2 C d-B e)\right ) (d+e x)^4}{e^4}+\frac{\left (6 c C d^2+a C e^2-c e (3 B d-A e)\right ) (d+e x)^5}{e^4}+\frac{c (-4 C d+B e) (d+e x)^6}{e^4}+\frac{c C (d+e x)^7}{e^4}\right ) \, dx\\ &=\frac{\left (c d^2+a e^2\right ) \left (C d^2-B d e+A e^2\right ) (d+e x)^4}{4 e^5}-\frac{\left (4 c C d^3-c d e (3 B d-2 A e)+a e^2 (2 C d-B e)\right ) (d+e x)^5}{5 e^5}+\frac{\left (6 c C d^2+a C e^2-c e (3 B d-A e)\right ) (d+e x)^6}{6 e^5}-\frac{c (4 C d-B e) (d+e x)^7}{7 e^5}+\frac{c C (d+e x)^8}{8 e^5}\\ \end{align*}

Mathematica [A]  time = 0.0895023, size = 208, normalized size = 1.19 $\frac{1}{6} e x^6 \left (a C e^2+c e (A e+3 B d)+3 c C d^2\right )+\frac{1}{5} x^5 \left (a e^2 (B e+3 C d)+3 c d e (A e+B d)+c C d^3\right )+\frac{1}{4} x^4 \left (a A e^3+3 a B d e^2+3 a C d^2 e+3 A c d^2 e+B c d^3\right )+\frac{1}{3} d x^3 \left (A \left (3 a e^2+c d^2\right )+a d (3 B e+C d)\right )+\frac{1}{2} a d^2 x^2 (3 A e+B d)+a A d^3 x+\frac{1}{7} c e^2 x^7 (B e+3 C d)+\frac{1}{8} c C e^3 x^8$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 217, normalized size = 1.2 \begin{align*}{\frac{{e}^{3}cC{x}^{8}}{8}}+{\frac{ \left ({e}^{3}cB+3\,d{e}^{2}cC \right ){x}^{7}}{7}}+{\frac{ \left ( \left ( a{e}^{3}+3\,{d}^{2}ec \right ) C+3\,d{e}^{2}cB+{e}^{3}cA \right ){x}^{6}}{6}}+{\frac{ \left ( \left ( 3\,ad{e}^{2}+c{d}^{3} \right ) C+ \left ( a{e}^{3}+3\,{d}^{2}ec \right ) B+3\,Acd{e}^{2} \right ){x}^{5}}{5}}+{\frac{ \left ( 3\,{d}^{2}eaC+ \left ( 3\,ad{e}^{2}+c{d}^{3} \right ) B+ \left ( a{e}^{3}+3\,{d}^{2}ec \right ) A \right ){x}^{4}}{4}}+{\frac{ \left ({d}^{3}aC+3\,Ba{d}^{2}e+ \left ( 3\,ad{e}^{2}+c{d}^{3} \right ) A \right ){x}^{3}}{3}}+{\frac{ \left ( 3\,{d}^{2}eaA+{d}^{3}aB \right ){x}^{2}}{2}}+{d}^{3}aAx \end{align*}

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

[In]

int((e*x+d)^3*(c*x^2+a)*(C*x^2+B*x+A),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.02217, size = 273, normalized size = 1.56 \begin{align*} \frac{1}{8} \, C c e^{3} x^{8} + \frac{1}{7} \,{\left (3 \, C c d e^{2} + B c e^{3}\right )} x^{7} + \frac{1}{6} \,{\left (3 \, C c d^{2} e + 3 \, B c d e^{2} +{\left (C a + A c\right )} e^{3}\right )} x^{6} + A a d^{3} x + \frac{1}{5} \,{\left (C c d^{3} + 3 \, B c d^{2} e + B a e^{3} + 3 \,{\left (C a + A c\right )} d e^{2}\right )} x^{5} + \frac{1}{4} \,{\left (B c d^{3} + 3 \, B a d e^{2} + A a e^{3} + 3 \,{\left (C a + A c\right )} d^{2} e\right )} x^{4} + \frac{1}{3} \,{\left (3 \, B a d^{2} e + 3 \, A a d e^{2} +{\left (C a + A c\right )} d^{3}\right )} x^{3} + \frac{1}{2} \,{\left (B a d^{3} + 3 \, A a 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+a)*(C*x^2+B*x+A),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.53428, size = 595, normalized size = 3.4 \begin{align*} \frac{1}{8} x^{8} e^{3} c C + \frac{3}{7} x^{7} e^{2} d c C + \frac{1}{7} x^{7} e^{3} c B + \frac{1}{2} x^{6} e d^{2} c C + \frac{1}{6} x^{6} e^{3} a C + \frac{1}{2} x^{6} e^{2} d c B + \frac{1}{6} x^{6} e^{3} c A + \frac{1}{5} x^{5} d^{3} c C + \frac{3}{5} x^{5} e^{2} d a C + \frac{3}{5} x^{5} e d^{2} c B + \frac{1}{5} x^{5} e^{3} a B + \frac{3}{5} x^{5} e^{2} d c A + \frac{3}{4} x^{4} e d^{2} a C + \frac{1}{4} x^{4} d^{3} c B + \frac{3}{4} x^{4} e^{2} d a B + \frac{3}{4} x^{4} e d^{2} c A + \frac{1}{4} x^{4} e^{3} a A + \frac{1}{3} x^{3} d^{3} a C + x^{3} e d^{2} a B + \frac{1}{3} x^{3} d^{3} c A + x^{3} e^{2} d a A + \frac{1}{2} x^{2} d^{3} a B + \frac{3}{2} x^{2} e d^{2} a A + x d^{3} a A \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.092206, size = 257, normalized size = 1.47 \begin{align*} A a d^{3} x + \frac{C c e^{3} x^{8}}{8} + x^{7} \left (\frac{B c e^{3}}{7} + \frac{3 C c d e^{2}}{7}\right ) + x^{6} \left (\frac{A c e^{3}}{6} + \frac{B c d e^{2}}{2} + \frac{C a e^{3}}{6} + \frac{C c d^{2} e}{2}\right ) + x^{5} \left (\frac{3 A c d e^{2}}{5} + \frac{B a e^{3}}{5} + \frac{3 B c d^{2} e}{5} + \frac{3 C a d e^{2}}{5} + \frac{C c d^{3}}{5}\right ) + x^{4} \left (\frac{A a e^{3}}{4} + \frac{3 A c d^{2} e}{4} + \frac{3 B a d e^{2}}{4} + \frac{B c d^{3}}{4} + \frac{3 C a d^{2} e}{4}\right ) + x^{3} \left (A a d e^{2} + \frac{A c d^{3}}{3} + B a d^{2} e + \frac{C a d^{3}}{3}\right ) + x^{2} \left (\frac{3 A a d^{2} e}{2} + \frac{B a d^{3}}{2}\right ) \end{align*}

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

[In]

integrate((e*x+d)**3*(c*x**2+a)*(C*x**2+B*x+A),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.14464, size = 327, normalized size = 1.87 \begin{align*} \frac{1}{8} \, C c x^{8} e^{3} + \frac{3}{7} \, C c d x^{7} e^{2} + \frac{1}{2} \, C c d^{2} x^{6} e + \frac{1}{5} \, C c d^{3} x^{5} + \frac{1}{7} \, B c x^{7} e^{3} + \frac{1}{2} \, B c d x^{6} e^{2} + \frac{3}{5} \, B c d^{2} x^{5} e + \frac{1}{4} \, B c d^{3} x^{4} + \frac{1}{6} \, C a x^{6} e^{3} + \frac{1}{6} \, A c x^{6} e^{3} + \frac{3}{5} \, C a d x^{5} e^{2} + \frac{3}{5} \, A c d x^{5} e^{2} + \frac{3}{4} \, C a d^{2} x^{4} e + \frac{3}{4} \, A c d^{2} x^{4} e + \frac{1}{3} \, C a d^{3} x^{3} + \frac{1}{3} \, A c d^{3} x^{3} + \frac{1}{5} \, B a x^{5} e^{3} + \frac{3}{4} \, B a d x^{4} e^{2} + B a d^{2} x^{3} e + \frac{1}{2} \, B a d^{3} x^{2} + \frac{1}{4} \, A a x^{4} e^{3} + A a d x^{3} e^{2} + \frac{3}{2} \, A a d^{2} x^{2} e + A a 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+a)*(C*x^2+B*x+A),x, algorithm="giac")

[Out]

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