### 3.141 $$\int (a+b x+c x^2)^3 (A+C x^2) \, dx$$

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

[Out]

a^3*A*x + (3*a^2*A*b*x^2)/2 + (a*(3*A*(b^2 + a*c) + a^2*C)*x^3)/3 + (b*(A*(b^2 + 6*a*c) + 3*a^2*C)*x^4)/4 + (3
*(b^2 + a*c)*(A*c + a*C)*x^5)/5 + (b*(3*A*c^2 + (b^2 + 6*a*c)*C)*x^6)/6 + (c*(A*c^2 + 3*(b^2 + a*c)*C)*x^7)/7
+ (3*b*c^2*C*x^8)/8 + (c^3*C*x^9)/9

________________________________________________________________________________________

Rubi [A]  time = 0.193015, antiderivative size = 161, 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 = {1657} $\frac{1}{4} b x^4 \left (3 a^2 C+A \left (6 a c+b^2\right )\right )+\frac{1}{3} a x^3 \left (a^2 C+3 A \left (a c+b^2\right )\right )+\frac{3}{2} a^2 A b x^2+a^3 A x+\frac{1}{7} c x^7 \left (3 C \left (a c+b^2\right )+A c^2\right )+\frac{1}{6} b x^6 \left (C \left (6 a c+b^2\right )+3 A c^2\right )+\frac{3}{5} x^5 \left (a c+b^2\right ) (a C+A c)+\frac{3}{8} b c^2 C x^8+\frac{1}{9} c^3 C x^9$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^3*A*x + (3*a^2*A*b*x^2)/2 + (a*(3*A*(b^2 + a*c) + a^2*C)*x^3)/3 + (b*(A*(b^2 + 6*a*c) + 3*a^2*C)*x^4)/4 + (3
*(b^2 + a*c)*(A*c + a*C)*x^5)/5 + (b*(3*A*c^2 + (b^2 + 6*a*c)*C)*x^6)/6 + (c*(A*c^2 + 3*(b^2 + a*c)*C)*x^7)/7
+ (3*b*c^2*C*x^8)/8 + (c^3*C*x^9)/9

Rule 1657

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

Rubi steps

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

Mathematica [A]  time = 0.0444664, size = 163, normalized size = 1.01 $\frac{1}{4} b x^4 \left (3 a^2 C+6 a A c+A b^2\right )+\frac{1}{3} a x^3 \left (a^2 C+3 a A c+3 A b^2\right )+\frac{3}{2} a^2 A b x^2+a^3 A x+\frac{1}{7} c x^7 \left (3 a c C+A c^2+3 b^2 C\right )+\frac{1}{6} b x^6 \left (6 a c C+3 A c^2+b^2 C\right )+\frac{3}{5} x^5 \left (a c+b^2\right ) (a C+A c)+\frac{3}{8} b c^2 C x^8+\frac{1}{9} c^3 C x^9$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^3*A*x + (3*a^2*A*b*x^2)/2 + (a*(3*A*b^2 + 3*a*A*c + a^2*C)*x^3)/3 + (b*(A*b^2 + 6*a*A*c + 3*a^2*C)*x^4)/4 +
(3*(b^2 + a*c)*(A*c + a*C)*x^5)/5 + (b*(3*A*c^2 + b^2*C + 6*a*c*C)*x^6)/6 + (c*(A*c^2 + 3*b^2*C + 3*a*c*C)*x^7
)/7 + (3*b*c^2*C*x^8)/8 + (c^3*C*x^9)/9

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 223, normalized size = 1.4 \begin{align*}{\frac{{c}^{3}C{x}^{9}}{9}}+{\frac{3\,b{c}^{2}C{x}^{8}}{8}}+{\frac{ \left ( \left ( a{c}^{2}+2\,{b}^{2}c+c \left ( 2\,ac+{b}^{2} \right ) \right ) C+A{c}^{3} \right ){x}^{7}}{7}}+{\frac{ \left ( \left ( 4\,abc+b \left ( 2\,ac+{b}^{2} \right ) \right ) C+3\,b{c}^{2}A \right ){x}^{6}}{6}}+{\frac{ \left ( \left ( a \left ( 2\,ac+{b}^{2} \right ) +2\,{b}^{2}a+{a}^{2}c \right ) C+ \left ( a{c}^{2}+2\,{b}^{2}c+c \left ( 2\,ac+{b}^{2} \right ) \right ) A \right ){x}^{5}}{5}}+{\frac{ \left ( 3\,b{a}^{2}C+ \left ( 4\,abc+b \left ( 2\,ac+{b}^{2} \right ) \right ) A \right ){x}^{4}}{4}}+{\frac{ \left ({a}^{3}C+ \left ( a \left ( 2\,ac+{b}^{2} \right ) +2\,{b}^{2}a+{a}^{2}c \right ) A \right ){x}^{3}}{3}}+{\frac{3\,{a}^{2}Ab{x}^{2}}{2}}+{a}^{3}Ax \end{align*}

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

