3.1.6 \(\int \frac {a+b x^2}{(c+d x^2)^2} \, dx\) [6]

Optimal. Leaf size=63 \[ -\frac {(b c-a d) x}{2 c d \left (c+d x^2\right )}+\frac {(b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{3/2}} \]

[Out]

-1/2*(-a*d+b*c)*x/c/d/(d*x^2+c)+1/2*(a*d+b*c)*arctan(x*d^(1/2)/c^(1/2))/c^(3/2)/d^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {393, 211} \begin {gather*} \frac {(a d+b c) \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{3/2}}-\frac {x (b c-a d)}{2 c d \left (c+d x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)/(c + d*x^2)^2,x]

[Out]

-1/2*((b*c - a*d)*x)/(c*d*(c + d*x^2)) + ((b*c + a*d)*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(2*c^(3/2)*d^(3/2))

Rule 211

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

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps

\begin {align*} \int \frac {a+b x^2}{\left (c+d x^2\right )^2} \, dx &=-\frac {(b c-a d) x}{2 c d \left (c+d x^2\right )}+\frac {(b c+a d) \int \frac {1}{c+d x^2} \, dx}{2 c d}\\ &=-\frac {(b c-a d) x}{2 c d \left (c+d x^2\right )}+\frac {(b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 63, normalized size = 1.00 \begin {gather*} -\frac {(b c-a d) x}{2 c d \left (c+d x^2\right )}+\frac {(b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)/(c + d*x^2)^2,x]

[Out]

-1/2*((b*c - a*d)*x)/(c*d*(c + d*x^2)) + ((b*c + a*d)*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(2*c^(3/2)*d^(3/2))

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 57, normalized size = 0.90

method result size
default \(\frac {\left (a d -b c \right ) x}{2 c d \left (d \,x^{2}+c \right )}+\frac {\left (a d +b c \right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 c d \sqrt {c d}}\) \(57\)
risch \(\frac {\left (a d -b c \right ) x}{2 c d \left (d \,x^{2}+c \right )}-\frac {\ln \left (d x +\sqrt {-c d}\right ) a}{4 \sqrt {-c d}\, c}-\frac {\ln \left (d x +\sqrt {-c d}\right ) b}{4 \sqrt {-c d}\, d}+\frac {\ln \left (-d x +\sqrt {-c d}\right ) a}{4 \sqrt {-c d}\, c}+\frac {\ln \left (-d x +\sqrt {-c d}\right ) b}{4 \sqrt {-c d}\, d}\) \(122\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)/(d*x^2+c)^2,x,method=_RETURNVERBOSE)

[Out]

1/2*(a*d-b*c)/c/d*x/(d*x^2+c)+1/2*(a*d+b*c)/c/d/(c*d)^(1/2)*arctan(d*x/(c*d)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 57, normalized size = 0.90 \begin {gather*} -\frac {{\left (b c - a d\right )} x}{2 \, {\left (c d^{2} x^{2} + c^{2} d\right )}} + \frac {{\left (b c + a d\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)^2,x, algorithm="maxima")

[Out]

-1/2*(b*c - a*d)*x/(c*d^2*x^2 + c^2*d) + 1/2*(b*c + a*d)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c*d)

________________________________________________________________________________________

Fricas [A]
time = 0.68, size = 182, normalized size = 2.89 \begin {gather*} \left [-\frac {{\left (b c^{2} + a c d + {\left (b c d + a d^{2}\right )} x^{2}\right )} \sqrt {-c d} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) + 2 \, {\left (b c^{2} d - a c d^{2}\right )} x}{4 \, {\left (c^{2} d^{3} x^{2} + c^{3} d^{2}\right )}}, \frac {{\left (b c^{2} + a c d + {\left (b c d + a d^{2}\right )} x^{2}\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - {\left (b c^{2} d - a c d^{2}\right )} x}{2 \, {\left (c^{2} d^{3} x^{2} + c^{3} d^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 112 vs. \(2 (54) = 108\).
time = 0.20, size = 112, normalized size = 1.78 \begin {gather*} \frac {x \left (a d - b c\right )}{2 c^{2} d + 2 c d^{2} x^{2}} - \frac {\sqrt {- \frac {1}{c^{3} d^{3}}} \left (a d + b c\right ) \log {\left (- c^{2} d \sqrt {- \frac {1}{c^{3} d^{3}}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{c^{3} d^{3}}} \left (a d + b c\right ) \log {\left (c^{2} d \sqrt {- \frac {1}{c^{3} d^{3}}} + x \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)/(d*x**2+c)**2,x)

[Out]

x*(a*d - b*c)/(2*c**2*d + 2*c*d**2*x**2) - sqrt(-1/(c**3*d**3))*(a*d + b*c)*log(-c**2*d*sqrt(-1/(c**3*d**3)) +
 x)/4 + sqrt(-1/(c**3*d**3))*(a*d + b*c)*log(c**2*d*sqrt(-1/(c**3*d**3)) + x)/4

________________________________________________________________________________________

Giac [A]
time = 0.88, size = 57, normalized size = 0.90 \begin {gather*} \frac {{\left (b c + a d\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c d} - \frac {b c x - a d x}{2 \, {\left (d x^{2} + c\right )} c d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)^2,x, algorithm="giac")

[Out]

1/2*(b*c + a*d)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c*d) - 1/2*(b*c*x - a*d*x)/((d*x^2 + c)*c*d)

________________________________________________________________________________________

Mupad [B]
time = 5.01, size = 51, normalized size = 0.81 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )\,\left (a\,d+b\,c\right )}{2\,c^{3/2}\,d^{3/2}}+\frac {x\,\left (a\,d-b\,c\right )}{2\,c\,d\,\left (d\,x^2+c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)/(c + d*x^2)^2,x)

[Out]

(atan((d^(1/2)*x)/c^(1/2))*(a*d + b*c))/(2*c^(3/2)*d^(3/2)) + (x*(a*d - b*c))/(2*c*d*(c + d*x^2))

________________________________________________________________________________________