Optimal. Leaf size=96 \[ \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\frac {b+a c+a d x^2}{c+d x^2}}}{\sqrt {a}}\right )-\frac {\sqrt {b+a c} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {\frac {b+a c+a d x^2}{c+d x^2}}}{\sqrt {b+a c}}\right )}{\sqrt {c}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {1985, 1981,
1980, 492, 214} \begin {gather*} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\frac {a c+a d x^2+b}{c+d x^2}}}{\sqrt {a}}\right )-\frac {\sqrt {a c+b} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {\frac {a c+a d x^2+b}{c+d x^2}}}{\sqrt {a c+b}}\right )}{\sqrt {c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 492
Rule 1980
Rule 1981
Rule 1985
Rubi steps
\begin {align*} \int \frac {\sqrt {a+\frac {b}{c+d x^2}}}{x} \, dx &=\frac {\left (\sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \int \frac {\sqrt {b+a \left (c+d x^2\right )}}{x \sqrt {c+d x^2}} \, dx}{\sqrt {b+a \left (c+d x^2\right )}}\\ &=\frac {\left (\sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \int \frac {\sqrt {b+a c+a d x^2}}{x \sqrt {c+d x^2}} \, dx}{\sqrt {b+a \left (c+d x^2\right )}}\\ &=\frac {\left (\sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {\sqrt {b+a c+a d x}}{x \sqrt {c+d x}} \, dx,x,x^2\right )}{2 \sqrt {b+a \left (c+d x^2\right )}}\\ &=-\frac {\left ((-b-a c) \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {c+d x} \sqrt {b+a c+a d x}} \, dx,x,x^2\right )}{2 \sqrt {b+a \left (c+d x^2\right )}}+\frac {\left (a d \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {c+d x} \sqrt {b+a c+a d x}} \, dx,x,x^2\right )}{2 \sqrt {b+a \left (c+d x^2\right )}}\\ &=\frac {\left (a \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {b+a x^2}} \, dx,x,\sqrt {c+d x^2}\right )}{\sqrt {b+a \left (c+d x^2\right )}}-\frac {\left ((-b-a c) \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {1}{-c-(-b-a c) x^2} \, dx,x,\frac {\sqrt {c+d x^2}}{\sqrt {b+a \left (c+d x^2\right )}}\right )}{\sqrt {b+a \left (c+d x^2\right )}}\\ &=-\frac {\sqrt {b+a c} \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}} \tanh ^{-1}\left (\frac {\sqrt {b+a c} \sqrt {c+d x^2}}{\sqrt {c} \sqrt {b+a \left (c+d x^2\right )}}\right )}{\sqrt {c} \sqrt {b+a \left (c+d x^2\right )}}+\frac {\left (a \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}}\right ) \text {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {\sqrt {c+d x^2}}{\sqrt {b+a \left (c+d x^2\right )}}\right )}{\sqrt {b+a \left (c+d x^2\right )}}\\ &=\frac {\sqrt {a} \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c+d x^2}}{\sqrt {b+a \left (c+d x^2\right )}}\right )}{\sqrt {b+a \left (c+d x^2\right )}}-\frac {\sqrt {b+a c} \sqrt {c+d x^2} \sqrt {a+\frac {b}{c+d x^2}} \tanh ^{-1}\left (\frac {\sqrt {b+a c} \sqrt {c+d x^2}}{\sqrt {c} \sqrt {b+a \left (c+d x^2\right )}}\right )}{\sqrt {c} \sqrt {b+a \left (c+d x^2\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 102, normalized size = 1.06 \begin {gather*} -\frac {\sqrt {-b-a c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\frac {b+a c+a d x^2}{c+d x^2}}}{\sqrt {-b-a c}}\right )}{\sqrt {c}}+\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\frac {b+a c+a d x^2}{c+d x^2}}}{\sqrt {a}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(234\) vs.
\(2(80)=160\).
time = 0.05, size = 235, normalized size = 2.45
method | result | size |
default | \(-\frac {\sqrt {\frac {a d \,x^{2}+a c +b}{d \,x^{2}+c}}\, \left (d \,x^{2}+c \right ) \left (-\ln \left (\frac {2 a \,d^{2} x^{2}+2 a c d +2 \sqrt {a \,d^{2} x^{4}+2 a c d \,x^{2}+b d \,x^{2}+c^{2} a +b c}\, \sqrt {a \,d^{2}}+b d}{2 \sqrt {a \,d^{2}}}\right ) a c d +\sqrt {c^{2} a +b c}\, \ln \left (\frac {2 a c d \,x^{2}+b d \,x^{2}+2 c^{2} a +2 \sqrt {c^{2} a +b c}\, \sqrt {a \,d^{2} x^{4}+2 a c d \,x^{2}+b d \,x^{2}+c^{2} a +b c}+2 b c}{x^{2}}\right ) \sqrt {a \,d^{2}}\right )}{2 \sqrt {\left (d \,x^{2}+c \right ) \left (a d \,x^{2}+a c +b \right )}\, c \sqrt {a \,d^{2}}}\) | \(235\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 159, normalized size = 1.66 \begin {gather*} \frac {{\left (a c + b\right )} \log \left (\frac {c \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} - \sqrt {{\left (a c + b\right )} c}}{c \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} + \sqrt {{\left (a c + b\right )} c}}\right )}{2 \, \sqrt {{\left (a c + b\right )} c}} - \frac {1}{2} \, \sqrt {a} \log \left (-\frac {\sqrt {a} - \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}}{\sqrt {a} + \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 177 vs.
\(2 (80) = 160\).
time = 0.42, size = 927, normalized size = 9.66 \begin {gather*} \left [\frac {1}{4} \, \sqrt {a} \log \left (8 \, a^{2} d^{2} x^{4} + 8 \, a^{2} c^{2} + 8 \, {\left (2 \, a^{2} c + a b\right )} d x^{2} + 8 \, a b c + b^{2} + 4 \, {\left (2 \, a d^{2} x^{4} + {\left (4 \, a c + b\right )} d x^{2} + 2 \, a c^{2} + b c\right )} \sqrt {a} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}\right ) + \frac {1}{4} \, \sqrt {\frac {a c + b}{c}} \log \left (\frac {{\left (8 \, a^{2} c^{2} + 8 \, a b c + b^{2}\right )} d^{2} x^{4} + 8 \, a^{2} c^{4} + 16 \, a b c^{3} + 8 \, b^{2} c^{2} + 8 \, {\left (2 \, a^{2} c^{3} + 3 \, a b c^{2} + b^{2} c\right )} d x^{2} - 4 \, {\left ({\left (2 \, a c^{2} + b c\right )} d^{2} x^{4} + 2 \, a c^{4} + 2 \, b c^{3} + {\left (4 \, a c^{3} + 3 \, b c^{2}\right )} d x^{2}\right )} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} \sqrt {\frac {a c + b}{c}}}{x^{4}}\right ), -\frac {1}{2} \, \sqrt {-a} \arctan \left (\frac {{\left (2 \, a d x^{2} + 2 \, a c + b\right )} \sqrt {-a} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}}{2 \, {\left (a^{2} d x^{2} + a^{2} c + a b\right )}}\right ) + \frac {1}{4} \, \sqrt {\frac {a c + b}{c}} \log \left (\frac {{\left (8 \, a^{2} c^{2} + 8 \, a b c + b^{2}\right )} d^{2} x^{4} + 8 \, a^{2} c^{4} + 16 \, a b c^{3} + 8 \, b^{2} c^{2} + 8 \, {\left (2 \, a^{2} c^{3} + 3 \, a b c^{2} + b^{2} c\right )} d x^{2} - 4 \, {\left ({\left (2 \, a c^{2} + b c\right )} d^{2} x^{4} + 2 \, a c^{4} + 2 \, b c^{3} + {\left (4 \, a c^{3} + 3 \, b c^{2}\right )} d x^{2}\right )} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} \sqrt {\frac {a c + b}{c}}}{x^{4}}\right ), \frac {1}{2} \, \sqrt {-\frac {a c + b}{c}} \arctan \left (\frac {{\left ({\left (2 \, a c + b\right )} d x^{2} + 2 \, a c^{2} + 2 \, b c\right )} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} \sqrt {-\frac {a c + b}{c}}}{2 \, {\left (a^{2} c^{2} + {\left (a^{2} c + a b\right )} d x^{2} + 2 \, a b c + b^{2}\right )}}\right ) + \frac {1}{4} \, \sqrt {a} \log \left (8 \, a^{2} d^{2} x^{4} + 8 \, a^{2} c^{2} + 8 \, {\left (2 \, a^{2} c + a b\right )} d x^{2} + 8 \, a b c + b^{2} + 4 \, {\left (2 \, a d^{2} x^{4} + {\left (4 \, a c + b\right )} d x^{2} + 2 \, a c^{2} + b c\right )} \sqrt {a} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}\right ), -\frac {1}{2} \, \sqrt {-a} \arctan \left (\frac {{\left (2 \, a d x^{2} + 2 \, a c + b\right )} \sqrt {-a} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}}}{2 \, {\left (a^{2} d x^{2} + a^{2} c + a b\right )}}\right ) + \frac {1}{2} \, \sqrt {-\frac {a c + b}{c}} \arctan \left (\frac {{\left ({\left (2 \, a c + b\right )} d x^{2} + 2 \, a c^{2} + 2 \, b c\right )} \sqrt {\frac {a d x^{2} + a c + b}{d x^{2} + c}} \sqrt {-\frac {a c + b}{c}}}{2 \, {\left (a^{2} c^{2} + {\left (a^{2} c + a b\right )} d x^{2} + 2 \, a b c + b^{2}\right )}}\right )\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 {\sqrt {\frac {a c + a d x^{2} + b}{c + d x^{2}}}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \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 {\sqrt {a+\frac {b}{d\,x^2+c}}}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________