Integrand size = 31, antiderivative size = 50 \[ \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=-\frac {1}{b \sqrt {a+b x^2}}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {6, 585, 79, 65, 214} \[ \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=-\frac {\text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}-\frac {1}{b \sqrt {a+b x^2}} \]
[In]
[Out]
Rule 6
Rule 65
Rule 79
Rule 214
Rule 585
Rubi steps \begin{align*} \text {integral}& = \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} \text {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} \text {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 {\text {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*}
Time = 0.00 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.98 \[ \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=-\frac {1}{b \sqrt {a+b x^2}}+\frac {\arctan \left (\frac {\sqrt {a+b x^2}}{\sqrt {-a+b}}\right )}{\sqrt {-a+b}} \]
[In]
[Out]
Time = 1.52 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.84
method | result | size |
pseudoelliptic | \(-\frac {1}{b \sqrt {b \,x^{2}+a}}+\frac {\arctan \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {-a +b}}\right )}{\sqrt {-a +b}}\) | \(42\) |
default | \(-\frac {b +1}{b \sqrt {b \,x^{2}+a}}+\left (a -b \right ) \left (\frac {1}{\left (a -b \right ) \sqrt {b \,x^{2}+a}}+\frac {\arctan \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {-a +b}}\right )}{\left (a -b \right ) \sqrt {-a +b}}\right )\) | \(76\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 121 vs. \(2 (42) = 84\).
Time = 0.31 (sec) , antiderivative size = 268, normalized size of antiderivative = 5.36 \[ \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=\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 ] \]
[In]
[Out]
\[ \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 (a + b x^{2} + x^{2} + 1\right )}{\left (a + b x^{2}\right )^{\frac {3}{2}} \left (x^{2} + 1\right )}\, dx \]
[In]
[Out]
Exception generated. \[ \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=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.82 \[ \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=\frac {\arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a + b}}\right )}{\sqrt {-a + b}} - \frac {1}{\sqrt {b x^{2} + a} b} \]
[In]
[Out]
Time = 19.35 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.92 \[ \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=\frac {1}{\sqrt {b\,x^2+a}\,\left (a-b\right )}-\frac {a}{\sqrt {b\,x^2+a}\,\left (a\,b-b^2\right )}-\frac {a\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a-b}}\right )}{{\left (a-b\right )}^{3/2}}+\frac {b\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a-b}}\right )}{{\left (a-b\right )}^{3/2}} \]
[In]
[Out]