Optimal. Leaf size=57 \[ -x-\frac {4}{a \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )}+\frac {4 \text {ArcTan}\left (\sqrt {\frac {1-a x}{1+a x}}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {6467, 1661, 12,
815, 209} \begin {gather*} \frac {4 \text {ArcTan}\left (\sqrt {\frac {1-a x}{a x+1}}\right )}{a}-\frac {4}{a \left (1-\sqrt {\frac {1-a x}{a x+1}}\right )}-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 815
Rule 1661
Rule 6467
Rubi steps
\begin {align*} \int e^{2 \text {sech}^{-1}(a x)} \, dx &=\int \left (\frac {1}{a x}+\sqrt {\frac {1-a x}{1+a x}}+\frac {\sqrt {\frac {1-a x}{1+a x}}}{a x}\right )^2 \, dx\\ &=-\frac {4 \text {Subst}\left (\int \frac {x (1+x)^2}{(-1+x)^2 \left (1+x^2\right )^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ &=-x+\frac {2 \text {Subst}\left (\int -\frac {4 x}{(-1+x)^2 \left (1+x^2\right )} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ &=-x-\frac {8 \text {Subst}\left (\int \frac {x}{(-1+x)^2 \left (1+x^2\right )} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ &=-x-\frac {8 \text {Subst}\left (\int \left (\frac {1}{2 (-1+x)^2}-\frac {1}{2 \left (1+x^2\right )}\right ) \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ &=-x-\frac {4}{a \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )}+\frac {4 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ &=-x-\frac {4}{a \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )}+\frac {4 \tan ^{-1}\left (\sqrt {\frac {1-a x}{1+a x}}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 75, normalized size = 1.32 \begin {gather*} -\frac {2+a^2 x^2+2 \sqrt {\frac {1-a x}{1+a x}} (1+a x)+2 a x \text {ArcTan}\left (\frac {a x}{\sqrt {\frac {1-a x}{1+a x}} (1+a x)}\right )}{a^2 x} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.04, size = 111, normalized size = 1.95
method | result | size |
default | \(\frac {-a^{2} x -\frac {1}{x}}{a^{2}}-\frac {2 \sqrt {\frac {a x +1}{a x}}\, \sqrt {-\frac {a x -1}{a x}}\, \left (\arctan \left (\frac {\mathrm {csgn}\left (a \right ) a x}{\sqrt {-a^{2} x^{2}+1}}\right ) a x +\mathrm {csgn}\left (a \right ) \sqrt {-a^{2} x^{2}+1}\right ) \mathrm {csgn}\left (a \right )}{a \sqrt {-a^{2} x^{2}+1}}-\frac {1}{a^{2} x}\) | \(111\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.48, size = 85, normalized size = 1.49 \begin {gather*} -\frac {a^{2} x^{2} + 2 \, a x \sqrt {\frac {a x + 1}{a x}} \sqrt {-\frac {a x - 1}{a x}} - 2 \, a x \arctan \left (\sqrt {\frac {a x + 1}{a x}} \sqrt {-\frac {a x - 1}{a x}}\right ) + 2}{a^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \left (- a^{2}\right )\, dx + \int \frac {2}{x^{2}}\, dx + \int \frac {2 a \sqrt {-1 + \frac {1}{a x}} \sqrt {1 + \frac {1}{a x}}}{x}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.64, size = 162, normalized size = 2.84 \begin {gather*} -x-\frac {\left (\ln \left (\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}+1\right )-\ln \left (\frac {\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}}{\sqrt {\frac {1}{a\,x}+1}-1}\right )\right )\,2{}\mathrm {i}}{a}-\frac {2}{a^2\,x}+\frac {{\left (1+\sqrt {-\frac {a-\frac {1}{x}}{a}}\,1{}\mathrm {i}\right )}^2\,{\left (\sqrt {\frac {a+\frac {1}{x}}{a}}-1\right )}^2\,4{}\mathrm {i}}{a\,{\left (\sqrt {\frac {a+\frac {1}{x}}{a}}\,1{}\mathrm {i}+\sqrt {-\frac {a-\frac {1}{x}}{a}}-2{}\mathrm {i}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________