\(\int x \text {arctanh}(\cosh (x)) \, dx\) [282]

Optimal result
Mathematica [A] (verified)
Rubi [C] (verified)
Maple [C] (warning: unable to verify)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 5, antiderivative size = 51 \[ \int x \text {arctanh}(\cosh (x)) \, dx=-x^2 \text {arctanh}\left (e^x\right )+\frac {1}{2} x^2 \text {arctanh}(\cosh (x))-x \operatorname {PolyLog}\left (2,-e^x\right )+x \operatorname {PolyLog}\left (2,e^x\right )+\operatorname {PolyLog}\left (3,-e^x\right )-\operatorname {PolyLog}\left (3,e^x\right ) \] Output:

-x^2*arctanh(exp(x))+1/2*x^2*arctanh(cosh(x))-x*polylog(2,-exp(x))+x*polyl 
og(2,exp(x))+polylog(3,-exp(x))-polylog(3,exp(x))
 

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.37 \[ \int x \text {arctanh}(\cosh (x)) \, dx=\frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} x^2 \log \left (1-e^x\right )-\frac {1}{2} x^2 \log \left (1+e^x\right )-x \operatorname {PolyLog}\left (2,-e^x\right )+x \operatorname {PolyLog}\left (2,e^x\right )+\operatorname {PolyLog}\left (3,-e^x\right )-\operatorname {PolyLog}\left (3,e^x\right ) \] Input:

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

Output:

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

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.42 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.35, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.600, Rules used = {6827, 25, 3042, 26, 4670, 3011, 2720, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x \text {arctanh}(\cosh (x)) \, dx\)

\(\Big \downarrow \) 6827

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))-\frac {1}{2} \int -x^2 \text {csch}(x)dx\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{2} \int x^2 \text {csch}(x)dx+\frac {1}{2} x^2 \text {arctanh}(\cosh (x))\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} \int i x^2 \csc (i x)dx\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} i \int x^2 \csc (i x)dx\)

\(\Big \downarrow \) 4670

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} i \left (2 i \int x \log \left (1-e^x\right )dx-2 i \int x \log \left (1+e^x\right )dx+2 i x^2 \text {arctanh}\left (e^x\right )\right )\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} i \left (-2 i \left (\int \operatorname {PolyLog}\left (2,-e^x\right )dx-x \operatorname {PolyLog}\left (2,-e^x\right )\right )+2 i \left (\int \operatorname {PolyLog}\left (2,e^x\right )dx-x \operatorname {PolyLog}\left (2,e^x\right )\right )+2 i x^2 \text {arctanh}\left (e^x\right )\right )\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} i \left (-2 i \left (\int e^{-x} \operatorname {PolyLog}\left (2,-e^x\right )de^x-x \operatorname {PolyLog}\left (2,-e^x\right )\right )+2 i \left (\int e^{-x} \operatorname {PolyLog}\left (2,e^x\right )de^x-x \operatorname {PolyLog}\left (2,e^x\right )\right )+2 i x^2 \text {arctanh}\left (e^x\right )\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {1}{2} x^2 \text {arctanh}(\cosh (x))+\frac {1}{2} i \left (2 i x^2 \text {arctanh}\left (e^x\right )-2 i \left (\operatorname {PolyLog}\left (3,-e^x\right )-x \operatorname {PolyLog}\left (2,-e^x\right )\right )+2 i \left (\operatorname {PolyLog}\left (3,e^x\right )-x \operatorname {PolyLog}\left (2,e^x\right )\right )\right )\)

Input:

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

Output:

(x^2*ArcTanh[Cosh[x]])/2 + (I/2)*((2*I)*x^2*ArcTanh[E^x] - (2*I)*(-(x*Poly 
Log[2, -E^x]) + PolyLog[3, -E^x]) + (2*I)*(-(x*PolyLog[2, E^x]) + PolyLog[ 
3, E^x]))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4670
Int[csc[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x 
_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^((-I)*e + f*fz*x)]/(f*fz*I)), x] 
 + (-Simp[d*(m/(f*fz*I))   Int[(c + d*x)^(m - 1)*Log[1 - E^((-I)*e + f*fz*x 
)], x], x] + Simp[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 6827
Int[((a_.) + ArcTanh[u_]*(b_.))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Si 
mp[(c + d*x)^(m + 1)*((a + b*ArcTanh[u])/(d*(m + 1))), x] - Simp[b/(d*(m + 
1))   Int[SimplifyIntegrand[(c + d*x)^(m + 1)*(D[u, x]/(1 - u^2)), x], x], 
x] /; FreeQ[{a, b, c, d, m}, x] && NeQ[m, -1] && InverseFunctionFreeQ[u, x] 
 &&  !FunctionOfQ[(c + d*x)^(m + 1), u, x] && FalseQ[PowerVariableExpn[u, m 
 + 1, x]]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.40 (sec) , antiderivative size = 400, normalized size of antiderivative = 7.84

method result size
risch \(-\frac {x^{2} \ln \left ({\mathrm e}^{x}-1\right )}{2}+\frac {i \pi \left (2 \operatorname {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}-{\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )\right )}^{2} \operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )^{2}\right )+2 \,\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )\right ) {\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )^{2}\right )}^{2}-{\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )^{2}\right )}^{3}-\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{x}\right )^{2}\right )+\operatorname {csgn}\left (i \left (1+{\mathrm e}^{x}\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{x}\right )^{2}\right )^{2}+{\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right )}^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )-2 \,\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right ) {\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )}^{2}+{\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )}^{3}+\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )-\operatorname {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}+\operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{x}\right )^{2}\right )^{2}-\operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2}-\operatorname {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{x}\right )^{2}\right )^{3}-\operatorname {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3}-2\right ) x^{2}}{8}-x \operatorname {polylog}\left (2, -{\mathrm e}^{x}\right )+\operatorname {polylog}\left (3, -{\mathrm e}^{x}\right )+\frac {x^{2} \ln \left (1-{\mathrm e}^{x}\right )}{2}+x \operatorname {polylog}\left (2, {\mathrm e}^{x}\right )-\operatorname {polylog}\left (3, {\mathrm e}^{x}\right )\) \(400\)

