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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.15868, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 25, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.08, Rules used = {1582, 1810} $a^2 A d x+\frac{1}{4} a^2 C e x^4+\frac{1}{5} c x^5 (2 a (B e+C d)+A c d)+\frac{1}{3} a x^3 (a B e+a C d+2 A c d)+\frac{\left (a+c x^2\right )^3 (A e+B d)}{6 c}+\frac{1}{3} a c C e x^6+\frac{1}{7} c^2 x^7 (B e+C d)+\frac{1}{8} c^2 C e x^8$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 1582

Int[(Px_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(Coeff[Px, x, n - 1]*(a + b*x^n)^(p + 1))/(b*n*(p +
1)), x] + Int[(Px - Coeff[Px, x, n - 1]*x^(n - 1))*(a + b*x^n)^p, x] /; FreeQ[{a, b}, x] && PolyQ[Px, x] && I
GtQ[p, 1] && IGtQ[n, 1] && NeQ[Coeff[Px, x, n - 1], 0] && NeQ[Px, Coeff[Px, x, n - 1]*x^(n - 1)] &&  !MatchQ[P
x, (Qx_.)*((c_) + (d_.)*x^(m_))^(q_) /; FreeQ[{c, d}, x] && PolyQ[Qx, x] && IGtQ[q, 1] && IGtQ[m, 1] && NeQ[Co
eff[Qx*(a + b*x^n)^p, x, m - 1], 0] && GtQ[m*q, n*p]]

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 151, normalized size = 1.2 \begin{align*}{\frac{{c}^{2}Ce{x}^{8}}{8}}+{\frac{ \left ({c}^{2}eB+{c}^{2}dC \right ){x}^{7}}{7}}+{\frac{ \left ({c}^{2}eA+{c}^{2}dB+2\,aceC \right ){x}^{6}}{6}}+{\frac{ \left ({c}^{2}dA+2\,aceB+2\,acdC \right ){x}^{5}}{5}}+{\frac{ \left ( 2\,aceA+2\,acdB+{a}^{2}eC \right ){x}^{4}}{4}}+{\frac{ \left ( 2\,acdA+{a}^{2}eB+{a}^{2}dC \right ){x}^{3}}{3}}+{\frac{ \left ({a}^{2}eA+{a}^{2}dB \right ){x}^{2}}{2}}+{a}^{2}Adx \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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