Optimal. Leaf size=64 \[ -\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}-\frac {\text {ArcTan}\left (\sqrt {\tanh (x)}\right ) \tanh ^{\frac {3}{2}}(x)}{\sqrt {a \tanh ^3(x)}}+\frac {\tanh ^{-1}\left (\sqrt {\tanh (x)}\right ) \tanh ^{\frac {3}{2}}(x)}{\sqrt {a \tanh ^3(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {3739, 3555,
3557, 335, 304, 209, 212} \begin {gather*} -\frac {\tanh ^{\frac {3}{2}}(x) \text {ArcTan}\left (\sqrt {\tanh (x)}\right )}{\sqrt {a \tanh ^3(x)}}-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}+\frac {\tanh ^{-1}\left (\sqrt {\tanh (x)}\right ) \tanh ^{\frac {3}{2}}(x)}{\sqrt {a \tanh ^3(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 304
Rule 335
Rule 3555
Rule 3557
Rule 3739
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a \tanh ^3(x)}} \, dx &=\frac {\tanh ^{\frac {3}{2}}(x) \int \frac {1}{\tanh ^{\frac {3}{2}}(x)} \, dx}{\sqrt {a \tanh ^3(x)}}\\ &=-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}+\frac {\tanh ^{\frac {3}{2}}(x) \int \sqrt {\tanh (x)} \, dx}{\sqrt {a \tanh ^3(x)}}\\ &=-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}-\frac {\tanh ^{\frac {3}{2}}(x) \text {Subst}\left (\int \frac {\sqrt {x}}{-1+x^2} \, dx,x,\tanh (x)\right )}{\sqrt {a \tanh ^3(x)}}\\ &=-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}-\frac {\left (2 \tanh ^{\frac {3}{2}}(x)\right ) \text {Subst}\left (\int \frac {x^2}{-1+x^4} \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {a \tanh ^3(x)}}\\ &=-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}+\frac {\tanh ^{\frac {3}{2}}(x) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {a \tanh ^3(x)}}-\frac {\tanh ^{\frac {3}{2}}(x) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {a \tanh ^3(x)}}\\ &=-\frac {2 \tanh (x)}{\sqrt {a \tanh ^3(x)}}-\frac {\tan ^{-1}\left (\sqrt {\tanh (x)}\right ) \tanh ^{\frac {3}{2}}(x)}{\sqrt {a \tanh ^3(x)}}+\frac {\tanh ^{-1}\left (\sqrt {\tanh (x)}\right ) \tanh ^{\frac {3}{2}}(x)}{\sqrt {a \tanh ^3(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.01, size = 26, normalized size = 0.41 \begin {gather*} -\frac {2 \, _2F_1\left (-\frac {1}{4},1;\frac {3}{4};\tanh ^2(x)\right ) \tanh (x)}{\sqrt {a \tanh ^3(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.14, size = 65, normalized size = 1.02
method | result | size |
derivativedivides | \(-\frac {\tanh \left (x \right ) \left (2 a^{\frac {5}{2}}+\arctan \left (\frac {\sqrt {a \tanh \left (x \right )}}{\sqrt {a}}\right ) a^{2} \sqrt {a \tanh \left (x \right )}-\arctanh \left (\frac {\sqrt {a \tanh \left (x \right )}}{\sqrt {a}}\right ) a^{2} \sqrt {a \tanh \left (x \right )}\right )}{\sqrt {a \left (\tanh ^{3}\left (x \right )\right )}\, a^{\frac {5}{2}}}\) | \(65\) |
default | \(-\frac {\tanh \left (x \right ) \left (2 a^{\frac {5}{2}}+\arctan \left (\frac {\sqrt {a \tanh \left (x \right )}}{\sqrt {a}}\right ) a^{2} \sqrt {a \tanh \left (x \right )}-\arctanh \left (\frac {\sqrt {a \tanh \left (x \right )}}{\sqrt {a}}\right ) a^{2} \sqrt {a \tanh \left (x \right )}\right )}{\sqrt {a \left (\tanh ^{3}\left (x \right )\right )}\, a^{\frac {5}{2}}}\) | \(65\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 239 vs.
\(2 (50) = 100\).
time = 0.45, size = 516, normalized size = 8.06 \begin {gather*} \left [-\frac {2 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \sqrt {-a} \arctan \left (\frac {{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )} \sqrt {-a} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}}}{a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2} - a}\right ) + {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \sqrt {-a} \log \left (-\frac {a \cosh \left (x\right )^{4} + 4 \, a \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, a \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, a \cosh \left (x\right ) \sinh \left (x\right )^{3} + a \sinh \left (x\right )^{4} + 2 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \sqrt {-a} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}} - 2 \, a}{\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4}}\right ) + 8 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}}}{4 \, {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2} - a\right )}}, -\frac {2 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \sqrt {a} \arctan \left (\frac {{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}}}{\sqrt {a}}\right ) - {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \sqrt {a} \log \left (2 \, a \cosh \left (x\right )^{4} + 8 \, a \cosh \left (x\right )^{3} \sinh \left (x\right ) + 12 \, a \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 8 \, a \cosh \left (x\right ) \sinh \left (x\right )^{3} + 2 \, a \sinh \left (x\right )^{4} + 2 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + 2 \, {\left (2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \sqrt {a} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}} - a\right ) + 8 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \sqrt {\frac {a \sinh \left (x\right )}{\cosh \left (x\right )}}}{4 \, {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2} - a\right )}}\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 \frac {1}{\sqrt {a \tanh ^{3}{\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs.
\(2 (50) = 100\).
time = 0.43, size = 123, normalized size = 1.92 \begin {gather*} -\frac {\arctan \left (-\frac {\sqrt {a} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} - a}}{\sqrt {a}}\right )}{\sqrt {a} \mathrm {sgn}\left (e^{\left (4 \, x\right )} - 1\right )} - \frac {\log \left ({\left | -\sqrt {a} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} - a} \right |}\right )}{2 \, \sqrt {a} \mathrm {sgn}\left (e^{\left (4 \, x\right )} - 1\right )} + \frac {4}{{\left (\sqrt {a} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} - a} - \sqrt {a}\right )} \mathrm {sgn}\left (e^{\left (4 \, x\right )} - 1\right )} \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 {1}{\sqrt {a\,{\mathrm {tanh}\left (x\right )}^3}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________