[In]

int((c*x^2+b*x+a)^3*(C*x^2+A),x)

[Out]

1/9*c^3*C*x^9+3/8*b*c^2*C*x^8+1/7*((a*c^2+2*b^2*c+c*(2*a*c+b^2))*C+A*c^3)*x^7+1/6*((4*a*b*c+b*(2*a*c+b^2))*C+3
*b*c^2*A)*x^6+1/5*((a*(2*a*c+b^2)+2*b^2*a+a^2*c)*C+(a*c^2+2*b^2*c+c*(2*a*c+b^2))*A)*x^5+1/4*(3*b*a^2*C+(4*a*b*
c+b*(2*a*c+b^2))*A)*x^4+1/3*(a^3*C+(a*(2*a*c+b^2)+2*b^2*a+a^2*c)*A)*x^3+3/2*a^2*A*b*x^2+a^3*A*x

________________________________________________________________________________________

Maxima [A]  time = 0.976297, size = 223, normalized size = 1.39 \begin{align*} \frac{1}{9} \, C c^{3} x^{9} + \frac{3}{8} \, C b c^{2} x^{8} + \frac{1}{7} \,{\left (3 \, C b^{2} c + 3 \, C a c^{2} + A c^{3}\right )} x^{7} + \frac{1}{6} \,{\left (C b^{3} + 6 \, C a b c + 3 \, A b c^{2}\right )} x^{6} + \frac{3}{2} \, A a^{2} b x^{2} + \frac{3}{5} \,{\left (C a b^{2} + A a c^{2} +{\left (C a^{2} + A b^{2}\right )} c\right )} x^{5} + A a^{3} x + \frac{1}{4} \,{\left (3 \, C a^{2} b + A b^{3} + 6 \, A a b c\right )} x^{4} + \frac{1}{3} \,{\left (C a^{3} + 3 \, A a b^{2} + 3 \, A a^{2} c\right )} x^{3} \end{align*}

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

[In]

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

[Out]

1/9*C*c^3*x^9 + 3/8*C*b*c^2*x^8 + 1/7*(3*C*b^2*c + 3*C*a*c^2 + A*c^3)*x^7 + 1/6*(C*b^3 + 6*C*a*b*c + 3*A*b*c^2
)*x^6 + 3/2*A*a^2*b*x^2 + 3/5*(C*a*b^2 + A*a*c^2 + (C*a^2 + A*b^2)*c)*x^5 + A*a^3*x + 1/4*(3*C*a^2*b + A*b^3 +
6*A*a*b*c)*x^4 + 1/3*(C*a^3 + 3*A*a*b^2 + 3*A*a^2*c)*x^3

________________________________________________________________________________________

Fricas [A]  time = 1.30706, size = 444, normalized size = 2.76 \begin{align*} \frac{1}{9} x^{9} c^{3} C + \frac{3}{8} x^{8} c^{2} b C + \frac{3}{7} x^{7} c b^{2} C + \frac{3}{7} x^{7} c^{2} a C + \frac{1}{7} x^{7} c^{3} A + \frac{1}{6} x^{6} b^{3} C + x^{6} c b a C + \frac{1}{2} x^{6} c^{2} b A + \frac{3}{5} x^{5} b^{2} a C + \frac{3}{5} x^{5} c a^{2} C + \frac{3}{5} x^{5} c b^{2} A + \frac{3}{5} x^{5} c^{2} a A + \frac{3}{4} x^{4} b a^{2} C + \frac{1}{4} x^{4} b^{3} A + \frac{3}{2} x^{4} c b a A + \frac{1}{3} x^{3} a^{3} C + x^{3} b^{2} a A + x^{3} c a^{2} A + \frac{3}{2} x^{2} b a^{2} A + x a^{3} A \end{align*}

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

[In]

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

[Out]

