Optimal. Leaf size=94 \[ \frac {(1+a x)^2 \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )^2}{4 a^2}+\frac {(1+a x) \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )}{2 a^2}+\frac {\text {ArcTan}\left (\sqrt {\frac {1-a x}{1+a x}}\right )}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6472, 833, 653,
209} \begin {gather*} \frac {\text {ArcTan}\left (\sqrt {\frac {1-a x}{a x+1}}\right )}{a^2}+\frac {(a x+1)^2 \left (1-\sqrt {\frac {1-a x}{a x+1}}\right )^2}{4 a^2}+\frac {(a x+1) \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 653
Rule 833
Rule 6472
Rubi steps
\begin {align*} \int e^{-\text {sech}^{-1}(a x)} x \, dx &=\int \frac {x}{\frac {1}{a x}+\sqrt {\frac {1-a x}{1+a x}}+\frac {\sqrt {\frac {1-a x}{1+a x}}}{a x}} \, dx\\ &=-\frac {4 \text {Subst}\left (\int \frac {(-1+x)^2 x}{\left (1+x^2\right )^3} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^2}\\ &=\frac {(1+a x)^2 \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )^2}{4 a^2}-\frac {\text {Subst}\left (\int \frac {-2+2 x}{\left (1+x^2\right )^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^2}\\ &=\frac {(1+a x)^2 \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )^2}{4 a^2}+\frac {(1+a x) \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )}{2 a^2}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^2}\\ &=\frac {(1+a x)^2 \left (1-\sqrt {\frac {1-a x}{1+a x}}\right )^2}{4 a^2}+\frac {(1+a x) \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )}{2 a^2}+\frac {\tan ^{-1}\left (\sqrt {\frac {1-a x}{1+a x}}\right )}{a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.05, size = 75, normalized size = 0.80 \begin {gather*} -\frac {-2 a x+a x \sqrt {\frac {1-a x}{1+a x}} (1+a x)+i \log \left (-2 i a x+2 \sqrt {\frac {1-a x}{1+a x}} (1+a x)\right )}{2 a^2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \frac {x}{\frac {1}{a x}+\sqrt {\frac {1}{a x}-1}\, \sqrt {1+\frac {1}{a x}}}\, dx\]
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.37, size = 79, normalized size = 0.84 \begin {gather*} -\frac {a^{2} x^{2} \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}} \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*} a \int \frac {x^{2}}{a x \sqrt {-1 + \frac {1}{a x}} \sqrt {1 + \frac {1}{a x}} + 1}\, dx \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 = 9.22, size = 407, normalized size = 4.33 \begin {gather*} \frac {x}{a}-\frac {\ln \left (\frac {\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}}{\sqrt {\frac {1}{a\,x}+1}-1}\right )\,1{}\mathrm {i}}{2\,a^2}-\frac {\frac {1{}\mathrm {i}}{32\,a^2}+\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{16\,a^2\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}-\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^4\,15{}\mathrm {i}}{32\,a^2\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^4}}{\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}+\frac {2\,{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^4}+\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^6}}-\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 )\,1{}\mathrm {i}}{a^2}+\frac {\ln \left (\frac {2\,a\,\sqrt {\frac {a+\frac {1}{x}}{a}}-\frac {2}{x}+a\,\sqrt {-\frac {a-\frac {1}{x}}{a}}\,2{}\mathrm {i}}{2\,a+\frac {1}{x}-2\,a\,\sqrt {\frac {a+\frac {1}{x}}{a}}}\right )\,1{}\mathrm {i}}{2\,a^2}-\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{32\,a^2\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________