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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.107909, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 25, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.12, Rules used = {1645, 639, 205} $-\frac{2 a e (a C+A c)-c x (a B e+a C d+3 A c d)}{8 a^2 c^2 \left (a+c x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+a C d+3 A c d)}{8 a^{5/2} c^{3/2}}-\frac{(d+e x) (a B-x (A c-a C))}{4 a c \left (a+c x^2\right )^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((a*B - (A*c - a*C)*x)*(d + e*x))/(4*a*c*(a + c*x^2)^2) - (2*a*(A*c + a*C)*e - c*(3*A*c*d + a*C*d + a*B*e)*x)
/(8*a^2*c^2*(a + c*x^2)) + ((3*A*c*d + a*C*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(8*a^(5/2)*c^(3/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 639

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

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 157, normalized size = 1.2 \begin{align*}{\frac{1}{ \left ( c{x}^{2}+a \right ) ^{2}} \left ({\frac{ \left ( 3\,Acd+aBe+Cad \right ){x}^{3}}{8\,{a}^{2}}}-{\frac{Ce{x}^{2}}{2\,c}}+{\frac{ \left ( 5\,Acd-aBe-Cad \right ) x}{8\,ac}}-{\frac{Ace+Bcd+aCe}{4\,{c}^{2}}} \right ) }+{\frac{3\,Ad}{8\,{a}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Be}{8\,ac}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Cd}{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)*(C*x^2+B*x+A)/(c*x^2+a)^3,x)

[Out]

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

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.00029, size = 991, normalized size = 7.62 \begin{align*} \left [-\frac{8 \, C a^{3} c e x^{2} + 4 \, B a^{3} c d - 2 \,{\left (B a^{2} c^{2} e +{\left (C a^{2} c^{2} + 3 \, A a c^{3}\right )} d\right )} x^{3} +{\left (B a^{3} e +{\left (B a c^{2} e +{\left (C a c^{2} + 3 \, A c^{3}\right )} d\right )} x^{4} + 2 \,{\left (B a^{2} c e +{\left (C a^{2} c + 3 \, A a c^{2}\right )} d\right )} x^{2} +{\left (C a^{3} + 3 \, A a^{2} c\right )} d\right )} \sqrt{-a c} \log \left (\frac{c x^{2} - 2 \, \sqrt{-a c} x - a}{c x^{2} + a}\right ) + 4 \,{\left (C a^{4} + A a^{3} c\right )} e + 2 \,{\left (B a^{3} c e +{\left (C a^{3} c - 5 \, A a^{2} c^{2}\right )} d\right )} x}{16 \,{\left (a^{3} c^{4} x^{4} + 2 \, a^{4} c^{3} x^{2} + a^{5} c^{2}\right )}}, -\frac{4 \, C a^{3} c e x^{2} + 2 \, B a^{3} c d -{\left (B a^{2} c^{2} e +{\left (C a^{2} c^{2} + 3 \, A a c^{3}\right )} d\right )} x^{3} -{\left (B a^{3} e +{\left (B a c^{2} e +{\left (C a c^{2} + 3 \, A c^{3}\right )} d\right )} x^{4} + 2 \,{\left (B a^{2} c e +{\left (C a^{2} c + 3 \, A a c^{2}\right )} d\right )} x^{2} +{\left (C a^{3} + 3 \, A a^{2} c\right )} d\right )} \sqrt{a c} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) + 2 \,{\left (C a^{4} + A a^{3} c\right )} e +{\left (B a^{3} c e +{\left (C a^{3} c - 5 \, A a^{2} c^{2}\right )} d\right )} x}{8 \,{\left (a^{3} c^{4} x^{4} + 2 \, a^{4} c^{3} x^{2} + a^{5} c^{2}\right )}}\right ] \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 34.2871, size = 240, normalized size = 1.85 \begin{align*} - \frac{\sqrt{- \frac{1}{a^{5} c^{3}}} \left (3 A c d + B a e + C a d\right ) \log{\left (- a^{3} c \sqrt{- \frac{1}{a^{5} c^{3}}} + x \right )}}{16} + \frac{\sqrt{- \frac{1}{a^{5} c^{3}}} \left (3 A c d + B a e + C a d\right ) \log{\left (a^{3} c \sqrt{- \frac{1}{a^{5} c^{3}}} + x \right )}}{16} + \frac{- 2 A a^{2} c e - 2 B a^{2} c d - 2 C a^{3} e - 4 C a^{2} c e x^{2} + x^{3} \left (3 A c^{3} d + B a c^{2} e + C a c^{2} d\right ) + x \left (5 A a c^{2} d - B a^{2} c e - C a^{2} c d\right )}{8 a^{4} c^{2} + 16 a^{3} c^{3} x^{2} + 8 a^{2} c^{4} x^{4}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.14763, size = 205, normalized size = 1.58 \begin{align*} \frac{{\left (C a d + 3 \, A c d + B a e\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{8 \, \sqrt{a c} a^{2} c} + \frac{C a c^{2} d x^{3} + 3 \, A c^{3} d x^{3} + B a c^{2} x^{3} e - 4 \, C a^{2} c x^{2} e - C a^{2} c d x + 5 \, A a c^{2} d x - B a^{2} c x e - 2 \, B a^{2} c d - 2 \, C a^{3} e - 2 \, A a^{2} c e}{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)*(C*x^2+B*x+A)/(c*x^2+a)^3,x, algorithm="giac")

[Out]

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