Optimal. Leaf size=41 \[ -\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6266, 6263,
272, 52, 65, 214} \begin {gather*} \frac {c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}-\frac {c \sqrt {1-a^2 x^2}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 214
Rule 272
Rule 6263
Rule 6266
Rubi steps
\begin {align*} \int e^{\tanh ^{-1}(a x)} \left (c-\frac {c}{a x}\right ) \, dx &=-\frac {c \int \frac {e^{\tanh ^{-1}(a x)} (1-a x)}{x} \, dx}{a}\\ &=-\frac {c \int \frac {\sqrt {1-a^2 x^2}}{x} \, dx}{a}\\ &=-\frac {c \text {Subst}\left (\int \frac {\sqrt {1-a^2 x}}{x} \, dx,x,x^2\right )}{2 a}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}-\frac {c \text {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,x^2\right )}{2 a}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \text {Subst}\left (\int \frac {1}{\frac {1}{a^2}-\frac {x^2}{a^2}} \, dx,x,\sqrt {1-a^2 x^2}\right )}{a^3}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 42, normalized size = 1.02 \begin {gather*} -\frac {c \left (\sqrt {1-a^2 x^2}+\log (x)-\log \left (1+\sqrt {1-a^2 x^2}\right )\right )}{a} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.46, size = 34, normalized size = 0.83
method | result | size |
default | \(\frac {c \left (-\sqrt {-a^{2} x^{2}+1}+\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )\right )}{a}\) | \(34\) |
meijerg | \(-\frac {c \left (-2 \sqrt {\pi }+2 \sqrt {\pi }\, \sqrt {-a^{2} x^{2}+1}\right )}{2 a \sqrt {\pi }}-\frac {c \left (-2 \sqrt {\pi }\, \ln \left (\frac {1}{2}+\frac {\sqrt {-a^{2} x^{2}+1}}{2}\right )+\left (-2 \ln \left (2\right )+2 \ln \left (x \right )+\ln \left (-a^{2}\right )\right ) \sqrt {\pi }\right )}{2 \sqrt {\pi }\, a}\) | \(85\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 50, normalized size = 1.22 \begin {gather*} \frac {c \log \left (\frac {2 \, \sqrt {-a^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right )}{a} - \frac {\sqrt {-a^{2} x^{2} + 1} c}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 41, normalized size = 1.00 \begin {gather*} -\frac {c \log \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{x}\right ) + \sqrt {-a^{2} x^{2} + 1} c}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs.
\(2 (31) = 62\).
time = 8.74, size = 65, normalized size = 1.59 \begin {gather*} \begin {cases} \frac {- c \sqrt {- a^{2} x^{2} + 1} - \frac {c \log {\left (-1 + \frac {1}{\sqrt {- a^{2} x^{2} + 1}} \right )}}{2} + \frac {c \log {\left (1 + \frac {1}{\sqrt {- a^{2} x^{2} + 1}} \right )}}{2}}{a} & \text {for}\: a \neq 0 \\c x + \tilde {\infty } c \log {\left (x \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 58, normalized size = 1.41 \begin {gather*} \frac {c \log \left (\sqrt {-a^{2} x^{2} + 1} + 1\right ) - c \log \left (-\sqrt {-a^{2} x^{2} + 1} + 1\right ) - 2 \, \sqrt {-a^{2} x^{2} + 1} c}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.82, size = 37, normalized size = 0.90 \begin {gather*} \frac {c\,\mathrm {atanh}\left (\sqrt {1-a^2\,x^2}\right )}{a}-\frac {c\,\sqrt {1-a^2\,x^2}}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________