3.3.81 \(\int \tanh ^{-1}(\cosh (x)) \, dx\) [281]

Optimal. Leaf size=27 \[ -2 x \tanh ^{-1}\left (e^x\right )+x \tanh ^{-1}(\cosh (x))-\text {PolyLog}\left (2,-e^x\right )+\text {PolyLog}\left (2,e^x\right ) \]

[Out]

-2*x*arctanh(exp(x))+x*arctanh(cosh(x))-polylog(2,-exp(x))+polylog(2,exp(x))

________________________________________________________________________________________

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 = {6406, 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 \tanh ^{-1}(\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcTanh[Cosh[x]],x]

[Out]

-2*x*ArcTanh[E^x] + x*ArcTanh[Cosh[x]] - PolyLog[2, -E^x] + PolyLog[2, E^x]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4267

Int[csc[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(Ar
cTanh[E^((-I)*e + f*fz*x)]/(f*fz*I)), x] + (-Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 - E^((-I)*e + f*
fz*x)], x], x] + Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 + E^((-I)*e + f*fz*x)], x], x]) /; FreeQ[{c,
 d, e, f, fz}, x] && IGtQ[m, 0]

Rule 6406

Int[ArcTanh[u_], x_Symbol] :> Simp[x*ArcTanh[u], x] - Int[SimplifyIntegrand[x*(D[u, x]/(1 - u^2)), x], x] /; I
nverseFunctionFreeQ[u, x]

Rubi steps

\begin {align*} \int \tanh ^{-1}(\cosh (x)) \, dx &=x \tanh ^{-1}(\cosh (x))+\int x \text {csch}(x) \, dx\\ &=-2 x \tanh ^{-1}\left (e^x\right )+x \tanh ^{-1}(\cosh (x))-\int \log \left (1-e^x\right ) \, dx+\int \log \left (1+e^x\right ) \, dx\\ &=-2 x \tanh ^{-1}\left (e^x\right )+x \tanh ^{-1}(\cosh (x))-\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 )\\ &=-2 x \tanh ^{-1}\left (e^x\right )+x \tanh ^{-1}(\cosh (x))-\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 \tanh ^{-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]

Integrate[ArcTanh[Cosh[x]],x]

[Out]

x*ArcTanh[Cosh[x]] + x*(Log[1 - E^(-x)] - Log[1 + E^(-x)]) + PolyLog[2, -E^(-x)] - PolyLog[2, E^(-x)]

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 21, normalized size = 0.78

method result size
default \(x \arctanh \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 )^{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 ) \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 )^{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}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )}{4}-\frac {i \pi x}{2}+\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 )^{3}}{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 )^{3}}{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}+\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 ) \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 {\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 )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}}{2}\) \(420\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctanh(cosh(x)),x,method=_RETURNVERBOSE)

[Out]

x*arctanh(cosh(x))+2*dilog(exp(-x))-1/2*dilog(exp(-2*x))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 33, normalized size = 1.22 \begin {gather*} x \operatorname {artanh}\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]

integrate(arctanh(cosh(x)),x, algorithm="maxima")

[Out]

x*arctanh(cosh(x)) - x*log(e^x + 1) + x*log(-e^x + 1) - dilog(-e^x) + dilog(e^x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (22) = 44\).
time = 0.45, size = 58, normalized size = 2.15 \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]

integrate(arctanh(cosh(x)),x, algorithm="fricas")

[Out]

1/2*x*log(-(cosh(x) + 1)/(cosh(x) - 1)) - x*log(cosh(x) + sinh(x) + 1) + x*log(-cosh(x) - sinh(x) + 1) + dilog
(cosh(x) + sinh(x)) - dilog(-cosh(x) - sinh(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \operatorname {atanh}{\left (\cosh {\left (x \right )} \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atanh(cosh(x)),x)

[Out]

Integral(atanh(cosh(x)), x)

________________________________________________________________________________________

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]

integrate(arctanh(cosh(x)),x, algorithm="giac")

[Out]

integrate(arctanh(cosh(x)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \mathrm {atanh}\left (\mathrm {cosh}\left (x\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atanh(cosh(x)),x)

[Out]

int(atanh(cosh(x)), x)

________________________________________________________________________________________