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

Optimal. Leaf size=225 $\frac{x \left (c d (2 a B e+a C d+5 A c d)+a e^2 (a C+A c)\right )}{16 a^3 c^2 \left (a+c x^2\right )}-\frac{x \left (3 a e^2 (a C+A c)-c d (2 a B e+a C d+5 A c d)\right )+2 a e (a B e+2 a C d+4 A c d)}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (c d (2 a B e+a C d+5 A c d)+a e^2 (a C+A c)\right )}{16 a^{7/2} c^{5/2}}-\frac{(d+e x)^2 (a B-x (A c-a C))}{6 a c \left (a+c x^2\right )^3}$

[Out]

-((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(6*a*c*(a + c*x^2)^3) - (2*a*e*(4*A*c*d + 2*a*C*d + a*B*e) + (3*a*(A*c +
a*C)*e^2 - c*d*(5*A*c*d + a*C*d + 2*a*B*e))*x)/(24*a^2*c^2*(a + c*x^2)^2) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d
+ a*C*d + 2*a*B*e))*x)/(16*a^3*c^2*(a + c*x^2)) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 2*a*B*e))*ArcT
an[(Sqrt[c]*x)/Sqrt[a]])/(16*a^(7/2)*c^(5/2))

________________________________________________________________________________________

Rubi [A]  time = 0.397508, antiderivative size = 225, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 27, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.148, Rules used = {1645, 778, 199, 205} $\frac{x \left (c d (2 a B e+a C d+5 A c d)+a e^2 (a C+A c)\right )}{16 a^3 c^2 \left (a+c x^2\right )}-\frac{x \left (3 a e^2 (a C+A c)-c d (2 a B e+a C d+5 A c d)\right )+2 a e (a B e+2 a C d+4 A c d)}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (c d (2 a B e+a C d+5 A c d)+a e^2 (a C+A c)\right )}{16 a^{7/2} c^{5/2}}-\frac{(d+e x)^2 (a B-x (A c-a C))}{6 a c \left (a+c x^2\right )^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(6*a*c*(a + c*x^2)^3) - (2*a*e*(4*A*c*d + 2*a*C*d + a*B*e) + (3*a*(A*c +
a*C)*e^2 - c*d*(5*A*c*d + a*C*d + 2*a*B*e))*x)/(24*a^2*c^2*(a + c*x^2)^2) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d
+ a*C*d + 2*a*B*e))*x)/(16*a^3*c^2*(a + c*x^2)) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 2*a*B*e))*ArcT
an[(Sqrt[c]*x)/Sqrt[a]])/(16*a^(7/2)*c^(5/2))

