### 3.24 $$\int \frac{(a+c x^2) (A+B x+C x^2)}{(d+e x)^3} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.198574, antiderivative size = 154, normalized size of antiderivative = 0.99, number of steps used = 2, number of rules used = 1, integrand size = 25, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.04, Rules used = {1628} $\frac{a e^2 (2 C d-B e)-c d e (3 B d-2 A e)+4 c C d^3}{e^5 (d+e x)}-\frac{\left (a e^2+c d^2\right ) \left (A e^2-B d e+C d^2\right )}{2 e^5 (d+e x)^2}+\frac{\log (d+e x) \left (a C e^2-c e (3 B d-A e)+6 c C d^2\right )}{e^5}-\frac{c x (3 C d-B e)}{e^4}+\frac{c C x^2}{2 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.102892, size = 176, normalized size = 1.13 $\frac{-a B e^3+2 a C d e^2+2 A c d e^2-3 B c d^2 e+4 c C d^3}{e^5 (d+e x)}+\frac{-a A e^4+a B d e^3-a C d^2 e^2-A c d^2 e^2+B c d^3 e-c C d^4}{2 e^5 (d+e x)^2}+\frac{\log (d+e x) \left (a C e^2+A c e^2-3 B c d e+6 c C d^2\right )}{e^5}+\frac{c x (B e-3 C d)}{e^4}+\frac{c C x^2}{2 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 257, normalized size = 1.7 \begin{align*}{\frac{Cc{x}^{2}}{2\,{e}^{3}}}+{\frac{Bcx}{{e}^{3}}}-3\,{\frac{Ccdx}{{e}^{4}}}-{\frac{aA}{2\,e \left ( ex+d \right ) ^{2}}}-{\frac{Ac{d}^{2}}{2\,{e}^{3} \left ( ex+d \right ) ^{2}}}+{\frac{Bda}{2\,{e}^{2} \left ( ex+d \right ) ^{2}}}+{\frac{Bc{d}^{3}}{2\,{e}^{4} \left ( ex+d \right ) ^{2}}}-{\frac{C{d}^{2}a}{2\,{e}^{3} \left ( ex+d \right ) ^{2}}}-{\frac{Cc{d}^{4}}{2\,{e}^{5} \left ( ex+d \right ) ^{2}}}+{\frac{\ln \left ( ex+d \right ) Ac}{{e}^{3}}}-3\,{\frac{\ln \left ( ex+d \right ) Bcd}{{e}^{4}}}+{\frac{\ln \left ( ex+d \right ) aC}{{e}^{3}}}+6\,{\frac{\ln \left ( ex+d \right ) Cc{d}^{2}}{{e}^{5}}}+2\,{\frac{Acd}{{e}^{3} \left ( ex+d \right ) }}-{\frac{aB}{{e}^{2} \left ( ex+d \right ) }}-3\,{\frac{Bc{d}^{2}}{{e}^{4} \left ( ex+d \right ) }}+2\,{\frac{aCd}{{e}^{3} \left ( ex+d \right ) }}+4\,{\frac{Cc{d}^{3}}{{e}^{5} \left ( ex+d \right ) }} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.995817, size = 239, normalized size = 1.53 \begin{align*} \frac{7 \, C c d^{4} - 5 \, B c d^{3} e - B a d e^{3} - A a e^{4} + 3 \,{\left (C a + A c\right )} d^{2} e^{2} + 2 \,{\left (4 \, C c d^{3} e - 3 \, B c d^{2} e^{2} - B a e^{4} + 2 \,{\left (C a + A c\right )} d e^{3}\right )} x}{2 \,{\left (e^{7} x^{2} + 2 \, d e^{6} x + d^{2} e^{5}\right )}} + \frac{C c e x^{2} - 2 \,{\left (3 \, C c d - B c e\right )} x}{2 \, e^{4}} + \frac{{\left (6 \, C c d^{2} - 3 \, B c d e +{\left (C a + A c\right )} e^{2}\right )} \log \left (e x + d\right )}{e^{5}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.68601, size = 585, normalized size = 3.75 \begin{align*} \frac{C c e^{4} x^{4} + 7 \, C c d^{4} - 5 \, B c d^{3} e - B a d e^{3} - A a e^{4} + 3 \,{\left (C a + A c\right )} d^{2} e^{2} - 2 \,{\left (2 \, C c d e^{3} - B c e^{4}\right )} x^{3} -{\left (11 \, C c d^{2} e^{2} - 4 \, B c d e^{3}\right )} x^{2} + 2 \,{\left (C c d^{3} e - 2 \, B c d^{2} e^{2} - B a e^{4} + 2 \,{\left (C a + A c\right )} d e^{3}\right )} x + 2 \,{\left (6 \, C c d^{4} - 3 \, B c d^{3} e +{\left (C a + A c\right )} d^{2} e^{2} +{\left (6 \, C c d^{2} e^{2} - 3 \, B c d e^{3} +{\left (C a + A c\right )} e^{4}\right )} x^{2} + 2 \,{\left (6 \, C c d^{3} e - 3 \, B c d^{2} e^{2} +{\left (C a + A c\right )} d e^{3}\right )} x\right )} \log \left (e x + d\right )}{2 \,{\left (e^{7} x^{2} + 2 \, d e^{6} x + d^{2} e^{5}\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.1388, size = 225, normalized size = 1.44 \begin{align*}{\left (6 \, C c d^{2} - 3 \, B c d e + C a e^{2} + A c e^{2}\right )} e^{\left (-5\right )} \log \left ({\left | x e + d \right |}\right ) + \frac{1}{2} \,{\left (C c x^{2} e^{3} - 6 \, C c d x e^{2} + 2 \, B c x e^{3}\right )} e^{\left (-6\right )} + \frac{{\left (7 \, C c d^{4} - 5 \, B c d^{3} e + 3 \, C a d^{2} e^{2} + 3 \, A c d^{2} e^{2} - B a d e^{3} - A a e^{4} + 2 \,{\left (4 \, C c d^{3} e - 3 \, B c d^{2} e^{2} + 2 \, C a d e^{3} + 2 \, A c d e^{3} - B a e^{4}\right )} x\right )} e^{\left (-5\right )}}{2 \,{\left (x e + d\right )}^{2}} \end{align*}

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

[In]

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

[Out]

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