3.4.47 \(\int x \tanh ^{-1}(e^x) \, dx\) [347]

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

[Out]

-1/2*x*polylog(2,-exp(x))+1/2*x*polylog(2,exp(x))+1/2*polylog(3,-exp(x))-1/2*polylog(3,exp(x))

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {6348, 2611, 2320, 6724} \begin {gather*} -\frac {1}{2} x \text {Li}_2\left (-e^x\right )+\frac {x \text {Li}_2\left (e^x\right )}{2}+\frac {\text {Li}_3\left (-e^x\right )}{2}-\frac {\text {Li}_3\left (e^x\right )}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*ArcTanh[E^x],x]

[Out]

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

Rule 2320

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 2611

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 6348

Int[ArcTanh[(a_.) + (b_.)*(f_)^((c_.) + (d_.)*(x_))]*(x_)^(m_.), x_Symbol] :> Dist[1/2, Int[x^m*Log[1 + a + b*
f^(c + d*x)], x], x] - Dist[1/2, Int[x^m*Log[1 - a - b*f^(c + d*x)], x], x] /; FreeQ[{a, b, c, d, f}, x] && IG
tQ[m, 0]

Rule 6724

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 71, normalized size = 1.65 \begin {gather*} \frac {1}{4} \left (2 x^2 \tanh ^{-1}\left (e^x\right )+x^2 \log \left (1-e^x\right )-x^2 \log \left (1+e^x\right )-2 x \text {PolyLog}\left (2,-e^x\right )+2 x \text {PolyLog}\left (2,e^x\right )+2 \text {PolyLog}\left (3,-e^x\right )-2 \text {PolyLog}\left (3,e^x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*ArcTanh[E^x],x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 62, normalized size = 1.44

method result size
risch \(-\frac {x \polylog \left (2, -{\mathrm e}^{x}\right )}{2}+\frac {x \polylog \left (2, {\mathrm e}^{x}\right )}{2}+\frac {\polylog \left (3, -{\mathrm e}^{x}\right )}{2}-\frac {\polylog \left (3, {\mathrm e}^{x}\right )}{2}\) \(32\)
default \(\frac {x^{2} \arctanh \left ({\mathrm e}^{x}\right )}{2}+\frac {x^{2} \ln \left (1-{\mathrm e}^{x}\right )}{4}+\frac {x \polylog \left (2, {\mathrm e}^{x}\right )}{2}-\frac {\polylog \left (3, {\mathrm e}^{x}\right )}{2}-\frac {x^{2} \ln \left ({\mathrm e}^{x}+1\right )}{4}-\frac {x \polylog \left (2, -{\mathrm e}^{x}\right )}{2}+\frac {\polylog \left (3, -{\mathrm e}^{x}\right )}{2}\) \(62\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (29) = 58\).
time = 0.26, size = 59, normalized size = 1.37 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {artanh}\left (e^{x}\right ) - \frac {1}{4} \, x^{2} \log \left (e^{x} + 1\right ) + \frac {1}{4} \, x^{2} \log \left (-e^{x} + 1\right ) - \frac {1}{2} \, x {\rm Li}_2\left (-e^{x}\right ) + \frac {1}{2} \, x {\rm Li}_2\left (e^{x}\right ) + \frac {1}{2} \, {\rm Li}_{3}(-e^{x}) - \frac {1}{2} \, {\rm Li}_{3}(e^{x}) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (29) = 58\).
time = 0.39, size = 95, normalized size = 2.21 \begin {gather*} \frac {1}{4} \, x^{2} \log \left (-\frac {\cosh \left (x\right ) + \sinh \left (x\right ) + 1}{\cosh \left (x\right ) + \sinh \left (x\right ) - 1}\right ) - \frac {1}{4} \, x^{2} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + \frac {1}{4} \, x^{2} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + \frac {1}{2} \, x {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - \frac {1}{2} \, x {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) - \frac {1}{2} \, {\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) + \frac {1}{2} \, {\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*atanh(exp(x)),x)

[Out]

Integral(x*atanh(exp(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(x*arctanh(exp(x)),x, algorithm="giac")

[Out]

integrate(x*arctanh(e^x), x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*atanh(exp(x)),x)

[Out]

int(x*atanh(exp(x)), x)

________________________________________________________________________________________