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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.304423, antiderivative size = 209, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 27, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.185, Rules used = {1645, 819, 635, 205, 260} $-\frac{(d+e x) \left (a e (3 a B e+5 a C d+3 A c d)-x \left (3 A c^2 d^2-a \left (4 a C e^2-c d (3 B e+C d)\right )\right )\right )}{8 a^2 c^2 \left (a+c x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (c d^2 (3 a B e+a C d+3 A c d)+3 a e^2 (a B e+3 a C d+A c d)\right )}{8 a^{5/2} c^{5/2}}-\frac{(d+e x)^3 (a B-x (A c-a C))}{4 a c \left (a+c x^2\right )^2}+\frac{C e^3 \log \left (a+c x^2\right )}{2 c^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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 819

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

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

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]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

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

Mathematica [A]  time = 0.324269, size = 281, normalized size = 1.34 $\frac{\frac{2 a^2 c e (e (A e+3 B d+B e x)+3 C d (d+e x))-2 a^3 C e^3-2 a c^2 d \left (3 A e (d+e x)+B d (d+3 e x)+C d^2 x\right )+2 A c^3 d^3 x}{a \left (a+c x^2\right )^2}+\frac{-a^2 c e (e (4 A e+12 B d+5 B e x)+3 C d (4 d+5 e x))+8 a^3 C e^3+a c^2 d x \left (3 e (A e+B d)+C d^2\right )+3 A c^3 d^3 x}{a^2 \left (a+c x^2\right )}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (3 A c d \left (a e^2+c d^2\right )+a \left (3 a e^2 (B e+3 C d)+c d^2 (3 B e+C d)\right )\right )}{a^{5/2}}+4 C e^3 \log \left (a+c x^2\right )}{8 c^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.056, size = 402, normalized size = 1.9 \begin{align*}{\frac{1}{ \left ( c{x}^{2}+a \right ) ^{2}} \left ({\frac{ \left ( 3\,Acd{e}^{2}a+3\,A{d}^{3}{c}^{2}-5\,{a}^{2}B{e}^{3}+3\,Bc{d}^{2}ae-15\,C{a}^{2}d{e}^{2}+Cac{d}^{3} \right ){x}^{3}}{8\,{a}^{2}c}}-{\frac{e \left ( Ac{e}^{2}+3\,Bcde-2\,aC{e}^{2}+3\,Cc{d}^{2} \right ){x}^{2}}{2\,{c}^{2}}}-{\frac{ \left ( 3\,Acd{e}^{2}a-5\,A{d}^{3}{c}^{2}+3\,{a}^{2}B{e}^{3}+3\,Bc{d}^{2}ae+9\,C{a}^{2}d{e}^{2}+Cac{d}^{3} \right ) x}{8\,a{c}^{2}}}-{\frac{aA{e}^{3}c+3\,A{c}^{2}{d}^{2}e+3\,aBd{e}^{2}c+B{c}^{2}{d}^{3}-3\,{a}^{2}C{e}^{3}+3\,Cac{d}^{2}e}{4\,{c}^{3}}} \right ) }+{\frac{C{e}^{3}\ln \left ( c{x}^{2}+a \right ) }{2\,{c}^{3}}}+{\frac{3\,Ad{e}^{2}}{8\,ac}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{3\,A{d}^{3}}{8\,{a}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{3\,B{e}^{3}}{8\,{c}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{3\,B{d}^{2}e}{8\,ac}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{9\,Cd{e}^{2}}{8\,{c}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{C{d}^{3}}{8\,ac}\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)^3*(C*x^2+B*x+A)/(c*x^2+a)^3,x)

[Out]

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

________________________________________________________________________________________

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)^3*(C*x^2+B*x+A)/(c*x^2+a)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.66185, size = 2325, normalized size = 11.12 \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)^3*(C*x^2+B*x+A)/(c*x^2+a)^3,x, algorithm="fricas")

[Out]

