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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.040093, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 20, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.1, Rules used = {1582, 373} $a^2 A x+\frac{1}{5} c x^5 (2 a C+A c)+\frac{1}{3} a x^3 (a C+2 A c)+\frac{B \left (a+c x^2\right )^3}{6 c}+\frac{1}{7} c^2 C x^7$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^2*A*x + (a*(2*A*c + a*C)*x^3)/3 + (c*(A*c + 2*a*C)*x^5)/5 + (c^2*C*x^7)/7 + (B*(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 373

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n
)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

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

Mathematica [A]  time = 0.0289469, size = 69, normalized size = 1.03 $\frac{1}{210} x \left (35 a^2 (6 A+x (3 B+2 C x))+7 a c x^2 (20 A+3 x (5 B+4 C x))+c^2 x^4 (42 A+5 x (7 B+6 C x))\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(x*(35*a^2*(6*A + x*(3*B + 2*C*x)) + 7*a*c*x^2*(20*A + 3*x*(5*B + 4*C*x)) + c^2*x^4*(42*A + 5*x*(7*B + 6*C*x))
))/210

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 75, normalized size = 1.1 \begin{align*}{\frac{{c}^{2}C{x}^{7}}{7}}+{\frac{B{c}^{2}{x}^{6}}{6}}+{\frac{ \left ( A{c}^{2}+2\,acC \right ){x}^{5}}{5}}+{\frac{aBc{x}^{4}}{2}}+{\frac{ \left ( 2\,aAc+{a}^{2}C \right ){x}^{3}}{3}}+{\frac{{a}^{2}B{x}^{2}}{2}}+{a}^{2}Ax \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.01937, size = 100, normalized size = 1.49 \begin{align*} \frac{1}{7} \, C c^{2} x^{7} + \frac{1}{6} \, B c^{2} x^{6} + \frac{1}{2} \, B a c x^{4} + \frac{1}{5} \,{\left (2 \, C a c + A c^{2}\right )} x^{5} + \frac{1}{2} \, B a^{2} x^{2} + A a^{2} x + \frac{1}{3} \,{\left (C a^{2} + 2 \, A a c\right )} x^{3} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.50887, size = 185, normalized size = 2.76 \begin{align*} \frac{1}{7} x^{7} c^{2} C + \frac{1}{6} x^{6} c^{2} B + \frac{2}{5} x^{5} c a C + \frac{1}{5} x^{5} c^{2} A + \frac{1}{2} x^{4} c a B + \frac{1}{3} x^{3} a^{2} C + \frac{2}{3} x^{3} c a A + \frac{1}{2} x^{2} a^{2} B + x a^{2} A \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.077304, size = 83, normalized size = 1.24 \begin{align*} A a^{2} x + \frac{B a^{2} x^{2}}{2} + \frac{B a c x^{4}}{2} + \frac{B c^{2} x^{6}}{6} + \frac{C c^{2} x^{7}}{7} + x^{5} \left (\frac{A c^{2}}{5} + \frac{2 C a c}{5}\right ) + x^{3} \left (\frac{2 A a c}{3} + \frac{C a^{2}}{3}\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15864, size = 103, normalized size = 1.54 \begin{align*} \frac{1}{7} \, C c^{2} x^{7} + \frac{1}{6} \, B c^{2} x^{6} + \frac{2}{5} \, C a c x^{5} + \frac{1}{5} \, A c^{2} x^{5} + \frac{1}{2} \, B a c x^{4} + \frac{1}{3} \, C a^{2} x^{3} + \frac{2}{3} \, A a c x^{3} + \frac{1}{2} \, B a^{2} x^{2} + A a^{2} x \end{align*}

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

[In]

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

[Out]

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