3.283 \(\int x^2 \tanh ^{-1}(\cosh (x)) \, dx\)

Optimal. Leaf size=77 \[ -x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \text {Li}_4\left (-e^x\right )+2 \text {Li}_4\left (e^x\right )-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x)) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {6273, 4182, 2531, 6609, 2282, 6589} \[ -x^2 \text {PolyLog}\left (2,-e^x\right )+x^2 \text {PolyLog}\left (2,e^x\right )+2 x \text {PolyLog}\left (3,-e^x\right )-2 x \text {PolyLog}\left (3,e^x\right )-2 \text {PolyLog}\left (4,-e^x\right )+2 \text {PolyLog}\left (4,e^x\right )-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{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 2531

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] + Dist[(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 4182

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 6273

Int[((a_.) + ArcTanh[u_]*(b_.))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m + 1)*(a + b*ArcTan
h[u]))/(d*(m + 1)), x] - Dist[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 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> 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]

Rule 6609

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

Rubi steps

\begin {align*} \int x^2 \tanh ^{-1}(\cosh (x)) \, dx &=\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))+\frac {1}{3} \int x^3 \text {csch}(x) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-\int x^2 \log \left (1-e^x\right ) \, dx+\int x^2 \log \left (1+e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 \int x \text {Li}_2\left (-e^x\right ) \, dx-2 \int x \text {Li}_2\left (e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \int \text {Li}_3\left (-e^x\right ) \, dx+2 \int \text {Li}_3\left (e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \operatorname {Subst}\left (\int \frac {\text {Li}_3(-x)}{x} \, dx,x,e^x\right )+2 \operatorname {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^x\right )\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \text {Li}_4\left (-e^x\right )+2 \text {Li}_4\left (e^x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 109, normalized size = 1.42 \[ \frac {1}{24} \left (24 x^2 \text {Li}_2\left (-e^{-x}\right )+24 x^2 \text {Li}_2\left (e^x\right )+48 x \text {Li}_3\left (-e^{-x}\right )-48 x \text {Li}_3\left (e^x\right )+48 \text {Li}_4\left (-e^{-x}\right )+48 \text {Li}_4\left (e^x\right )-2 x^4-8 x^3 \log \left (e^{-x}+1\right )+8 x^3 \log \left (1-e^x\right )+8 x^3 \tanh ^{-1}(\cosh (x))+\pi ^4\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Pi^4 - 2*x^4 + 8*x^3*ArcTanh[Cosh[x]] - 8*x^3*Log[1 + E^(-x)] + 8*x^3*Log[1 - E^x] + 24*x^2*PolyLog[2, -E^(-x
)] + 24*x^2*PolyLog[2, E^x] + 48*x*PolyLog[3, -E^(-x)] - 48*x*PolyLog[3, E^x] + 48*PolyLog[4, -E^(-x)] + 48*Po
lyLog[4, E^x])/24

________________________________________________________________________________________

fricas [C]  time = 0.83, size = 118, normalized size = 1.53 \[ \frac {1}{6} \, x^{3} \log \left (-\frac {\cosh \relax (x) + 1}{\cosh \relax (x) - 1}\right ) - \frac {1}{3} \, x^{3} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) + \frac {1}{3} \, x^{3} \log \left (-\cosh \relax (x) - \sinh \relax (x) + 1\right ) + x^{2} {\rm Li}_2\left (\cosh \relax (x) + \sinh \relax (x)\right ) - x^{2} {\rm Li}_2\left (-\cosh \relax (x) - \sinh \relax (x)\right ) - 2 \, x {\rm polylog}\left (3, \cosh \relax (x) + \sinh \relax (x)\right ) + 2 \, x {\rm polylog}\left (3, -\cosh \relax (x) - \sinh \relax (x)\right ) + 2 \, {\rm polylog}\left (4, \cosh \relax (x) + \sinh \relax (x)\right ) - 2 \, {\rm polylog}\left (4, -\cosh \relax (x) - \sinh \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \operatorname {artanh}\left (\cosh \relax (x)\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.44, size = 501, normalized size = 6.51 \[ -\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3} x^{3}}{12}+\frac {i \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} x^{3}}{12}-\frac {i \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 ) x^{3}}{12}-\frac {i \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 ) x^{3}}{12}-\frac {i \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} x^{3}}{6}-\frac {i \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} x^{3}}{12}+\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2} x^{3}}{6}+\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3} x^{3}}{12}-\frac {i \pi \,x^{3}}{6}+\frac {x^{3} \ln \left (1-{\mathrm e}^{x}\right )}{3}-\frac {x^{3} \ln \left ({\mathrm e}^{x}-1\right )}{3}+2 x \polylog \left (3, -{\mathrm e}^{x}\right )-2 x \polylog \left (3, {\mathrm e}^{x}\right )-2 \polylog \left (4, -{\mathrm e}^{x}\right )+2 \polylog \left (4, {\mathrm e}^{x}\right )+\frac {i \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} x^{3}}{12}-\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3} x^{3}}{12}+\frac {i \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} x^{3}}{6}-\frac {i \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} x^{3}}{12}+x^{2} \polylog \left (2, {\mathrm e}^{x}\right )-x^{2} \polylog \left (2, -{\mathrm e}^{x}\right )+\frac {i \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 ) x^{3}}{12}-\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3} x^{3}}{12}+\frac {i \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 ) x^{3}}{12} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*arctanh(cosh(x)),x)

