Optimal. Leaf size=150 \[ -\frac {\sqrt {a+b x+1}}{\left (1-a^2\right ) x \sqrt {-a-b x+1}}-\frac {2 (2 a+1) b \tanh ^{-1}\left (\frac {\sqrt {1-a} \sqrt {a+b x+1}}{\sqrt {a+1} \sqrt {-a-b x+1}}\right )}{(1-a)^2 (a+1) \sqrt {1-a^2}}+\frac {(a+2) b \sqrt {a+b x+1}}{(1-a)^2 (a+1) \sqrt {-a-b x+1}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 150, 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, 103, 152, 12, 93, 208} \[ -\frac {\sqrt {a+b x+1}}{\left (1-a^2\right ) x \sqrt {-a-b x+1}}-\frac {2 (2 a+1) b \tanh ^{-1}\left (\frac {\sqrt {1-a} \sqrt {a+b x+1}}{\sqrt {a+1} \sqrt {-a-b x+1}}\right )}{(1-a)^2 (a+1) \sqrt {1-a^2}}+\frac {(a+2) b \sqrt {a+b x+1}}{(1-a)^2 (a+1) \sqrt {-a-b x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 93
Rule 103
Rule 152
Rule 208
Rule 6164
Rubi steps
\begin {align*} \int \frac {e^{\tanh ^{-1}(a+b x)}}{x^2 \left (1-a^2-2 a b x-b^2 x^2\right )} \, dx &=\int \frac {1}{x^2 (1-a-b x)^{3/2} \sqrt {1+a+b x}} \, dx\\ &=-\frac {\sqrt {1+a+b x}}{\left (1-a^2\right ) x \sqrt {1-a-b x}}-\frac {\int \frac {-(1+2 a) b-b^2 x}{x (1-a-b x)^{3/2} \sqrt {1+a+b x}} \, dx}{1-a^2}\\ &=\frac {(2+a) b \sqrt {1+a+b x}}{(1-a)^2 (1+a) \sqrt {1-a-b x}}-\frac {\sqrt {1+a+b x}}{\left (1-a^2\right ) x \sqrt {1-a-b x}}+\frac {\int \frac {(1+2 a) b^2}{x \sqrt {1-a-b x} \sqrt {1+a+b x}} \, dx}{(1-a)^2 (1+a) b}\\ &=\frac {(2+a) b \sqrt {1+a+b x}}{(1-a)^2 (1+a) \sqrt {1-a-b x}}-\frac {\sqrt {1+a+b x}}{\left (1-a^2\right ) x \sqrt {1-a-b x}}+\frac {((1+2 a) b) \int \frac {1}{x \sqrt {1-a-b x} \sqrt {1+a+b x}} \, dx}{(1-a)^2 (1+a)}\\ &=\frac {(2+a) b \sqrt {1+a+b x}}{(1-a)^2 (1+a) \sqrt {1-a-b x}}-\frac {\sqrt {1+a+b x}}{\left (1-a^2\right ) x \sqrt {1-a-b x}}+\frac {(2 (1+2 a) b) \operatorname {Subst}\left (\int \frac {1}{-1-a-(-1+a) x^2} \, dx,x,\frac {\sqrt {1+a+b x}}{\sqrt {1-a-b x}}\right )}{(1-a)^2 (1+a)}\\ &=\frac {(2+a) b \sqrt {1+a+b x}}{(1-a)^2 (1+a) \sqrt {1-a-b x}}-\frac {\sqrt {1+a+b x}}{\left (1-a^2\right ) x \sqrt {1-a-b x}}-\frac {2 (1+2 a) b \tanh ^{-1}\left (\frac {\sqrt {1-a} \sqrt {1+a+b x}}{\sqrt {1+a} \sqrt {1-a-b x}}\right )}{(1-a)^2 (1+a) \sqrt {1-a^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 149, normalized size = 0.99 \[ -\frac {\sqrt {-a^2-2 a b x-b^2 x^2+1} \left (\frac {b}{a+b x-1}+\frac {1}{a x+x}\right )+\frac {(2 a+1) b \log \left (\sqrt {1-a^2} \sqrt {-a^2-2 a b x-b^2 x^2+1}-a^2-a b x+1\right )}{(a+1) \sqrt {1-a^2}}-\frac {(2 a+1) b \log (x)}{(a+1) \sqrt {1-a^2}}}{(a-1)^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 459, normalized size = 3.06 \[ \left [-\frac {{\left ({\left (2 \, a + 1\right )} b^{2} x^{2} + {\left (2 \, a^{2} - a - 1\right )} b x\right )} \sqrt {-a^{2} + 1} \log \left (\frac {{\left (2 \, a^{2} - 1\right )} b^{2} x^{2} + 2 \, a^{4} + 4 \, {\left (a^{3} - a\right )} b x + 2 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a b x + a^{2} - 1\right )} \sqrt {-a^{2} + 1} - 4 \, a^{2} + 2}{x^{2}}\right ) + 2 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a^{3} + {\left (a^{3} + 2 \, a^{2} - a - 2\right )} b x - a^{2} - a + 1\right )}}{2 \, {\left ({\left (a^{5} - a^{4} - 2 \, a^{3} + 2 \, a^{2} + a - 1\right )} b x^{2} + {\left (a^{6} - 2 \, a^{5} - a^{4} + 4 \, a^{3} - a^{2} - 2 \, a + 1\right )} x\right )}}, \frac {{\left ({\left (2 \, a + 1\right )} b^{2} x^{2} + {\left (2 \, a^{2} - a - 1\right )} b x\right )} \sqrt {a^{2} - 1} \arctan \left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a b x + a^{2} - 1\right )} \sqrt {a^{2} - 1}}{{\left (a^{2} - 1\right )} b^{2} x^{2} + a^{4} + 2 \, {\left (a^{3} - a\right )} b x - 2 \, a^{2} + 1}\right ) - \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a^{3} + {\left (a^{3} + 2 \, a^{2} - a - 2\right )} b x - a^{2} - a + 1\right )}}{{\left (a^{5} - a^{4} - 2 \, a^{3} + 2 \, a^{2} + a - 1\right )} b x^{2} + {\left (a^{6} - 2 \, a^{5} - a^{4} + 4 \, a^{3} - a^{2} - 2 \, a + 1\right )} x}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 519, normalized size = 3.46 \[ \frac {2 \, {\left (2 \, a b^{2} + b^{2}\right )} \arctan \left (\frac {\frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )} a}{b^{2} x + a b} - 1}{\sqrt {a^{2} - 1}}\right )}{{\left (a^{3} {\left | b \right |} - a^{2} {\left | b \right |} - a {\left | b \right |} + {\left | b \right |}\right )} \sqrt {a^{2} - 1}} + \frac {2 \, {\left (\frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{2} a^{3} b^{2}}{{\left (b^{2} x + a b\right )}^{2}} + a^{3} b^{2} - \frac {2 \, {\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )} a^{2} b^{2}}{b^{2} x + a b} + \frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{2} a^{2} b^{2}}{{\left (b^{2} x + a b\right )}^{2}} + a^{2} b^{2} - \frac {3 \, {\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )} a b^{2}}{b^{2} x + a b} + a b^{2} - \frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )} b^{2}}{b^{2} x + a b} + \frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{2} b^{2}}{{\left (b^{2} x + a b\right )}^{2}}\right )}}{{\left (a^{4} {\left | b \right |} - a^{3} {\left | b \right |} - a^{2} {\left | b \right |} + a {\left | b \right |}\right )} {\left (\frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )} a}{b^{2} x + a b} - \frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{2} a}{{\left (b^{2} x + a b\right )}^{2}} + \frac {{\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{3} a}{{\left (b^{2} x + a b\right )}^{3}} - a + \frac {2 \, {\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}}{b^{2} x + a b} - \frac {2 \, {\left (\sqrt {-{\left (b x + a\right )}^{2} + 1} {\left | b \right |} + b\right )}^{2}}{{\left (b^{2} x + a b\right )}^{2}}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.04, size = 671, normalized size = 4.47 \[ \frac {b}{\left (-a^{2}+1\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a \,b^{2} x}{\left (-a^{2}+1\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 b \,a^{2}}{\left (-a^{2}+1\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {b \ln \left (\frac {-2 a^{2}+2-2 a b x +2 \sqrt {-a^{2}+1}\, \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{x}\right )}{\left (-a^{2}+1\right )^{\frac {3}{2}}}-\frac {1}{\left (-a^{2}+1\right ) x \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a b}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a^{2} b^{2} x}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a^{3} b}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {3 a b \ln \left (\frac {-2 a^{2}+2-2 a b x +2 \sqrt {-a^{2}+1}\, \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{x}\right )}{\left (-a^{2}+1\right )^{\frac {5}{2}}}+\frac {2 x \,b^{2}}{\left (-a^{2}+1\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {2 b a}{\left (-a^{2}+1\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {a}{\left (-a^{2}+1\right ) x \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a^{2} b}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a^{3} b^{2} x}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {3 a^{4} b}{\left (-a^{2}+1\right )^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {3 a^{2} b \ln \left (\frac {-2 a^{2}+2-2 a b x +2 \sqrt {-a^{2}+1}\, \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{x}\right )}{\left (-a^{2}+1\right )^{\frac {5}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\int \frac {b x + a + 1}{{\left (b^{2} x^{2} + 2 \, a b x + a^{2} - 1\right )} \sqrt {-{\left (b x + a\right )}^{2} + 1} x^{2}}\,{d x} \]
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 {a+b\,x+1}{x^2\,\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 {1}{a x^{2} \sqrt {- a^{2} - 2 a b x - b^{2} x^{2} + 1} + b x^{3} \sqrt {- a^{2} - 2 a b x - b^{2} x^{2} + 1} - x^{2} \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]
________________________________________________________________________________________