\(\int x^2 \text {arctanh}(e^x) \, dx\) [348]

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.60 \[ \int x^2 \text {arctanh}\left (e^x\right ) \, dx=\frac {1}{6} \left (2 x^3 \text {arctanh}\left (e^x\right )+x^3 \log \left (1-e^x\right )-x^3 \log \left (1+e^x\right )-3 x^2 \operatorname {PolyLog}\left (2,-e^x\right )+3 x^2 \operatorname {PolyLog}\left (2,e^x\right )+6 x \operatorname {PolyLog}\left (3,-e^x\right )-6 x \operatorname {PolyLog}\left (3,e^x\right )-6 \operatorname {PolyLog}\left (4,-e^x\right )+6 \operatorname {PolyLog}\left (4,e^x\right )\right ) \] Input:

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

Output:

(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
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.21, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {6767, 3011, 7163, 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^2 \text {arctanh}\left (e^x\right ) \, dx\)

\(\Big \downarrow \) 6767

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

\(\Big \downarrow \) 3011

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

\(\Big \downarrow \) 7163

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

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 7143

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

Input:

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

Output:

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

Defintions of rubi rules used

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 6767
Int[ArcTanh[(a_.) + (b_.)*(f_)^((c_.) + (d_.)*(x_))]*(x_)^(m_.), x_Symbol] 
:> Simp[1/2   Int[x^m*Log[1 + a + b*f^(c + d*x)], x], x] - Simp[1/2   Int[x 
^m*Log[1 - a - b*f^(c + d*x)], x], x] /; FreeQ[{a, b, c, d, f}, x] && IGtQ[ 
m, 0]
 

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]
 

rule 7163
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] - Simp[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]
 
Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.84

method result size
risch \(-\frac {x^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{x}\right )}{2}+\frac {x^{2} \operatorname {polylog}\left (2, {\mathrm e}^{x}\right )}{2}+x \operatorname {polylog}\left (3, -{\mathrm e}^{x}\right )-x \operatorname {polylog}\left (3, {\mathrm e}^{x}\right )-\operatorname {polylog}\left (4, -{\mathrm e}^{x}\right )+\operatorname {polylog}\left (4, {\mathrm e}^{x}\right )\) \(49\)
default \(\frac {x^{3} \operatorname {arctanh}\left ({\mathrm e}^{x}\right )}{3}+\frac {x^{3} \ln \left (1-{\mathrm e}^{x}\right )}{6}+\frac {x^{2} \operatorname {polylog}\left (2, {\mathrm e}^{x}\right )}{2}-x \operatorname {polylog}\left (3, {\mathrm e}^{x}\right )+\operatorname {polylog}\left (4, {\mathrm e}^{x}\right )-\frac {x^{3} \ln \left (1+{\mathrm e}^{x}\right )}{6}-\frac {x^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{x}\right )}{2}+x \operatorname {polylog}\left (3, -{\mathrm e}^{x}\right )-\operatorname {polylog}\left (4, -{\mathrm e}^{x}\right )\) \(79\)
parts \(\frac {x^{3} \operatorname {arctanh}\left ({\mathrm e}^{x}\right )}{3}+\frac {x^{3} \ln \left (1-{\mathrm e}^{x}\right )}{6}+\frac {x^{2} \operatorname {polylog}\left (2, {\mathrm e}^{x}\right )}{2}-x \operatorname {polylog}\left (3, {\mathrm e}^{x}\right )+\operatorname {polylog}\left (4, {\mathrm e}^{x}\right )-\frac {x^{3} \ln \left (1+{\mathrm e}^{x}\right )}{6}-\frac {x^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{x}\right )}{2}+x \operatorname {polylog}\left (3, -{\mathrm e}^{x}\right )-\operatorname {polylog}\left (4, -{\mathrm e}^{x}\right )\) \(79\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (46) = 92\).

Time = 0.10 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.07 \[ \int x^2 \text {arctanh}\left (e^x\right ) \, dx=\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 ) \] Input:

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

Output:

1/6*x^3*log(-(cosh(x) + sinh(x) + 1)/(cosh(x) + sinh(x) - 1)) - 1/6*x^3*lo 
g(cosh(x) + sinh(x) + 1) + 1/6*x^3*log(-cosh(x) - sinh(x) + 1) + 1/2*x^2*d 
ilog(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]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.31 \[ \int x^2 \text {arctanh}\left (e^x\right ) \, dx=\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}) \] Input:

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

Output:

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)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int(atanh(e**x)*x**2,x)