1/9*x^9*c^3*C + 3/8*x^8*c^2*b*C + 3/7*x^7*c*b^2*C + 3/7*x^7*c^2*a*C + 1/7*x^7*c^3*A + 1/6*x^6*b^3*C + x^6*c*b*
a*C + 1/2*x^6*c^2*b*A + 3/5*x^5*b^2*a*C + 3/5*x^5*c*a^2*C + 3/5*x^5*c*b^2*A + 3/5*x^5*c^2*a*A + 3/4*x^4*b*a^2*
C + 1/4*x^4*b^3*A + 3/2*x^4*c*b*a*A + 1/3*x^3*a^3*C + x^3*b^2*a*A + x^3*c*a^2*A + 3/2*x^2*b*a^2*A + x*a^3*A

________________________________________________________________________________________

Sympy [A]  time = 0.09245, size = 197, normalized size = 1.22 \begin{align*} A a^{3} x + \frac{3 A a^{2} b x^{2}}{2} + \frac{3 C b c^{2} x^{8}}{8} + \frac{C c^{3} x^{9}}{9} + x^{7} \left (\frac{A c^{3}}{7} + \frac{3 C a c^{2}}{7} + \frac{3 C b^{2} c}{7}\right ) + x^{6} \left (\frac{A b c^{2}}{2} + C a b c + \frac{C b^{3}}{6}\right ) + x^{5} \left (\frac{3 A a c^{2}}{5} + \frac{3 A b^{2} c}{5} + \frac{3 C a^{2} c}{5} + \frac{3 C a b^{2}}{5}\right ) + x^{4} \left (\frac{3 A a b c}{2} + \frac{A b^{3}}{4} + \frac{3 C a^{2} b}{4}\right ) + x^{3} \left (A a^{2} c + A a b^{2} + \frac{C a^{3}}{3}\right ) \end{align*}

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

[In]

integrate((c*x**2+b*x+a)**3*(C*x**2+A),x)

[Out]

A*a**3*x + 3*A*a**2*b*x**2/2 + 3*C*b*c**2*x**8/8 + C*c**3*x**9/9 + x**7*(A*c**3/7 + 3*C*a*c**2/7 + 3*C*b**2*c/
7) + x**6*(A*b*c**2/2 + C*a*b*c + C*b**3/6) + x**5*(3*A*a*c**2/5 + 3*A*b**2*c/5 + 3*C*a**2*c/5 + 3*C*a*b**2/5)
+ x**4*(3*A*a*b*c/2 + A*b**3/4 + 3*C*a**2*b/4) + x**3*(A*a**2*c + A*a*b**2 + C*a**3/3)

________________________________________________________________________________________

Giac [A]  time = 1.21464, size = 252, normalized size = 1.57 \begin{align*} \frac{1}{9} \, C c^{3} x^{9} + \frac{3}{8} \, C b c^{2} x^{8} + \frac{3}{7} \, C b^{2} c x^{7} + \frac{3}{7} \, C a c^{2} x^{7} + \frac{1}{7} \, A c^{3} x^{7} + \frac{1}{6} \, C b^{3} x^{6} + C a b c x^{6} + \frac{1}{2} \, A b c^{2} x^{6} + \frac{3}{5} \, C a b^{2} x^{5} + \frac{3}{5} \, C a^{2} c x^{5} + \frac{3}{5} \, A b^{2} c x^{5} + \frac{3}{5} \, A a c^{2} x^{5} + \frac{3}{4} \, C a^{2} b x^{4} + \frac{1}{4} \, A b^{3} x^{4} + \frac{3}{2} \, A a b c x^{4} + \frac{1}{3} \, C a^{3} x^{3} + A a b^{2} x^{3} + A a^{2} c x^{3} + \frac{3}{2} \, A a^{2} b x^{2} + A a^{3} x \end{align*}

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

[In]

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

[Out]

1/9*C*c^3*x^9 + 3/8*C*b*c^2*x^8 + 3/7*C*b^2*c*x^7 + 3/7*C*a*c^2*x^7 + 1/7*A*c^3*x^7 + 1/6*C*b^3*x^6 + C*a*b*c*
x^6 + 1/2*A*b*c^2*x^6 + 3/5*C*a*b^2*x^5 + 3/5*C*a^2*c*x^5 + 3/5*A*b^2*c*x^5 + 3/5*A*a*c^2*x^5 + 3/4*C*a^2*b*x^
4 + 1/4*A*b^3*x^4 + 3/2*A*a*b*c*x^4 + 1/3*C*a^3*x^3 + A*a*b^2*x^3 + A*a^2*c*x^3 + 3/2*A*a^2*b*x^2 + A*a^3*x