Optimal. Leaf size=50 \[ -\frac{1}{b \sqrt{a+b x^2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a-b}}\right )}{\sqrt{a-b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0644341, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {6, 571, 78, 63, 208} \[ -\frac{1}{b \sqrt{a+b x^2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a-b}}\right )}{\sqrt{a-b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 571
Rule 78
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{x \left (1+a+x^2+b x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx &=\int \frac{x \left (1+a+(1+b) x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1+a+(1+b) x}{(1+x) (a+b x)^{3/2}} \, dx,x,x^2\right )\\ &=-\frac{1}{b \sqrt{a+b x^2}}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{(1+x) \sqrt{a+b x}} \, dx,x,x^2\right )\\ &=-\frac{1}{b \sqrt{a+b x^2}}+\frac{\operatorname{Subst}\left (\int \frac{1}{1-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )}{b}\\ &=-\frac{1}{b \sqrt{a+b x^2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a-b}}\right )}{\sqrt{a-b}}\\ \end{align*}
Mathematica [A] time = 0.0133638, size = 71, normalized size = 1.42 \[ \frac{b \sqrt{a-b} \sqrt{a+b x^2} \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a-b}}\right )+a-b}{b (b-a) \sqrt{a+b x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.013, size = 133, normalized size = 2.7 \begin{align*} -{\frac{1}{\sqrt{b{x}^{2}+a}}}-{\frac{1}{b}{\frac{1}{\sqrt{b{x}^{2}+a}}}}-{\frac{b}{-b+a}\arctan \left ({\sqrt{b{x}^{2}+a}{\frac{1}{\sqrt{b-a}}}} \right ){\frac{1}{\sqrt{b-a}}}}-{\frac{b}{-b+a}{\frac{1}{\sqrt{b{x}^{2}+a}}}}+{\frac{a}{-b+a}\arctan \left ({\sqrt{b{x}^{2}+a}{\frac{1}{\sqrt{b-a}}}} \right ){\frac{1}{\sqrt{b-a}}}}+{\frac{a}{-b+a}{\frac{1}{\sqrt{b{x}^{2}+a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.61191, size = 571, normalized size = 11.42 \begin{align*} \left [\frac{{\left (b^{2} x^{2} + a b\right )} \sqrt{a - b} \log \left (\frac{b^{2} x^{4} + 2 \,{\left (4 \, a b - 3 \, b^{2}\right )} x^{2} - 4 \,{\left (b x^{2} + 2 \, a - b\right )} \sqrt{b x^{2} + a} \sqrt{a - b} + 8 \, a^{2} - 8 \, a b + b^{2}}{x^{4} + 2 \, x^{2} + 1}\right ) - 4 \, \sqrt{b x^{2} + a}{\left (a - b\right )}}{4 \,{\left (a^{2} b - a b^{2} +{\left (a b^{2} - b^{3}\right )} x^{2}\right )}}, -\frac{{\left (b^{2} x^{2} + a b\right )} \sqrt{-a + b} \arctan \left (-\frac{{\left (b x^{2} + 2 \, a - b\right )} \sqrt{b x^{2} + a} \sqrt{-a + b}}{2 \,{\left ({\left (a b - b^{2}\right )} x^{2} + a^{2} - a b\right )}}\right ) + 2 \, \sqrt{b x^{2} + a}{\left (a - b\right )}}{2 \,{\left (a^{2} b - a b^{2} +{\left (a b^{2} - b^{3}\right )} x^{2}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 38.9967, size = 37, normalized size = 0.74 \begin{align*} \frac{\operatorname{atan}{\left (\frac{\sqrt{a + b x^{2}}}{\sqrt{- a + b}} \right )}}{\sqrt{- a + b}} - \frac{1}{b \sqrt{a + b x^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18557, size = 55, normalized size = 1.1 \begin{align*} \frac{\arctan \left (\frac{\sqrt{b x^{2} + a}}{\sqrt{-a + b}}\right )}{\sqrt{-a + b}} - \frac{1}{\sqrt{b x^{2} + a} b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]