Optimal. Leaf size=27 \[ x \coth ^{-1}(\cosh (x))-2 x \tanh ^{-1}\left (e^x\right )-\text {PolyLog}\left (2,-e^x\right )+\text {PolyLog}\left (2,e^x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.333, Rules used = {6407, 4267,
2317, 2438} \begin {gather*} -\text {Li}_2\left (-e^x\right )+\text {Li}_2\left (e^x\right )-2 x \tanh ^{-1}\left (e^x\right )+x \coth ^{-1}(\cosh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4267
Rule 6407
Rubi steps
\begin {align*} \int \coth ^{-1}(\cosh (x)) \, dx &=x \coth ^{-1}(\cosh (x))+\int x \text {csch}(x) \, dx\\ &=x \coth ^{-1}(\cosh (x))-2 x \tanh ^{-1}\left (e^x\right )-\int \log \left (1-e^x\right ) \, dx+\int \log \left (1+e^x\right ) \, dx\\ &=x \coth ^{-1}(\cosh (x))-2 x \tanh ^{-1}\left (e^x\right )-\text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^x\right )+\text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^x\right )\\ &=x \coth ^{-1}(\cosh (x))-2 x \tanh ^{-1}\left (e^x\right )-\text {Li}_2\left (-e^x\right )+\text {Li}_2\left (e^x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 47, normalized size = 1.74 \begin {gather*} x \coth ^{-1}(\cosh (x))+x \left (\log \left (1-e^{-x}\right )-\log \left (1+e^{-x}\right )\right )+\text {PolyLog}\left (2,-e^{-x}\right )-\text {PolyLog}\left (2,e^{-x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 21, normalized size = 0.78
method | result | size |
default | \(x \,\mathrm {arccoth}\left (\cosh \left (x \right )\right )+2 \dilog \left ({\mathrm e}^{-x}\right )-\frac {\dilog \left ({\mathrm e}^{-2 x}\right )}{2}\) | \(21\) |
risch | \(-\frac {i x \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3}}{4}+\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )}{4}-\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )}{4}-\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3}}{4}-\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}}{2}-\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}}{4}-\dilog \left ({\mathrm e}^{x}\right )-\dilog \left ({\mathrm e}^{x}+1\right )-\ln \left ({\mathrm e}^{x}-1\right ) \ln \left ({\mathrm e}^{x}\right )+\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )}{4}+\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3}}{4}+\frac {i x \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2}}{4}-\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )}{4}-\frac {i x \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}}{4}+\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2}}{4}+\frac {i x \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3}}{4}\) | \(394\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 33, normalized size = 1.22 \begin {gather*} x \operatorname {arcoth}\left (\cosh \left (x\right )\right ) - x \log \left (e^{x} + 1\right ) + x \log \left (-e^{x} + 1\right ) - {\rm Li}_2\left (-e^{x}\right ) + {\rm Li}_2\left (e^{x}\right ) \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. 57 vs.
\(2 (22) = 44\).
time = 0.34, size = 57, normalized size = 2.11 \begin {gather*} \frac {1}{2} \, x \log \left (\frac {\cosh \left (x\right ) + 1}{\cosh \left (x\right ) - 1}\right ) - x \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + x \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\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 \operatorname {acoth}{\left (\cosh {\left (x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \mathrm {acoth}\left (\mathrm {cosh}\left (x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________