Optimal. Leaf size=78 \[ \frac{(1-a)^2 \sqrt{a+b x+1}}{b^3 \sqrt{-a-b x+1}}+\frac{\sqrt{-a-b x+1} \sqrt{a+b x+1}}{b^3}-\frac{(1-2 a) \sin ^{-1}(a+b x)}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.137006, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {6164, 89, 80, 53, 619, 216} \[ \frac{(1-a)^2 \sqrt{a+b x+1}}{b^3 \sqrt{-a-b x+1}}+\frac{\sqrt{-a-b x+1} \sqrt{a+b x+1}}{b^3}-\frac{(1-2 a) \sin ^{-1}(a+b x)}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6164
Rule 89
Rule 80
Rule 53
Rule 619
Rule 216
Rubi steps
\begin{align*} \int \frac{e^{\tanh ^{-1}(a+b x)} x^2}{1-a^2-2 a b x-b^2 x^2} \, dx &=\int \frac{x^2}{(1-a-b x)^{3/2} \sqrt{1+a+b x}} \, dx\\ &=\frac{(1-a)^2 \sqrt{1+a+b x}}{b^3 \sqrt{1-a-b x}}-\frac{\int \frac{(1-a) b+b^2 x}{\sqrt{1-a-b x} \sqrt{1+a+b x}} \, dx}{b^3}\\ &=\frac{(1-a)^2 \sqrt{1+a+b x}}{b^3 \sqrt{1-a-b x}}+\frac{\sqrt{1-a-b x} \sqrt{1+a+b x}}{b^3}-\frac{(1-2 a) \int \frac{1}{\sqrt{1-a-b x} \sqrt{1+a+b x}} \, dx}{b^2}\\ &=\frac{(1-a)^2 \sqrt{1+a+b x}}{b^3 \sqrt{1-a-b x}}+\frac{\sqrt{1-a-b x} \sqrt{1+a+b x}}{b^3}-\frac{(1-2 a) \int \frac{1}{\sqrt{(1-a) (1+a)-2 a b x-b^2 x^2}} \, dx}{b^2}\\ &=\frac{(1-a)^2 \sqrt{1+a+b x}}{b^3 \sqrt{1-a-b x}}+\frac{\sqrt{1-a-b x} \sqrt{1+a+b x}}{b^3}+\frac{(1-2 a) \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-\frac{x^2}{4 b^2}}} \, dx,x,-2 a b-2 b^2 x\right )}{2 b^4}\\ &=\frac{(1-a)^2 \sqrt{1+a+b x}}{b^3 \sqrt{1-a-b x}}+\frac{\sqrt{1-a-b x} \sqrt{1+a+b x}}{b^3}-\frac{(1-2 a) \sin ^{-1}(a+b x)}{b^3}\\ \end{align*}
Mathematica [A] time = 0.215419, size = 64, normalized size = 0.82 \[ -\frac{\frac{\left (a^2-3 a-b x+2\right ) \sqrt{-a^2-2 a b x-b^2 x^2+1}}{a+b x-1}-(2 a-1) \sin ^{-1}(a+b x)}{b^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.04, size = 325, normalized size = 4.2 \begin{align*} -{\frac{{x}^{2}}{b}{\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}}-4\,{\frac{ax}{{b}^{2}\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}-2\,{\frac{{a}^{2}}{{b}^{3}\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}+2\,{\frac{a}{{b}^{2}\sqrt{{b}^{2}}}\arctan \left ({\frac{\sqrt{{b}^{2}}}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}} \left ( x+{\frac{a}{b}} \right ) } \right ) }+2\,{\frac{1}{{b}^{3}\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}+{\frac{x}{{b}^{2}}{\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}}-{\frac{a}{{b}^{3}}{\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}}+{\frac{{a}^{2}x}{{b}^{2}}{\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}}+{\frac{{a}^{3}}{{b}^{3}}{\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}}-{\frac{1}{{b}^{2}}\arctan \left ({\sqrt{{b}^{2}} \left ( x+{\frac{a}{b}} \right ){\frac{1}{\sqrt{-{b}^{2}{x}^{2}-2\,xab-{a}^{2}+1}}}} \right ){\frac{1}{\sqrt{{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.81177, size = 954, normalized size = 12.23 \begin{align*} \frac{{\left (\frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{b^{5} x + a b^{4} + \sqrt{b^{2}} b^{3}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{b^{5} x + a b^{4} - \sqrt{b^{2}} b^{3}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{\sqrt{b^{2}} b^{4} x + a \sqrt{b^{2}} b^{3} + b^{4}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{\sqrt{b^{2}} b^{4} x + a \sqrt{b^{2}} b^{3} - b^{4}} + \frac{2 \, \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a \sqrt{b^{2}}}{b^{6} x + a b^{5} + \sqrt{b^{2}} b^{4}} + \frac{2 \, \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a \sqrt{b^{2}}}{b^{6} x + a b^{5} - \sqrt{b^{2}} b^{4}} - \frac{2 \, \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} + \sqrt{b^{2}} b^{3}} + \frac{2 \, \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} - \sqrt{b^{2}} b^{3}} + \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{5} x + a b^{4} + \sqrt{b^{2}} b^{3}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{5} x + a b^{4} - \sqrt{b^{2}} b^{3}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{\sqrt{b^{2}} b^{4} x + a \sqrt{b^{2}} b^{3} + b^{4}} - \frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{\sqrt{b^{2}} b^{4} x + a \sqrt{b^{2}} b^{3} - b^{4}} + \frac{4 \, a \arcsin \left (\sqrt{b^{2}} x + \frac{a \sqrt{b^{2}}}{b}\right )}{b^{4}} - \frac{2 \, \arcsin \left (\sqrt{b^{2}} x + \frac{a \sqrt{b^{2}}}{b}\right )}{b^{4}} + \frac{2 \, \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} \sqrt{b^{2}}}{b^{5}}\right )} b^{2}}{2 \, \sqrt{a^{2} b^{2} -{\left (a^{2} - 1\right )} b^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.72606, size = 273, normalized size = 3.5 \begin{align*} -\frac{{\left ({\left (2 \, a - 1\right )} b x + 2 \, a^{2} - 3 \, a + 1\right )} \arctan \left (\frac{\sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}{\left (b x + a\right )}}{b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + \sqrt{-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}{\left (a^{2} - b x - 3 \, a + 2\right )}}{b^{4} x +{\left (a - 1\right )} b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{x^{2}}{a \sqrt{- a^{2} - 2 a b x - b^{2} x^{2} + 1} + b x \sqrt{- a^{2} - 2 a b x - b^{2} x^{2} + 1} - \sqrt{- a^{2} - 2 a b x - b^{2} x^{2} + 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22262, size = 127, normalized size = 1.63 \begin{align*} -\frac{{\left (2 \, a - 1\right )} \arcsin \left (-b x - a\right ) \mathrm{sgn}\left (b\right )}{b^{2}{\left | b \right |}} + \frac{\sqrt{-{\left (b x + a\right )}^{2} + 1}}{b^{3}} + \frac{2 \,{\left (a^{2} - 2 \, a + 1\right )}}{b^{2}{\left (\frac{\sqrt{-{\left (b x + a\right )}^{2} + 1}{\left | b \right |} + b}{b^{2} x + a b} - 1\right )}{\left | b \right |}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]