Optimal. Leaf size=160 \[ -\frac {c}{\left (a c^2-d^2\right ) x}+\frac {d \sqrt {a+b x^2}}{a \left (a c^2-d^2\right ) x}-\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}+\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} d x}{\sqrt {a c^2-d^2} \sqrt {a+b x^2}}\right )}{\left (a c^2-d^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2187, 331, 211,
491, 12, 385} \begin {gather*} \frac {\sqrt {b} c^2 \text {ArcTan}\left (\frac {\sqrt {b} d x}{\sqrt {a+b x^2} \sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}-\frac {\sqrt {b} c^2 \text {ArcTan}\left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}+\frac {d \sqrt {a+b x^2}}{a x \left (a c^2-d^2\right )}-\frac {c}{x \left (a c^2-d^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 331
Rule 385
Rule 491
Rule 2187
Rubi steps
\begin {align*} \int \frac {1}{x^2 \left (a c+b c x^2+d \sqrt {a+b x^2}\right )} \, dx &=(a c) \int \frac {1}{x^2 \left (a^2 c^2-a d^2+a b c^2 x^2\right )} \, dx-(a d) \int \frac {1}{x^2 \sqrt {a+b x^2} \left (a^2 c^2-a d^2+a b c^2 x^2\right )} \, dx\\ &=-\frac {c}{\left (a c^2-d^2\right ) x}+\frac {d \sqrt {a+b x^2}}{a \left (a c^2-d^2\right ) x}-\frac {\left (a b c^3\right ) \int \frac {1}{a^2 c^2-a d^2+a b c^2 x^2} \, dx}{a c^2-d^2}+\frac {d \int \frac {a^2 b c^2}{\sqrt {a+b x^2} \left (a^2 c^2-a d^2+a b c^2 x^2\right )} \, dx}{a \left (a c^2-d^2\right )}\\ &=-\frac {c}{\left (a c^2-d^2\right ) x}+\frac {d \sqrt {a+b x^2}}{a \left (a c^2-d^2\right ) x}-\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}+\frac {\left (a b c^2 d\right ) \int \frac {1}{\sqrt {a+b x^2} \left (a^2 c^2-a d^2+a b c^2 x^2\right )} \, dx}{a c^2-d^2}\\ &=-\frac {c}{\left (a c^2-d^2\right ) x}+\frac {d \sqrt {a+b x^2}}{a \left (a c^2-d^2\right ) x}-\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}+\frac {\left (a b c^2 d\right ) \text {Subst}\left (\int \frac {1}{a^2 c^2-a d^2-\left (-a^2 b c^2+b \left (a^2 c^2-a d^2\right )\right ) x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{a c^2-d^2}\\ &=-\frac {c}{\left (a c^2-d^2\right ) x}+\frac {d \sqrt {a+b x^2}}{a \left (a c^2-d^2\right ) x}-\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}+\frac {\sqrt {b} c^2 \tan ^{-1}\left (\frac {\sqrt {b} d x}{\sqrt {a c^2-d^2} \sqrt {a+b x^2}}\right )}{\left (a c^2-d^2\right )^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.35, size = 105, normalized size = 0.66 \begin {gather*} -\frac {a c-d \sqrt {a+b x^2}}{a^2 c^2 x-a d^2 x}+\frac {2 \sqrt {b} c^2 \tan ^{-1}\left (\frac {d+c \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {a c^2-d^2}}\right )}{\left (a c^2-d^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2288\) vs.
\(2(140)=280\).
time = 0.04, size = 2289, normalized size = 14.31
method | result | size |
default | \(\text {Expression too large to display}\) | \(2289\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 581, normalized size = 3.63 \begin {gather*} \left [-\frac {a c^{2} x \sqrt {-\frac {b}{a c^{2} - d^{2}}} \log \left (\frac {a^{4} c^{4} - 2 \, a^{3} c^{2} d^{2} + a^{2} d^{4} + {\left (a^{2} b^{2} c^{4} - 8 \, a b^{2} c^{2} d^{2} + 8 \, b^{2} d^{4}\right )} x^{4} + 2 \, {\left (a^{3} b c^{4} - 5 \, a^{2} b c^{2} d^{2} + 4 \, a b d^{4}\right )} x^{2} + 4 \, {\left ({\left (a^{2} b c^{4} d - 3 \, a b c^{2} d^{3} + 2 \, b d^{5}\right )} x^{3} + {\left (a^{3} c^{4} d - 2 \, a^{2} c^{2} d^{3} + a d^{5}\right )} x\right )} \sqrt {b x^{2} + a} \sqrt {-\frac {b}{a c^{2} - d^{2}}}}{b^{2} c^{4} x^{4} + a^{2} c^{4} - 2 \, a c^{2} d^{2} + d^{4} + 2 \, {\left (a b c^{4} - b c^{2} d^{2}\right )} x^{2}}\right ) + 2 \, a c^{2} x \sqrt {-\frac {b}{a c^{2} - d^{2}}} \log \left (\frac {b c^{2} x^{2} - a c^{2} + 2 \, {\left (a c^{3} - c d^{2}\right )} x \sqrt {-\frac {b}{a c^{2} - d^{2}}} + d^{2}}{b c^{2} x^{2} + a c^{2} - d^{2}}\right ) + 4 \, a c - 4 \, \sqrt {b x^{2} + a} d}{4 \, {\left (a^{2} c^{2} - a d^{2}\right )} x}, -\frac {2 \, a c^{2} x \sqrt {\frac {b}{a c^{2} - d^{2}}} \arctan \left (c x \sqrt {\frac {b}{a c^{2} - d^{2}}}\right ) - a c^{2} x \sqrt {\frac {b}{a c^{2} - d^{2}}} \arctan \left (-\frac {{\left (a^{2} c^{2} - a d^{2} + {\left (a b c^{2} - 2 \, b d^{2}\right )} x^{2}\right )} \sqrt {b x^{2} + a} \sqrt {\frac {b}{a c^{2} - d^{2}}}}{2 \, {\left (b^{2} d x^{3} + a b d x\right )}}\right ) + 2 \, a c - 2 \, \sqrt {b x^{2} + a} d}{2 \, {\left (a^{2} c^{2} - a d^{2}\right )} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x^{2} \left (a c + b c x^{2} + d \sqrt {a + b x^{2}}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.14, size = 211, normalized size = 1.32 \begin {gather*} -b^{\frac {3}{2}} d {\left (\frac {c^{2} \arctan \left (\frac {{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} c^{2} + a c^{2} - 2 \, d^{2}}{2 \, \sqrt {a c^{2} - d^{2}} d}\right )}{{\left (a b c^{2} - b d^{2}\right )} \sqrt {a c^{2} - d^{2}} d} + \frac {2}{{\left (a b c^{2} - b d^{2}\right )} {\left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a\right )}}\right )} - \frac {b c^{2} \arctan \left (\frac {b c x}{\sqrt {a b c^{2} - b d^{2}}}\right )}{\sqrt {a b c^{2} - b d^{2}} {\left (a c^{2} - d^{2}\right )}} - \frac {c}{{\left (a c^{2} - d^{2}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{x^2\,\left (a\,c+d\,\sqrt {b\,x^2+a}+b\,c\,x^2\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________