Optimal. Leaf size=21 \[ \tanh ^{-1}\left (\sqrt {1+\coth (x)}\right )+\sqrt {1+\coth (x)} \tanh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3597, 43, 65,
213} \begin {gather*} \tanh ^{-1}\left (\sqrt {\coth (x)+1}\right )+\tanh (x) \sqrt {\coth (x)+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 65
Rule 213
Rule 3597
Rubi steps
\begin {align*} \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx &=-\text {Subst}\left (\int \frac {\sqrt {1+x}}{x^2} \, dx,x,\coth (x)\right )\\ &=\sqrt {1+\coth (x)} \tanh (x)-\frac {1}{2} \text {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\coth (x)\right )\\ &=\sqrt {1+\coth (x)} \tanh (x)-\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\coth (x)}\right )\\ &=\tanh ^{-1}\left (\sqrt {1+\coth (x)}\right )+\sqrt {1+\coth (x)} \tanh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 13.80, size = 133, normalized size = 6.33 \begin {gather*} \frac {1}{2} \sqrt {1+\coth (x)} \left (\frac {(1-i) \text {ArcTan}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {i (1+\coth (x))}\right )}{\sqrt {i (1+\coth (x))}}+\frac {2 \left (2 \tanh ^{-1}\left (\sqrt {\tanh \left (\frac {x}{2}\right )}\right )-\sqrt {2} \tanh ^{-1}\left (\frac {1+\tanh \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {\tanh \left (\frac {x}{2}\right )}}\right )\right ) \sinh \left (\frac {x}{2}\right ) \left (-\cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right )\right )}{\sqrt {\tanh \left (\frac {x}{2}\right )}}+2 \tanh (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 2.09, size = 0, normalized size = 0.00 \[\int \mathrm {sech}\left (x \right )^{2} \sqrt {1+\coth \left (x \right )}\, dx\]
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. 231 vs.
\(2 (17) = 34\).
time = 0.39, size = 231, normalized size = 11.00 \begin {gather*} \frac {4 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} + {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (\frac {2 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} + 3 \, \cosh \left (x\right )^{2} + 6 \, \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, \sinh \left (x\right )^{2} - 1}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right ) - {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (-\frac {2 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} - 3 \, \cosh \left (x\right )^{2} - 6 \, \cosh \left (x\right ) \sinh \left (x\right ) - 3 \, \sinh \left (x\right )^{2} + 1}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right )}{4 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\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 \sqrt {\coth {\left (x \right )} + 1} \operatorname {sech}^{2}{\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. 122 vs.
\(2 (17) = 34\).
time = 0.41, size = 122, normalized size = 5.81 \begin {gather*} -\frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} \log \left (\frac {{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} - 2 \, \sqrt {2} + 3}{{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 2 \, \sqrt {2} + 3}\right ) - \frac {8 \, {\left (3 \, {\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 1\right )}}{{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{4} + 6 \, {\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 1}\right )} \mathrm {sgn}\left (e^{\left (2 \, 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.05 \begin {gather*} \int \frac {\sqrt {\mathrm {coth}\left (x\right )+1}}{{\mathrm {cosh}\left (x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________