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.14, antiderivative size = 78, normalized size of antiderivative = 1.00, 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 53
Rule 80
Rule 89
Rule 216
Rule 619
Rule 6164
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.21, 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]
________________________________________________________________________________________
fricas [A] time = 0.83, size = 120, normalized size = 1.54 \[ -\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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 94, normalized size = 1.21 \[ -\frac {{\left (2 \, a - 1\right )} \arcsin \left (-b x - a\right ) \mathrm {sgn}\relax (b)}{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 |}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.04, size = 325, normalized size = 4.17 \[ -\frac {x^{2}}{b \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {4 a x}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {2 a^{2}}{b^{3} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {2 a \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b^{2} \sqrt {b^{2}}}+\frac {2}{b^{3} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {x}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {a}{b^{3} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {a^{2} x}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {a^{3}}{b^{3} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {\arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b^{2} \sqrt {b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.52, size = 329, normalized size = 4.22 \[ -\frac {{\left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{b^{5} x + a b^{4} - b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a b}{b^{6} x + a b^{5} + b^{5}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a b}{b^{6} x + a b^{5} - b^{5}} + \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} + b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} - b^{4}} + \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{5} x + a b^{4} - b^{4}} - \frac {2 \, a \arcsin \left (b x + a\right )}{b^{4}} + \frac {\arcsin \left (b x + a\right )}{b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{4}}\right )} b^{2}}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ -\int \frac {x^2\,\left (a+b\,x+1\right )}{\sqrt {1-{\left (a+b\,x\right )}^2}\,\left (a^2+2\,a\,b\,x+b^2\,x^2-1\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \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 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________