Optimal. Leaf size=86 \[ -2 \sqrt {c-\frac {c}{a x}}-2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )+4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {6268, 25, 445,
457, 86, 162, 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 )+4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 25
Rule 65
Rule 86
Rule 162
Rule 214
Rule 445
Rule 457
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 {a \int \frac {\left (c-\frac {c}{a x}\right )^{3/2}}{1+a x} \, dx}{c}\\ &=-\frac {a \int \frac {\left (c-\frac {c}{a x}\right )^{3/2}}{\left (a+\frac {1}{x}\right ) x} \, dx}{c}\\ &=\frac {a \text {Subst}\left (\int \frac {\left (c-\frac {c x}{a}\right )^{3/2}}{x (a+x)} \, dx,x,\frac {1}{x}\right )}{c}\\ &=-2 \sqrt {c-\frac {c}{a x}}+\frac {a \text {Subst}\left (\int \frac {c^2-\frac {3 c^2 x}{a}}{x (a+x) \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )}{c}\\ &=-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 )-(4 c) \text {Subst}\left (\int \frac {1}{(a+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 )+(8 a) \text {Subst}\left (\int \frac {1}{2 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 )+4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 86, 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 )+4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \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. \(226\) vs.
\(2(69)=138\).
time = 0.40, size = 227, normalized size = 2.64
method | result | size |
risch | \(-2 \sqrt {\frac {c \left (a x -1\right )}{a x}}-\frac {\left (\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 {a^{2} c}}+\frac {2 \sqrt {2}\, \ln \left (\frac {4 c -3 \left (x +\frac {1}{a}\right ) a c +2 \sqrt {2}\, \sqrt {c}\, \sqrt {a^{2} c \left (x +\frac {1}{a}\right )^{2}-3 \left (x +\frac {1}{a}\right ) a c +2 c}}{x +\frac {1}{a}}\right )}{\sqrt {c}}\right ) \sqrt {\frac {c \left (a x -1\right )}{a x}}\, \sqrt {a c x \left (a x -1\right )}}{a x -1}\) | \(166\) |
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}\, \sqrt {\frac {1}{a}}\, x^{2}-4 a^{\frac {3}{2}} \sqrt {a \,x^{2}-x}\, \sqrt {\frac {1}{a}}\, x^{2}-2 \sqrt {a}\, \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {\frac {1}{a}}\, \sqrt {\left (a x -1\right ) x}\, a -3 a x +1}{a x +1}\right ) x^{2}+2 \left (a \,x^{2}-x \right )^{\frac {3}{2}} \sqrt {a}\, \sqrt {\frac {1}{a}}+2 \ln \left (\frac {2 \sqrt {a \,x^{2}-x}\, \sqrt {a}+2 a x -1}{2 \sqrt {a}}\right ) \sqrt {\frac {1}{a}}\, a \,x^{2}-3 \ln \left (\frac {2 \sqrt {\left (a x -1\right ) x}\, \sqrt {a}+2 a x -1}{2 \sqrt {a}}\right ) \sqrt {\frac {1}{a}}\, a \,x^{2}\right )}{x \sqrt {a}\, \sqrt {\left (a x -1\right ) x}\, \sqrt {\frac {1}{a}}}\) | \(227\) |
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.41, size = 206, normalized size = 2.40 \begin {gather*} \left [2 \, \sqrt {2} \sqrt {c} \log \left (-\frac {2 \, \sqrt {2} a \sqrt {c} x \sqrt {\frac {a c x - c}{a x}} + 3 \, a c x - c}{a x + 1}\right ) + \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}}, -4 \, \sqrt {2} \sqrt {-c} \arctan \left (\frac {\sqrt {2} \sqrt {-c} \sqrt {\frac {a c x - c}{a x}}}{2 \, c}\right ) + 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 = 7.30, size = 80, normalized size = 0.93 \begin {gather*} \frac {2 c \operatorname {atan}{\left (\frac {\sqrt {c - \frac {c}{a x}}}{\sqrt {- c}} \right )}}{\sqrt {- c}} - \frac {4 \sqrt {2} c \operatorname {atan}{\left (\frac {\sqrt {2} \sqrt {c - \frac {c}{a x}}}{2 \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.01 \begin {gather*} -\int \frac {\sqrt {c-\frac {c}{a\,x}}\,\left (a^2\,x^2-1\right )}{x\,{\left (a\,x+1\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________