[-1/16*(4*B*a^3*c^2*d^3 + 12*B*a^4*c*d*e^2 + 12*(C*a^4*c + A*a^3*c^2)*d^2*e - 4*(3*C*a^5 - A*a^4*c)*e^3 - 2*(3
*B*a^2*c^3*d^2*e - 5*B*a^3*c^2*e^3 + (C*a^2*c^3 + 3*A*a*c^4)*d^3 - 3*(5*C*a^3*c^2 - A*a^2*c^3)*d*e^2)*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*a*c^3)*d*e^2)*x^4 + (C*a^3*c + 3*A*a^2*
c^2)*d^3 + 3*(3*C*a^4 + A*a^3*c)*d*e^2 + 2*(3*B*a^2*c^2*d^2*e + 3*B*a^3*c*e^3 + (C*a^2*c^2 + 3*A*a*c^3)*d^3 +
3*(3*C*a^3*c + A*a^2*c^2)*d*e^2)*x^2)*sqrt(a*c)*arctan(sqrt(a*c)*x/a) + (3*B*a^3*c^2*d^2*e + 3*B*a^4*c*e^3 + (
C*a^3*c^2 - 5*A*a^2*c^3)*d^3 + 3*(3*C*a^4*c + A*a^3*c^2)*d*e^2)*x - 4*(C*a^3*c^2*e^3*x^4 + 2*C*a^4*c*e^3*x^2 +
C*a^5*e^3)*log(c*x^2 + a))/(a^3*c^5*x^4 + 2*a^4*c^4*x^2 + a^5*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)**3*(C*x**2+B*x+A)/(c*x**2+a)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.16451, size = 470, normalized size = 2.25 \begin{align*} \frac{C e^{3} \log \left (c x^{2} + a\right )}{2 \, c^{3}} + \frac{{\left (C a c d^{3} + 3 \, A c^{2} d^{3} + 3 \, B a c d^{2} e + 9 \, C a^{2} d e^{2} + 3 \, A a c d e^{2} + 3 \, B a^{2} e^{3}\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{8 \, \sqrt{a c} a^{2} c^{2}} + \frac{{\left (C a c^{2} d^{3} + 3 \, A c^{3} d^{3} + 3 \, B a c^{2} d^{2} e - 15 \, C a^{2} c d e^{2} + 3 \, A a c^{2} d e^{2} - 5 \, B a^{2} c e^{3}\right )} x^{3} - 4 \,{\left (3 \, C a^{2} c d^{2} e + 3 \, B a^{2} c d e^{2} - 2 \, C a^{3} e^{3} + A a^{2} c e^{3}\right )} x^{2} -{\left (C a^{2} c d^{3} - 5 \, A a c^{2} d^{3} + 3 \, B a^{2} c d^{2} e + 9 \, C a^{3} d e^{2} + 3 \, A a^{2} c d e^{2} + 3 \, B a^{3} e^{3}\right )} x - \frac{2 \,{\left (B a^{2} c^{2} d^{3} + 3 \, C a^{3} c d^{2} e + 3 \, A a^{2} c^{2} d^{2} e + 3 \, B a^{3} c d e^{2} - 3 \, C a^{4} e^{3} + A a^{3} c e^{3}\right )}}{c}}{8 \,{\left (c x^{2} + a\right )}^{2} a^{2} c^{2}} \end{align*}

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

[In]

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

[Out]

1/2*C*e^3*log(c*x^2 + a)/c^3 + 1/8*(C*a*c*d^3 + 3*A*c^2*d^3 + 3*B*a*c*d^2*e + 9*C*a^2*d*e^2 + 3*A*a*c*d*e^2 +
3*B*a^2*e^3)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a^2*c^2) + 1/8*((C*a*c^2*d^3 + 3*A*c^3*d^3 + 3*B*a*c^2*d^2*e - 1
5*C*a^2*c*d*e^2 + 3*A*a*c^2*d*e^2 - 5*B*a^2*c*e^3)*x^3 - 4*(3*C*a^2*c*d^2*e + 3*B*a^2*c*d*e^2 - 2*C*a^3*e^3 +
A*a^2*c*e^3)*x^2 - (C*a^2*c*d^3 - 5*A*a*c^2*d^3 + 3*B*a^2*c*d^2*e + 9*C*a^3*d*e^2 + 3*A*a^2*c*d*e^2 + 3*B*a^3*
e^3)*x - 2*(B*a^2*c^2*d^3 + 3*C*a^3*c*d^2*e + 3*A*a^2*c^2*d^2*e + 3*B*a^3*c*d*e^2 - 3*C*a^4*e^3 + A*a^3*c*e^3)
/c)/((c*x^2 + a)^2*a^2*c^2)