Optimal. Leaf size=47 \[ -2 \sqrt {c-\frac {c}{a x}}-2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {6268, 25, 528,
457, 81, 65, 214} \begin {gather*} -2 \sqrt {c-\frac {c}{a x}}-2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 25
Rule 65
Rule 81
Rule 214
Rule 457
Rule 528
Rule 6268
Rubi steps
\begin {align*} \int \frac {e^{2 \tanh ^{-1}(a x)} \sqrt {c-\frac {c}{a x}}}{x} \, dx &=\int \frac {\sqrt {c-\frac {c}{a x}} (1+a x)}{x (1-a x)} \, dx\\ &=-\frac {c \int \frac {1+a x}{\sqrt {c-\frac {c}{a x}} x^2} \, dx}{a}\\ &=-\frac {c \int \frac {a+\frac {1}{x}}{\sqrt {c-\frac {c}{a x}} x} \, dx}{a}\\ &=\frac {c \text {Subst}\left (\int \frac {a+x}{x \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )}{a}\\ &=-2 \sqrt {c-\frac {c}{a x}}+c \text {Subst}\left (\int \frac {1}{x \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )\\ &=-2 \sqrt {c-\frac {c}{a x}}-(2 a) \text {Subst}\left (\int \frac {1}{a-\frac {a x^2}{c}} \, dx,x,\sqrt {c-\frac {c}{a x}}\right )\\ &=-2 \sqrt {c-\frac {c}{a x}}-2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 47, normalized size = 1.00 \begin {gather*} -2 \sqrt {c-\frac {c}{a x}}-2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(97\) vs.
\(2(39)=78\).
time = 0.76, size = 98, normalized size = 2.09
method | result | size |
default | \(-\frac {\sqrt {\frac {c \left (a x -1\right )}{a x}}\, \left (2 \sqrt {\left (a x -1\right ) x}\, a^{\frac {3}{2}} x^{2}-2 \left (a \,x^{2}-x \right )^{\frac {3}{2}} \sqrt {a}+\ln \left (\frac {2 \sqrt {\left (a x -1\right ) x}\, \sqrt {a}+2 a x -1}{2 \sqrt {a}}\right ) a \,x^{2}\right )}{x \sqrt {\left (a x -1\right ) x}\, \sqrt {a}}\) | \(98\) |
risch | \(-2 \sqrt {\frac {c \left (a x -1\right )}{a x}}-\frac {a \ln \left (\frac {-\frac {1}{2} a c +a^{2} c x}{\sqrt {a^{2} c}}+\sqrt {a^{2} c \,x^{2}-c x a}\right ) \sqrt {\frac {c \left (a x -1\right )}{a x}}\, \sqrt {a c x \left (a x -1\right )}}{\sqrt {a^{2} c}\, \left (a x -1\right )}\) | \(99\) |
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.36, size = 111, normalized size = 2.36 \begin {gather*} \left [\sqrt {c} \log \left (-2 \, a c x + 2 \, a \sqrt {c} x \sqrt {\frac {a c x - c}{a x}} + c\right ) - 2 \, \sqrt {\frac {a c x - c}{a x}}, 2 \, \sqrt {-c} \arctan \left (\frac {\sqrt {-c} \sqrt {\frac {a c x - c}{a x}}}{c}\right ) - 2 \, \sqrt {\frac {a c x - c}{a x}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 5.86, size = 39, normalized size = 0.83 \begin {gather*} \frac {2 c \operatorname {atan}{\left (\frac {\sqrt {c - \frac {c}{a x}}}{\sqrt {- c}} \right )}}{\sqrt {- c}} - 2 \sqrt {c - \frac {c}{a x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} -\int \frac {\sqrt {c-\frac {c}{a\,x}}\,{\left (a\,x+1\right )}^2}{x\,\left (a^2\,x^2-1\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________