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

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

[Out]

-(a*B - (A*c - a*C)*x)/(2*a*c*(a + c*x^2)) + ((A*c + a*C)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*a^(3/2)*c^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0431747, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.15, Rules used = {1814, 12, 205} $\frac{(a C+A c) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{2 a^{3/2} c^{3/2}}-\frac{a B-x (A c-a C)}{2 a c \left (a+c x^2\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-(a*B - (A*c - a*C)*x)/(2*a*c*(a + c*x^2)) + ((A*c + a*C)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*a^(3/2)*c^(3/2))

Rule 1814

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[((a
*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

Mathematica [A]  time = 0.0531633, size = 68, normalized size = 0.99 $\frac{(a C+A c) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{2 a^{3/2} c^{3/2}}+\frac{-a B-a C x+A c x}{2 a c \left (a+c x^2\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-(a*B) + A*c*x - a*C*x)/(2*a*c*(a + c*x^2)) + ((A*c + a*C)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*a^(3/2)*c^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 76, normalized size = 1.1 \begin{align*}{\frac{1}{c{x}^{2}+a} \left ({\frac{ \left ( Ac-aC \right ) x}{2\,ac}}-{\frac{B}{2\,c}} \right ) }+{\frac{A}{2\,a}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{C}{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((C*x^2+B*x+A)/(c*x^2+a)^2,x)

[Out]

(1/2*(A*c-C*a)/a/c*x-1/2*B/c)/(c*x^2+a)+1/2/a/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*A+1/2/c/(a*c)^(1/2)*arctan(x
*c/(a*c)^(1/2))*C

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.77277, size = 412, normalized size = 5.97 \begin{align*} \left [-\frac{2 \, B a^{2} c +{\left (C a^{2} + A a c +{\left (C a c + A c^{2}\right )} x^{2}\right )} \sqrt{-a c} \log \left (\frac{c x^{2} - 2 \, \sqrt{-a c} x - a}{c x^{2} + a}\right ) + 2 \,{\left (C a^{2} c - A a c^{2}\right )} x}{4 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}, -\frac{B a^{2} c -{\left (C a^{2} + A a c +{\left (C a c + A c^{2}\right )} x^{2}\right )} \sqrt{a c} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) +{\left (C a^{2} c - A a c^{2}\right )} x}{2 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}\right ] \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.840179, size = 116, normalized size = 1.68 \begin{align*} - \frac{\sqrt{- \frac{1}{a^{3} c^{3}}} \left (A c + C a\right ) \log{\left (- a^{2} c \sqrt{- \frac{1}{a^{3} c^{3}}} + x \right )}}{4} + \frac{\sqrt{- \frac{1}{a^{3} c^{3}}} \left (A c + C a\right ) \log{\left (a^{2} c \sqrt{- \frac{1}{a^{3} c^{3}}} + x \right )}}{4} - \frac{B a + x \left (- A c + C a\right )}{2 a^{2} c + 2 a c^{2} x^{2}} \end{align*}

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

[In]

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

[Out]

-sqrt(-1/(a**3*c**3))*(A*c + C*a)*log(-a**2*c*sqrt(-1/(a**3*c**3)) + x)/4 + sqrt(-1/(a**3*c**3))*(A*c + C*a)*l
og(a**2*c*sqrt(-1/(a**3*c**3)) + x)/4 - (B*a + x*(-A*c + C*a))/(2*a**2*c + 2*a*c**2*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.15341, size = 81, normalized size = 1.17 \begin{align*} \frac{{\left (C a + A c\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{2 \, \sqrt{a c} a c} - \frac{C a x - A c x + B a}{2 \,{\left (c x^{2} + a\right )} a c} \end{align*}

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

[In]

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

[Out]

1/2*(C*a + A*c)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a*c) - 1/2*(C*a*x - A*c*x + B*a)/((c*x^2 + a)*a*c)