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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 146, normalized size = 1. \begin{align*}{\frac{{c}^{2}C{x}^{7}}{7}}+{\frac{B{c}^{2}{x}^{6}}{6}}+{\frac{A{x}^{5}{c}^{2}}{5}}+{\frac{2\,C{x}^{5}bc}{5}}+{\frac{bBc{x}^{4}}{2}}+{\frac{2\,A{x}^{3}bc}{3}}+{\frac{2\,C{x}^{3}ac}{3}}+{\frac{C{x}^{3}{b}^{2}}{3}}+B{x}^{2}ac+{\frac{B{x}^{2}{b}^{2}}{2}}+2\,aAcx+A{b}^{2}x+2\,abCx-2\,{\frac{Aab}{x}}-{\frac{C{a}^{2}}{x}}-{\frac{B{a}^{2}}{2\,{x}^{2}}}-{\frac{A{a}^{2}}{3\,{x}^{3}}}+2\,abB\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^4,x)

[Out]

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

________________________________________________________________________________________

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.28773, size = 354, normalized size = 2.38 \begin{align*} \frac{30 \, C c^{2} x^{10} + 35 \, B c^{2} x^{9} + 105 \, B b c x^{7} + 42 \,{\left (2 \, C b c + A c^{2}\right )} x^{8} + 70 \,{\left (C b^{2} + 2 \,{\left (C a + A b\right )} c\right )} x^{6} + 420 \, B a b x^{3} \log \left (x\right ) + 105 \,{\left (B b^{2} + 2 \, B a c\right )} x^{5} + 210 \,{\left (2 \, C a b + A b^{2} + 2 \, A a c\right )} x^{4} - 105 \, B a^{2} x - 70 \, A a^{2} - 210 \,{\left (C a^{2} + 2 \, A a b\right )} x^{2}}{210 \, x^{3}} \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^4,x, algorithm="fricas")

[Out]

1/210*(30*C*c^2*x^10 + 35*B*c^2*x^9 + 105*B*b*c*x^7 + 42*(2*C*b*c + A*c^2)*x^8 + 70*(C*b^2 + 2*(C*a + A*b)*c)*
x^6 + 420*B*a*b*x^3*log(x) + 105*(B*b^2 + 2*B*a*c)*x^5 + 210*(2*C*a*b + A*b^2 + 2*A*a*c)*x^4 - 105*B*a^2*x - 7
0*A*a^2 - 210*(C*a^2 + 2*A*a*b)*x^2)/x^3

________________________________________________________________________________________

Sympy [A]  time = 0.886277, size = 158, normalized size = 1.06 \begin{align*} 2 B a b \log{\left (x \right )} + \frac{B b 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 b c}{5}\right ) + x^{3} \left (\frac{2 A b c}{3} + \frac{2 C a c}{3} + \frac{C b^{2}}{3}\right ) + x^{2} \left (B a c + \frac{B b^{2}}{2}\right ) + x \left (2 A a c + A b^{2} + 2 C a b\right ) - \frac{2 A a^{2} + 3 B a^{2} x + x^{2} \left (12 A a b + 6 C a^{2}\right )}{6 x^{3}} \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**4,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.08759, size = 197, normalized size = 1.32 \begin{align*} \frac{1}{7} \, C c^{2} x^{7} + \frac{1}{6} \, B c^{2} x^{6} + \frac{2}{5} \, C b c x^{5} + \frac{1}{5} \, A c^{2} x^{5} + \frac{1}{2} \, B b c x^{4} + \frac{1}{3} \, C b^{2} x^{3} + \frac{2}{3} \, C a c x^{3} + \frac{2}{3} \, A b c x^{3} + \frac{1}{2} \, B b^{2} x^{2} + B a c x^{2} + 2 \, C a b x + A b^{2} x + 2 \, A a c x + 2 \, B a b \log \left ({\left | x \right |}\right ) - \frac{3 \, B a^{2} x + 2 \, A a^{2} + 6 \,{\left (C a^{2} + 2 \, A a b\right )} x^{2}}{6 \, x^{3}} \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^4,x, algorithm="giac")

[Out]

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