Rule 1645

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[((d + e*x)^m*(a + c*x^2)^(p + 1)*(a*g - c*f*x))/(2*a*c*(p + 1)), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 778

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*(e*f + d*g) -
(c*d*f - a*e*g)*x)*(a + c*x^2)^(p + 1))/(2*a*c*(p + 1)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(2*a*c*(p + 1)),
Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && LtQ[p, -1]

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (A+B x+C x^2\right )}{\left (a+c x^2\right )^4} \, dx &=-\frac{(a B-(A c-a C) x) (d+e x)^2}{6 a c \left (a+c x^2\right )^3}-\frac{\int \frac{(d+e x) (-5 A c d-a C d-2 a B e-3 (A c+a C) e x)}{\left (a+c x^2\right )^3} \, dx}{6 a c}\\ &=-\frac{(a B-(A c-a C) x) (d+e x)^2}{6 a c \left (a+c x^2\right )^3}-\frac{2 a e (4 A c d+2 a C d+a B e)+\left (3 a (A c+a C) e^2-c d (5 A c d+a C d+2 a B e)\right ) x}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{\left (a (A c+a C) e^2+c d (5 A c d+a C d+2 a B e)\right ) \int \frac{1}{\left (a+c x^2\right )^2} \, dx}{8 a^2 c^2}\\ &=-\frac{(a B-(A c-a C) x) (d+e x)^2}{6 a c \left (a+c x^2\right )^3}-\frac{2 a e (4 A c d+2 a C d+a B e)+\left (3 a (A c+a C) e^2-c d (5 A c d+a C d+2 a B e)\right ) x}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{\left (a (A c+a C) e^2+c d (5 A c d+a C d+2 a B e)\right ) x}{16 a^3 c^2 \left (a+c x^2\right )}+\frac{\left (a (A c+a C) e^2+c d (5 A c d+a C d+2 a B e)\right ) \int \frac{1}{a+c x^2} \, dx}{16 a^3 c^2}\\ &=-\frac{(a B-(A c-a C) x) (d+e x)^2}{6 a c \left (a+c x^2\right )^3}-\frac{2 a e (4 A c d+2 a C d+a B e)+\left (3 a (A c+a C) e^2-c d (5 A c d+a C d+2 a B e)\right ) x}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{\left (a (A c+a C) e^2+c d (5 A c d+a C d+2 a B e)\right ) x}{16 a^3 c^2 \left (a+c x^2\right )}+\frac{\left (a (A c+a C) e^2+c d (5 A c d+a C d+2 a B e)\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{16 a^{7/2} c^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.169364, size = 266, normalized size = 1.18 $\frac{x \left (A c \left (a e^2+5 c d^2\right )+a \left (a C e^2+c d (2 B e+C d)\right )\right )}{16 a^3 c^2 \left (a+c x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (A c \left (a e^2+5 c d^2\right )+a \left (a C e^2+c d (2 B e+C d)\right )\right )}{16 a^{7/2} c^{5/2}}+\frac{a^2 (-e) (6 B e+12 C d+7 C e x)+a c x \left (e (A e+2 B d)+C d^2\right )+5 A c^2 d^2 x}{24 a^2 c^2 \left (a+c x^2\right )^2}+\frac{a^2 e (B e+2 C d+C e x)-a c \left (A e (2 d+e x)+B d (d+2 e x)+C d^2 x\right )+A c^2 d^2 x}{6 a c^2 \left (a+c x^2\right )^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((A*c*(5*c*d^2 + a*e^2) + a*(a*C*e^2 + c*d*(C*d + 2*B*e)))*x)/(16*a^3*c^2*(a + c*x^2)) + (5*A*c^2*d^2*x + a*c*
(C*d^2 + e*(2*B*d + A*e))*x - a^2*e*(12*C*d + 6*B*e + 7*C*e*x))/(24*a^2*c^2*(a + c*x^2)^2) + (A*c^2*d^2*x + a^
2*e*(2*C*d + B*e + C*e*x) - a*c*(C*d^2*x + A*e*(2*d + e*x) + B*d*(d + 2*e*x)))/(6*a*c^2*(a + c*x^2)^3) + ((A*c
*(5*c*d^2 + a*e^2) + a*(a*C*e^2 + c*d*(C*d + 2*B*e)))*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(16*a^(7/2)*c^(5/2))

________________________________________________________________________________________

Maple [A]  time = 0.053, size = 333, normalized size = 1.5 \begin{align*}{\frac{1}{ \left ( c{x}^{2}+a \right ) ^{3}} \left ({\frac{ \left ( aA{e}^{2}c+5\,A{c}^{2}{d}^{2}+2\,Bacde+{a}^{2}C{e}^{2}+Cac{d}^{2} \right ){x}^{5}}{16\,{a}^{3}}}+{\frac{ \left ( aA{e}^{2}c+5\,A{c}^{2}{d}^{2}+2\,Bacde-{a}^{2}C{e}^{2}+Cac{d}^{2} \right ){x}^{3}}{6\,{a}^{2}c}}-{\frac{e \left ( Be+2\,Cd \right ){x}^{2}}{4\,c}}-{\frac{ \left ( aA{e}^{2}c-11\,A{c}^{2}{d}^{2}+2\,Bacde+{a}^{2}C{e}^{2}+Cac{d}^{2} \right ) x}{16\,a{c}^{2}}}-{\frac{4\,Acde+aB{e}^{2}+2\,Bc{d}^{2}+2\,Cade}{12\,{c}^{2}}} \right ) }+{\frac{A{e}^{2}}{16\,{a}^{2}c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{5\,A{d}^{2}}{16\,{a}^{3}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Bde}{8\,{a}^{2}c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{C{e}^{2}}{16\,a{c}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{C{d}^{2}}{16\,{a}^{2}c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \end{align*}

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

[In]

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

[Out]

(1/16*(A*a*c*e^2+5*A*c^2*d^2+2*B*a*c*d*e+C*a^2*e^2+C*a*c*d^2)/a^3*x^5+1/6*(A*a*c*e^2+5*A*c^2*d^2+2*B*a*c*d*e-C
*a^2*e^2+C*a*c*d^2)/a^2/c*x^3-1/4*e*(B*e+2*C*d)*x^2/c-1/16*(A*a*c*e^2-11*A*c^2*d^2+2*B*a*c*d*e+C*a^2*e^2+C*a*c
*d^2)/a/c^2*x-1/12*(4*A*c*d*e+B*a*e^2+2*B*c*d^2+2*C*a*d*e)/c^2)/(c*x^2+a)^3+1/16/a^2/c/(a*c)^(1/2)*arctan(x*c/
(a*c)^(1/2))*A*e^2+5/16/a^3/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*A*d^2+1/8/a^2/c/(a*c)^(1/2)*arctan(x*c/(a*c)^(
1/2))*B*d*e+1/16/a/c^2/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*C*e^2+1/16/a^2/c/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2)
)*C*d^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.55657, size = 2163, normalized size = 9.61 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

[-1/96*(16*B*a^4*c^2*d^2 + 8*B*a^5*c*e^2 - 6*(2*B*a^2*c^4*d*e + (C*a^2*c^4 + 5*A*a*c^5)*d^2 + (C*a^3*c^3 + A*a
^2*c^4)*e^2)*x^5 - 16*(2*B*a^3*c^3*d*e + (C*a^3*c^3 + 5*A*a^2*c^4)*d^2 - (C*a^4*c^2 - A*a^3*c^3)*e^2)*x^3 + 16
*(C*a^5*c + 2*A*a^4*c^2)*d*e + 24*(2*C*a^4*c^2*d*e + B*a^4*c^2*e^2)*x^2 + 3*(2*B*a^4*c*d*e + (2*B*a*c^4*d*e +
(C*a*c^4 + 5*A*c^5)*d^2 + (C*a^2*c^3 + A*a*c^4)*e^2)*x^6 + 3*(2*B*a^2*c^3*d*e + (C*a^2*c^3 + 5*A*a*c^4)*d^2 +
(C*a^3*c^2 + A*a^2*c^3)*e^2)*x^4 + (C*a^4*c + 5*A*a^3*c^2)*d^2 + (C*a^5 + A*a^4*c)*e^2 + 3*(2*B*a^3*c^2*d*e +
(C*a^3*c^2 + 5*A*a^2*c^3)*d^2 + (C*a^4*c + A*a^3*c^2)*e^2)*x^2)*sqrt(-a*c)*log((c*x^2 - 2*sqrt(-a*c)*x - a)/(c
*x^2 + a)) + 6*(2*B*a^4*c^2*d*e + (C*a^4*c^2 - 11*A*a^3*c^3)*d^2 + (C*a^5*c + A*a^4*c^2)*e^2)*x)/(a^4*c^6*x^6
+ 3*a^5*c^5*x^4 + 3*a^6*c^4*x^2 + a^7*c^3), -1/48*(8*B*a^4*c^2*d^2 + 4*B*a^5*c*e^2 - 3*(2*B*a^2*c^4*d*e + (C*a
^2*c^4 + 5*A*a*c^5)*d^2 + (C*a^3*c^3 + A*a^2*c^4)*e^2)*x^5 - 8*(2*B*a^3*c^3*d*e + (C*a^3*c^3 + 5*A*a^2*c^4)*d^
2 - (C*a^4*c^2 - A*a^3*c^3)*e^2)*x^3 + 8*(C*a^5*c + 2*A*a^4*c^2)*d*e + 12*(2*C*a^4*c^2*d*e + B*a^4*c^2*e^2)*x^
2 - 3*(2*B*a^4*c*d*e + (2*B*a*c^4*d*e + (C*a*c^4 + 5*A*c^5)*d^2 + (C*a^2*c^3 + A*a*c^4)*e^2)*x^6 + 3*(2*B*a^2*
c^3*d*e + (C*a^2*c^3 + 5*A*a*c^4)*d^2 + (C*a^3*c^2 + A*a^2*c^3)*e^2)*x^4 + (C*a^4*c + 5*A*a^3*c^2)*d^2 + (C*a^
5 + A*a^4*c)*e^2 + 3*(2*B*a^3*c^2*d*e + (C*a^3*c^2 + 5*A*a^2*c^3)*d^2 + (C*a^4*c + A*a^3*c^2)*e^2)*x^2)*sqrt(a
*c)*arctan(sqrt(a*c)*x/a) + 3*(2*B*a^4*c^2*d*e + (C*a^4*c^2 - 11*A*a^3*c^3)*d^2 + (C*a^5*c + A*a^4*c^2)*e^2)*x
)/(a^4*c^6*x^6 + 3*a^5*c^5*x^4 + 3*a^6*c^4*x^2 + a^7*c^3)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.15398, size = 443, normalized size = 1.97 \begin{align*} \frac{{\left (C a c d^{2} + 5 \, A c^{2} d^{2} + 2 \, B a c d e + C a^{2} e^{2} + A a c e^{2}\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{16 \, \sqrt{a c} a^{3} c^{2}} + \frac{3 \, C a c^{3} d^{2} x^{5} + 15 \, A c^{4} d^{2} x^{5} + 6 \, B a c^{3} d x^{5} e + 3 \, C a^{2} c^{2} x^{5} e^{2} + 3 \, A a c^{3} x^{5} e^{2} + 8 \, C a^{2} c^{2} d^{2} x^{3} + 40 \, A a c^{3} d^{2} x^{3} + 16 \, B a^{2} c^{2} d x^{3} e - 8 \, C a^{3} c x^{3} e^{2} + 8 \, A a^{2} c^{2} x^{3} e^{2} - 24 \, C a^{3} c d x^{2} e - 3 \, C a^{3} c d^{2} x + 33 \, A a^{2} c^{2} d^{2} x - 12 \, B a^{3} c x^{2} e^{2} - 6 \, B a^{3} c d x e - 8 \, B a^{3} c d^{2} - 3 \, C a^{4} x e^{2} - 3 \, A a^{3} c x e^{2} - 8 \, C a^{4} d e - 16 \, A a^{3} c d e - 4 \, B a^{4} e^{2}}{48 \,{\left (c x^{2} + a\right )}^{3} a^{3} c^{2}} \end{align*}

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

[In]

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

[Out]

1/16*(C*a*c*d^2 + 5*A*c^2*d^2 + 2*B*a*c*d*e + C*a^2*e^2 + A*a*c*e^2)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a^3*c^2)
+ 1/48*(3*C*a*c^3*d^2*x^5 + 15*A*c^4*d^2*x^5 + 6*B*a*c^3*d*x^5*e + 3*C*a^2*c^2*x^5*e^2 + 3*A*a*c^3*x^5*e^2 +
8*C*a^2*c^2*d^2*x^3 + 40*A*a*c^3*d^2*x^3 + 16*B*a^2*c^2*d*x^3*e - 8*C*a^3*c*x^3*e^2 + 8*A*a^2*c^2*x^3*e^2 - 24
*C*a^3*c*d*x^2*e - 3*C*a^3*c*d^2*x + 33*A*a^2*c^2*d^2*x - 12*B*a^3*c*x^2*e^2 - 6*B*a^3*c*d*x*e - 8*B*a^3*c*d^2
- 3*C*a^4*x*e^2 - 3*A*a^3*c*x*e^2 - 8*C*a^4*d*e - 16*A*a^3*c*d*e - 4*B*a^4*e^2)/((c*x^2 + a)^3*a^3*c^2)