Optimal. Leaf size=58 \[ \frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {514, 446, 80, 63, 208} \[ \frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 80
Rule 208
Rule 446
Rule 514
Rubi steps
\begin {align*} \int \frac {-1+x^2}{\sqrt {a-b+\frac {b}{x^2}} x^3} \, dx &=\int \frac {1-\frac {1}{x^2}}{\sqrt {a-b+\frac {b}{x^2}} x} \, dx\\ &=-\left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {1-x}{x \sqrt {a-b+b x}} \, dx,x,\frac {1}{x^2}\right )\right )\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a-b+b x}} \, dx,x,\frac {1}{x^2}\right )\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}-\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {a-b}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \left (-1+\frac {1}{x^2}\right )}\right )}{b}\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 100, normalized size = 1.72 \[ \frac {\sqrt {a-b} \left (a x^2-b x^2+b\right )+b x \sqrt {a x^2-b x^2+b} \tanh ^{-1}\left (\frac {x \sqrt {a-b}}{\sqrt {x^2 (a-b)+b}}\right )}{b x^2 \sqrt {a-b} \sqrt {a+b \left (\frac {1}{x^2}-1\right )}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 180, normalized size = 3.10 \[ \left [\frac {\sqrt {a - b} b \log \left (-2 \, {\left (a - b\right )} x^{2} - 2 \, \sqrt {a - b} x^{2} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}} - b\right ) + 2 \, {\left (a - b\right )} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{2 \, {\left (a b - b^{2}\right )}}, \frac {\sqrt {-a + b} b \arctan \left (-\frac {\sqrt {-a + b} x^{2} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{{\left (a - b\right )} x^{2} + b}\right ) + {\left (a - b\right )} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{a b - b^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 102, normalized size = 1.76 \[ \frac {\sqrt {a \,x^{2}-b \,x^{2}+b}\, \left (b x \ln \left (\sqrt {a -b}\, x +\sqrt {a \,x^{2}-b \,x^{2}+b}\right )+\sqrt {a \,x^{2}-b \,x^{2}+b}\, \sqrt {a -b}\right )}{\sqrt {\frac {a \,x^{2}-b \,x^{2}+b}{x^{2}}}\, \sqrt {a -b}\, b \,x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.08, size = 46, normalized size = 0.79 \[ \frac {\mathrm {atanh}\left (\frac {\sqrt {a-b+\frac {b}{x^2}}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}+\frac {\sqrt {a-b+\frac {b}{x^2}}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.18, size = 70, normalized size = 1.21 \[ - \frac {\begin {cases} - \frac {1}{\sqrt {a} x^{2}} & \text {for}\: b = 0 \\- \frac {2 \sqrt {a - b + \frac {b}{x^{2}}}}{b} & \text {otherwise} \end {cases}}{2} - \frac {\operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a - b}} \sqrt {a - b + \frac {b}{x^{2}}}} \right )}}{\sqrt {- \frac {1}{a - b}} \left (a - b\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________