Input:

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

Output:

-1/2*x^2*ln(exp(x)-1)+1/8*I*Pi*(2*csgn(I*exp(-x)*(exp(x)-1)^2)^2-csgn(I*(1 
+exp(x)))^2*csgn(I*(1+exp(x))^2)+2*csgn(I*(1+exp(x)))*csgn(I*(1+exp(x))^2) 
^2-csgn(I*(1+exp(x))^2)^3-csgn(I*(1+exp(x))^2)*csgn(I*exp(-x))*csgn(I*exp( 
-x)*(1+exp(x))^2)+csgn(I*(1+exp(x))^2)*csgn(I*exp(-x)*(1+exp(x))^2)^2+csgn 
(I*(exp(x)-1))^2*csgn(I*(exp(x)-1)^2)-2*csgn(I*(exp(x)-1))*csgn(I*(exp(x)- 
1)^2)^2+csgn(I*(exp(x)-1)^2)^3+csgn(I*(exp(x)-1)^2)*csgn(I*exp(-x))*csgn(I 
*exp(-x)*(exp(x)-1)^2)-csgn(I*(exp(x)-1)^2)*csgn(I*exp(-x)*(exp(x)-1)^2)^2 
+csgn(I*exp(-x))*csgn(I*exp(-x)*(1+exp(x))^2)^2-csgn(I*exp(-x))*csgn(I*exp 
(-x)*(exp(x)-1)^2)^2-csgn(I*exp(-x)*(1+exp(x))^2)^3-csgn(I*exp(-x)*(exp(x) 
-1)^2)^3-2)*x^2-x*polylog(2,-exp(x))+polylog(3,-exp(x))+1/2*x^2*ln(1-exp(x 
))+x*polylog(2,exp(x))-polylog(3,exp(x))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 88 vs. \(2 (42) = 84\).

Time = 0.09 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.73 \[ \int x \text {arctanh}(\cosh (x)) \, dx=\frac {1}{4} \, x^{2} \log \left (-\frac {\cosh \left (x\right ) + 1}{\cosh \left (x\right ) - 1}\right ) - \frac {1}{2} \, x^{2} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + \frac {1}{2} \, x^{2} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + x {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - x {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) - {\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) + {\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) \] Input:

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

Output:

1/4*x^2*log(-(cosh(x) + 1)/(cosh(x) - 1)) - 1/2*x^2*log(cosh(x) + sinh(x) 
+ 1) + 1/2*x^2*log(-cosh(x) - sinh(x) + 1) + x*dilog(cosh(x) + sinh(x)) - 
x*dilog(-cosh(x) - sinh(x)) - polylog(3, cosh(x) + sinh(x)) + polylog(3, - 
cosh(x) - sinh(x))
 

Sympy [F]

\[ \int x \text {arctanh}(\cosh (x)) \, dx=\int x \operatorname {atanh}{\left (\cosh {\left (x \right )} \right )}\, dx \] Input:

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.10 \[ \int x \text {arctanh}(\cosh (x)) \, dx=\frac {1}{2} \, x^{2} \operatorname {artanh}\left (\cosh \left (x\right )\right ) - \frac {1}{2} \, x^{2} \log \left (e^{x} + 1\right ) + \frac {1}{2} \, x^{2} \log \left (-e^{x} + 1\right ) - x {\rm Li}_2\left (-e^{x}\right ) + x {\rm Li}_2\left (e^{x}\right ) + {\rm Li}_{3}(-e^{x}) - {\rm Li}_{3}(e^{x}) \] Input:

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

Output:

1/2*x^2*arctanh(cosh(x)) - 1/2*x^2*log(e^x + 1) + 1/2*x^2*log(-e^x + 1) - 
x*dilog(-e^x) + x*dilog(e^x) + polylog(3, -e^x) - polylog(3, e^x)
 

Giac [F]

\[ \int x \text {arctanh}(\cosh (x)) \, dx=\int { x \operatorname {artanh}\left (\cosh \left (x\right )\right ) \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int x \text {arctanh}(\cosh (x)) \, dx=\int x\,\mathrm {atanh}\left (\mathrm {cosh}\left (x\right )\right ) \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int x \text {arctanh}(\cosh (x)) \, dx=\int \mathit {atanh} \left (\cosh \left (x \right )\right ) x d x \] Input:

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

Output:

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