### 3.15 $$\int \frac{(A+B x+C x^2) (a+b x^2+c x^4)^2}{x^2} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.121105, antiderivative size = 145, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 28, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.036, Rules used = {1628} $-\frac{a^2 A}{x}+a^2 B \log (x)+\frac{1}{5} x^5 \left (C \left (2 a c+b^2\right )+2 A b c\right )+\frac{1}{3} x^3 \left (A \left (2 a c+b^2\right )+2 a b C\right )+a x (a C+2 A b)+\frac{1}{4} B x^4 \left (2 a c+b^2\right )+a b B x^2+\frac{1}{7} c x^7 (A c+2 b C)+\frac{1}{3} b B c x^6+\frac{1}{8} B c^2 x^8+\frac{1}{9} c^2 C x^9$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.0969736, size = 145, normalized size = 1. $-\frac{a^2 A}{x}+a^2 B \log (x)+\frac{1}{5} x^5 \left (2 a c C+2 A b c+b^2 C\right )+\frac{1}{3} x^3 \left (2 a A c+2 a b C+A b^2\right )+a x (a C+2 A b)+\frac{1}{4} B x^4 \left (2 a c+b^2\right )+a b B x^2+\frac{1}{7} c x^7 (A c+2 b C)+\frac{1}{3} b B c x^6+\frac{1}{8} B c^2 x^8+\frac{1}{9} c^2 C x^9$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 147, normalized size = 1. \begin{align*}{\frac{{c}^{2}C{x}^{9}}{9}}+{\frac{B{c}^{2}{x}^{8}}{8}}+{\frac{A{x}^{7}{c}^{2}}{7}}+{\frac{2\,C{x}^{7}bc}{7}}+{\frac{bBc{x}^{6}}{3}}+{\frac{2\,A{x}^{5}bc}{5}}+{\frac{2\,C{x}^{5}ac}{5}}+{\frac{C{x}^{5}{b}^{2}}{5}}+{\frac{B{x}^{4}ac}{2}}+{\frac{B{x}^{4}{b}^{2}}{4}}+{\frac{2\,A{x}^{3}ac}{3}}+{\frac{A{x}^{3}{b}^{2}}{3}}+{\frac{2\,C{x}^{3}ab}{3}}+abB{x}^{2}+2\,Aabx+C{a}^{2}x-{\frac{A{a}^{2}}{x}}+{a}^{2}B\ln \left ( x \right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.25102, size = 365, normalized size = 2.52 \begin{align*} \frac{280 \, C c^{2} x^{10} + 315 \, B c^{2} x^{9} + 840 \, B b c x^{7} + 360 \,{\left (2 \, C b c + A c^{2}\right )} x^{8} + 504 \,{\left (C b^{2} + 2 \,{\left (C a + A b\right )} c\right )} x^{6} + 2520 \, B a b x^{3} + 630 \,{\left (B b^{2} + 2 \, B a c\right )} x^{5} + 840 \,{\left (2 \, C a b + A b^{2} + 2 \, A a c\right )} x^{4} + 2520 \, B a^{2} x \log \left (x\right ) - 2520 \, A a^{2} + 2520 \,{\left (C a^{2} + 2 \, A a b\right )} x^{2}}{2520 \, x} \end{align*}

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

[In]

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

[Out]

1/2520*(280*C*c^2*x^10 + 315*B*c^2*x^9 + 840*B*b*c*x^7 + 360*(2*C*b*c + A*c^2)*x^8 + 504*(C*b^2 + 2*(C*a + A*b
)*c)*x^6 + 2520*B*a*b*x^3 + 630*(B*b^2 + 2*B*a*c)*x^5 + 840*(2*C*a*b + A*b^2 + 2*A*a*c)*x^4 + 2520*B*a^2*x*log
(x) - 2520*A*a^2 + 2520*(C*a^2 + 2*A*a*b)*x^2)/x

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.08822, size = 198, normalized size = 1.37 \begin{align*} \frac{1}{9} \, C c^{2} x^{9} + \frac{1}{8} \, B c^{2} x^{8} + \frac{2}{7} \, C b c x^{7} + \frac{1}{7} \, A c^{2} x^{7} + \frac{1}{3} \, B b c x^{6} + \frac{1}{5} \, C b^{2} x^{5} + \frac{2}{5} \, C a c x^{5} + \frac{2}{5} \, A b c x^{5} + \frac{1}{4} \, B b^{2} x^{4} + \frac{1}{2} \, B a c x^{4} + \frac{2}{3} \, C a b x^{3} + \frac{1}{3} \, A b^{2} x^{3} + \frac{2}{3} \, A a c x^{3} + B a b x^{2} + C a^{2} x + 2 \, A a b x + B a^{2} \log \left ({\left | x \right |}\right ) - \frac{A a^{2}}{x} \end{align*}

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

[In]

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

[Out]

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