[Out]

-1/12*I*Pi*csgn(I*exp(-x)*(exp(x)+1)^2)^3*x^3+1/12*I*Pi*csgn(I*(exp(x)+1)^2)*csgn(I*exp(-x)*(exp(x)+1)^2)^2*x^
3-1/12*I*Pi*csgn(I*(exp(x)+1)^2)*csgn(I*exp(-x))*csgn(I*exp(-x)*(exp(x)+1)^2)*x^3-1/12*I*Pi*csgn(I*(exp(x)+1))
^2*csgn(I*(exp(x)+1)^2)*x^3-1/6*I*Pi*csgn(I*(exp(x)-1))*csgn(I*(exp(x)-1)^2)^2*x^3-1/12*I*Pi*csgn(I*(exp(x)-1)
^2)*csgn(I*exp(-x)*(exp(x)-1)^2)^2*x^3+1/6*I*Pi*csgn(I*exp(-x)*(exp(x)-1)^2)^2*x^3+1/12*I*Pi*csgn(I*(exp(x)-1)
^2)^3*x^3-1/6*I*Pi*x^3+1/3*x^3*ln(1-exp(x))-1/3*x^3*ln(exp(x)-1)+2*x*polylog(3,-exp(x))-2*x*polylog(3,exp(x))-
2*polylog(4,-exp(x))+2*polylog(4,exp(x))+1/12*I*Pi*csgn(I*exp(-x))*csgn(I*exp(-x)*(exp(x)+1)^2)^2*x^3-1/12*I*P
i*csgn(I*(exp(x)+1)^2)^3*x^3+1/6*I*Pi*csgn(I*(exp(x)+1))*csgn(I*(exp(x)+1)^2)^2*x^3-1/12*I*Pi*csgn(I*exp(-x))*
csgn(I*exp(-x)*(exp(x)-1)^2)^2*x^3+x^2*polylog(2,exp(x))-x^2*polylog(2,-exp(x))+1/12*I*Pi*csgn(I*(exp(x)-1))^2
*csgn(I*(exp(x)-1)^2)*x^3-1/12*I*Pi*csgn(I*exp(-x)*(exp(x)-1)^2)^3*x^3+1/12*I*Pi*csgn(I*(exp(x)-1)^2)*csgn(I*e
xp(-x))*csgn(I*exp(-x)*(exp(x)-1)^2)*x^3

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 78, normalized size = 1.01 \[ \frac {1}{3} \, x^{3} \operatorname {artanh}\left (\cosh \relax (x)\right ) - \frac {1}{3} \, x^{3} \log \left (e^{x} + 1\right ) + \frac {1}{3} \, x^{3} \log \left (-e^{x} + 1\right ) - x^{2} {\rm Li}_2\left (-e^{x}\right ) + x^{2} {\rm Li}_2\left (e^{x}\right ) + 2 \, x {\rm Li}_{3}(-e^{x}) - 2 \, x {\rm Li}_{3}(e^{x}) - 2 \, {\rm Li}_{4}(-e^{x}) + 2 \, {\rm Li}_{4}(e^{x}) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x^2\,\mathrm {atanh}\left (\mathrm {cosh}\relax (x)\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \operatorname {atanh}{\left (\cosh {\relax (x )} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________