Optimal. Leaf size=38 \[ -\frac {(2+a x) \sqrt {1-a^2 x^2}}{2 a^2}+\frac {\text {ArcSin}(a x)}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {6259, 794, 222}
\begin {gather*} \frac {\text {ArcSin}(a x)}{2 a^2}-\frac {(a x+2) \sqrt {1-a^2 x^2}}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 222
Rule 794
Rule 6259
Rubi steps
\begin {align*} \int e^{\tanh ^{-1}(a x)} x \, dx &=\int \frac {x (1+a x)}{\sqrt {1-a^2 x^2}} \, dx\\ &=-\frac {(2+a x) \sqrt {1-a^2 x^2}}{2 a^2}+\frac {\int \frac {1}{\sqrt {1-a^2 x^2}} \, dx}{2 a}\\ &=-\frac {(2+a x) \sqrt {1-a^2 x^2}}{2 a^2}+\frac {\sin ^{-1}(a x)}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 33, normalized size = 0.87 \begin {gather*} \frac {-\left ((2+a x) \sqrt {1-a^2 x^2}\right )+\text {ArcSin}(a x)}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(69\) vs.
\(2(32)=64\).
time = 0.38, size = 70, normalized size = 1.84
method | result | size |
risch | \(\frac {\left (a x +2\right ) \left (a^{2} x^{2}-1\right )}{2 a^{2} \sqrt {-a^{2} x^{2}+1}}+\frac {\arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{2 a \sqrt {a^{2}}}\) | \(63\) |
default | \(a \left (-\frac {x \sqrt {-a^{2} x^{2}+1}}{2 a^{2}}+\frac {\arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{2 a^{2} \sqrt {a^{2}}}\right )-\frac {\sqrt {-a^{2} x^{2}+1}}{a^{2}}\) | \(70\) |
meijerg | \(-\frac {-\frac {\sqrt {\pi }\, x \left (-a^{2}\right )^{\frac {3}{2}} \sqrt {-a^{2} x^{2}+1}}{a^{2}}+\frac {\sqrt {\pi }\, \left (-a^{2}\right )^{\frac {3}{2}} \arcsin \left (a x \right )}{a^{3}}}{2 a \sqrt {\pi }\, \sqrt {-a^{2}}}-\frac {-2 \sqrt {\pi }+2 \sqrt {\pi }\, \sqrt {-a^{2} x^{2}+1}}{2 a^{2} \sqrt {\pi }}\) | \(95\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.46, size = 45, normalized size = 1.18 \begin {gather*} -\frac {\sqrt {-a^{2} x^{2} + 1} x}{2 \, a} + \frac {\arcsin \left (a x\right )}{2 \, a^{2}} - \frac {\sqrt {-a^{2} x^{2} + 1}}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 48, normalized size = 1.26 \begin {gather*} -\frac {\sqrt {-a^{2} x^{2} + 1} {\left (a x + 2\right )} + 2 \, \arctan \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{a x}\right )}{2 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 5.40, size = 110, normalized size = 2.89 \begin {gather*} a \left (\begin {cases} - \frac {i x \sqrt {a^{2} x^{2} - 1}}{2 a^{2}} - \frac {i \operatorname {acosh}{\left (a x \right )}}{2 a^{3}} & \text {for}\: \left |{a^{2} x^{2}}\right | > 1 \\\frac {x^{3}}{2 \sqrt {- a^{2} x^{2} + 1}} - \frac {x}{2 a^{2} \sqrt {- a^{2} x^{2} + 1}} + \frac {\operatorname {asin}{\left (a x \right )}}{2 a^{3}} & \text {otherwise} \end {cases}\right ) + \begin {cases} \frac {x^{2}}{2} & \text {for}\: a^{2} = 0 \\- \frac {\sqrt {- a^{2} x^{2} + 1}}{a^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 41, normalized size = 1.08 \begin {gather*} -\frac {1}{2} \, \sqrt {-a^{2} x^{2} + 1} {\left (\frac {x}{a} + \frac {2}{a^{2}}\right )} + \frac {\arcsin \left (a x\right ) \mathrm {sgn}\left (a\right )}{2 \, a {\left | a \right |}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.80, size = 58, normalized size = 1.53 \begin {gather*} \frac {\sqrt {1-a^2\,x^2}\,\left (\frac {1}{\sqrt {-a^2}}-\frac {x\,\sqrt {-a^2}}{2\,a}\right )+\frac {\mathrm {asinh}\left (x\,\sqrt {-a^2}\right )}{2\,a}}{\sqrt {-a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________