Optimal. Leaf size=93 \[ -\sqrt {c-\frac {c}{a x}} x+\frac {5 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )}{a}-\frac {4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6268, 25, 528,
382, 100, 162, 65, 214} \begin {gather*} x \left (-\sqrt {c-\frac {c}{a x}}\right )+\frac {5 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )}{a}-\frac {4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 25
Rule 65
Rule 100
Rule 162
Rule 214
Rule 382
Rule 528
Rule 6268
Rubi steps
\begin {align*} \int e^{-2 \tanh ^{-1}(a x)} \sqrt {c-\frac {c}{a x}} \, dx &=\int \frac {\sqrt {c-\frac {c}{a x}} (1-a x)}{1+a x} \, dx\\ &=-\frac {a \int \frac {\left (c-\frac {c}{a x}\right )^{3/2} x}{1+a x} \, dx}{c}\\ &=-\frac {a \int \frac {\left (c-\frac {c}{a x}\right )^{3/2}}{a+\frac {1}{x}} \, dx}{c}\\ &=\frac {a \text {Subst}\left (\int \frac {\left (c-\frac {c x}{a}\right )^{3/2}}{x^2 (a+x)} \, dx,x,\frac {1}{x}\right )}{c}\\ &=-\sqrt {c-\frac {c}{a x}} x-\frac {\text {Subst}\left (\int \frac {\frac {5 c^2}{2}-\frac {3 c^2 x}{2 a}}{x (a+x) \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )}{c}\\ &=-\sqrt {c-\frac {c}{a x}} x-\frac {(5 c) \text {Subst}\left (\int \frac {1}{x \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )}{2 a}+\frac {(4 c) \text {Subst}\left (\int \frac {1}{(a+x) \sqrt {c-\frac {c x}{a}}} \, dx,x,\frac {1}{x}\right )}{a}\\ &=-\sqrt {c-\frac {c}{a x}} x+5 \text {Subst}\left (\int \frac {1}{a-\frac {a x^2}{c}} \, dx,x,\sqrt {c-\frac {c}{a x}}\right )-8 \text {Subst}\left (\int \frac {1}{2 a-\frac {a x^2}{c}} \, dx,x,\sqrt {c-\frac {c}{a x}}\right )\\ &=-\sqrt {c-\frac {c}{a x}} x+\frac {5 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )}{a}-\frac {4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 93, normalized size = 1.00 \begin {gather*} -\sqrt {c-\frac {c}{a x}} x+\frac {5 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {c}}\right )}{a}-\frac {4 \sqrt {2} \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c-\frac {c}{a x}}}{\sqrt {2} \sqrt {c}}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(188\) vs.
\(2(76)=152\).
time = 0.00, size = 189, normalized size = 2.03
method | result | size |
risch | \(-x \sqrt {\frac {c \left (a x -1\right )}{a x}}-\frac {\left (-\frac {5 \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 )}{2 \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 )}{a \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}\) | \(170\) |
default | \(-\frac {\sqrt {\frac {c \left (a x -1\right )}{a x}}\, x \left (4 \sqrt {\left (a x -1\right ) x}\, a^{\frac {3}{2}} \sqrt {\frac {1}{a}}-2 \sqrt {a \,x^{2}-x}\, a^{\frac {3}{2}} \sqrt {\frac {1}{a}}-4 \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 ) \sqrt {a}+\ln \left (\frac {2 \sqrt {a \,x^{2}-x}\, \sqrt {a}+2 a x -1}{2 \sqrt {a}}\right ) a \sqrt {\frac {1}{a}}-6 \ln \left (\frac {2 \sqrt {\left (a x -1\right ) x}\, \sqrt {a}+2 a x -1}{2 \sqrt {a}}\right ) a \sqrt {\frac {1}{a}}\right )}{2 \sqrt {\left (a x -1\right ) x}\, a^{\frac {3}{2}} \sqrt {\frac {1}{a}}}\) | \(189\) |
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.35, size = 217, normalized size = 2.33 \begin {gather*} \left [-\frac {2 \, a x \sqrt {\frac {a c x - c}{a x}} - 4 \, \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 ) - 5 \, \sqrt {c} \log \left (-2 \, a c x - 2 \, a \sqrt {c} x \sqrt {\frac {a c x - c}{a x}} + c\right )}{2 \, a}, -\frac {a x \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 ) + 5 \, \sqrt {-c} \arctan \left (\frac {\sqrt {-c} \sqrt {\frac {a c x - c}{a x}}}{c}\right )}{a}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \left (- \frac {\sqrt {c - \frac {c}{a x}}}{a x + 1}\right )\, dx - \int \frac {a x \sqrt {c - \frac {c}{a x}}}{a x + 1}\, dx \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 )}{{\left (a\,x+1\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________