3.348 \(\int x^2 \tanh ^{-1}(e^x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0670158, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {6213, 2531, 6609, 2282, 6589} \[ -\frac{1}{2} x^2 \text{PolyLog}\left (2,-e^x\right )+\frac{1}{2} x^2 \text{PolyLog}\left (2,e^x\right )+x \text{PolyLog}\left (3,-e^x\right )-x \text{PolyLog}\left (3,e^x\right )-\text{PolyLog}\left (4,-e^x\right )+\text{PolyLog}\left (4,e^x\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6213

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 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 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]

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 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]

Rubi steps

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

Mathematica [A]  time = 0.0279609, size = 93, normalized size = 1.6 \[ \frac{1}{6} \left (-3 x^2 \text{PolyLog}\left (2,-e^x\right )+3 x^2 \text{PolyLog}\left (2,e^x\right )+6 x \text{PolyLog}\left (3,-e^x\right )-6 x \text{PolyLog}\left (3,e^x\right )-6 \text{PolyLog}\left (4,-e^x\right )+6 \text{PolyLog}\left (4,e^x\right )+x^3 \log \left (1-e^x\right )-x^3 \log \left (e^x+1\right )+2 x^3 \tanh ^{-1}\left (e^x\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 79, normalized size = 1.4 \begin{align*}{\frac{{x}^{3}{\it Artanh} \left ({{\rm e}^{x}} \right ) }{3}}-{\frac{{x}^{3}\ln \left ({{\rm e}^{x}}+1 \right ) }{6}}-{\frac{{x}^{2}{\it polylog} \left ( 2,-{{\rm e}^{x}} \right ) }{2}}+x{\it polylog} \left ( 3,-{{\rm e}^{x}} \right ) -{\it polylog} \left ( 4,-{{\rm e}^{x}} \right ) +{\frac{{x}^{3}\ln \left ( 1-{{\rm e}^{x}} \right ) }{6}}+{\frac{{x}^{2}{\it polylog} \left ( 2,{{\rm e}^{x}} \right ) }{2}}-x{\it polylog} \left ( 3,{{\rm e}^{x}} \right ) +{\it polylog} \left ( 4,{{\rm e}^{x}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.961828, size = 103, normalized size = 1.78 \begin{align*} \frac{1}{3} \, x^{3} \operatorname{artanh}\left (e^{x}\right ) - \frac{1}{6} \, x^{3} \log \left (e^{x} + 1\right ) + \frac{1}{6} \, x^{3} \log \left (-e^{x} + 1\right ) - \frac{1}{2} \, x^{2}{\rm Li}_2\left (-e^{x}\right ) + \frac{1}{2} \, x^{2}{\rm Li}_2\left (e^{x}\right ) + x{\rm Li}_{3}(-e^{x}) - x{\rm Li}_{3}(e^{x}) -{\rm Li}_{4}(-e^{x}) +{\rm Li}_{4}(e^{x}) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [C]  time = 1.68578, size = 463, normalized size = 7.98 \begin{align*} \frac{1}{6} \, x^{3} \log \left (-\frac{\cosh \left (x\right ) + \sinh \left (x\right ) + 1}{\cosh \left (x\right ) + \sinh \left (x\right ) - 1}\right ) - \frac{1}{6} \, x^{3} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + \frac{1}{6} \, x^{3} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + \frac{1}{2} \, x^{2}{\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - \frac{1}{2} \, x^{2}{\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) - x{\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) + x{\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) +{\rm polylog}\left (4, \cosh \left (x\right ) + \sinh \left (x\right )\right ) -{\rm polylog}\left (4, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \operatorname{artanh}\left (e^{x}\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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