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.22, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {6302, 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
Rule 6302
Rubi steps
\begin {align*} \int \frac {e^{2 \coth ^{-1}(a x)} \sqrt {c-\frac {c}{a x}}}{x} \, dx &=-\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.02, 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. \(98\) vs.
\(2(39)=78\).
time = 0.13, size = 99, normalized size = 2.11
method | result | size |
risch | \(2 \sqrt {\frac {c \left (a x -1\right )}{a x}}+\frac {a \ln \left (\frac {-\frac {1}{2} a c +c \,a^{2} x}{\sqrt {a^{2} c}}+\sqrt {a^{2} c \,x^{2}-a c x}\right ) \sqrt {\frac {c \left (a x -1\right )}{a x}}\, \sqrt {c \left (a x -1\right ) a x}}{\sqrt {a^{2} c}\, \left (a x -1\right )}\) | \(98\) |
default | \(-\frac {\sqrt {\frac {c \left (a x -1\right )}{a x}}\, \left (-2 a^{\frac {3}{2}} \sqrt {\left (a x -1\right ) x}\, 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}}\) | \(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.37, 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 = 6.09, 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 )}{x\,\left (a\,x-1\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________