3.1.41 \(\int \frac {e^x x^2}{1-e^{2 x}} \, dx\) [41]

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

[Out]

x^2*arctanh(exp(x))+x*polylog(2,-exp(x))-x*polylog(2,exp(x))-polylog(3,-exp(x))+polylog(3,exp(x))

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {2281, 212, 2277, 6348, 2611, 2320, 6724} \begin {gather*} x \text {PolyLog}\left (2,-e^x\right )-x \text {PolyLog}\left (2,e^x\right )-\text {PolyLog}\left (3,-e^x\right )+\text {PolyLog}\left (3,e^x\right )+x^2 \tanh ^{-1}\left (e^x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^x*x^2)/(1 - E^(2*x)),x]

[Out]

x^2*ArcTanh[E^x] + x*PolyLog[2, -E^x] - x*PolyLog[2, E^x] - PolyLog[3, -E^x] + PolyLog[3, E^x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2277

Int[(F_)^((e_.)*((c_.) + (d_.)*(x_)))*((a_.) + (b_.)*(F_)^(v_))^(p_)*(x_)^(m_.), x_Symbol] :> With[{u = IntHid
e[F^(e*(c + d*x))*(a + b*F^v)^p, x]}, Dist[x^m, u, x] - Dist[m, Int[x^(m - 1)*u, x], x]] /; FreeQ[{F, a, b, c,
 d, e}, x] && EqQ[v, 2*e*(c + d*x)] && GtQ[m, 0] && ILtQ[p, 0]

Rule 2281

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_.)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Wit
h[{m = FullSimplify[d*e*(Log[F]/(g*h*Log[G]))]}, Dist[Denominator[m]/(g*h*Log[G]), Subst[Int[x^(Denominator[m]
 - 1)*(a + b*F^(c*e - d*e*(f/g))*x^Numerator[m])^p, x], x, G^(h*((f + g*x)/Denominator[m]))], x] /; LtQ[m, -1]
 || GtQ[m, 1]] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x]

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 \frac {e^x x^2}{1-e^{2 x}} \, dx &=x^2 \tanh ^{-1}\left (e^x\right )-2 \int x \tanh ^{-1}\left (e^x\right ) \, dx\\ &=x^2 \tanh ^{-1}\left (e^x\right )+\int x \log \left (1-e^x\right ) \, dx-\int x \log \left (1+e^x\right ) \, dx\\ &=x^2 \tanh ^{-1}\left (e^x\right )+x \text {Li}_2\left (-e^x\right )-x \text {Li}_2\left (e^x\right )-\int \text {Li}_2\left (-e^x\right ) \, dx+\int \text {Li}_2\left (e^x\right ) \, dx\\ &=x^2 \tanh ^{-1}\left (e^x\right )+x \text {Li}_2\left (-e^x\right )-x \text {Li}_2\left (e^x\right )-\text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^x\right )+\text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^x\right )\\ &=x^2 \tanh ^{-1}\left (e^x\right )+x \text {Li}_2\left (-e^x\right )-x \text {Li}_2\left (e^x\right )-\text {Li}_3\left (-e^x\right )+\text {Li}_3\left (e^x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 60, normalized size = 1.50 \begin {gather*} -\frac {1}{2} x^2 \log \left (1-e^x\right )+\frac {1}{2} x^2 \log \left (1+e^x\right )+x \text {Li}_2\left (-e^x\right )-x \text {Li}_2\left (e^x\right )-\text {Li}_3\left (-e^x\right )+\text {Li}_3\left (e^x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^x*x^2)/(1 - E^(2*x)),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 51, normalized size = 1.28

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x)*x^2/(1-exp(2*x)),x,method=_RETURNVERBOSE)

[Out]

-1/2*x^2*ln(1-exp(x))-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))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 48, normalized size = 1.20 \begin {gather*} \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}) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x^2/(1-exp(2*x)),x, algorithm="maxima")

[Out]

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)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 48, normalized size = 1.20 \begin {gather*} \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 polylog}\left (3, -e^{x}\right ) + {\rm polylog}\left (3, e^{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x^2/(1-exp(2*x)),x, algorithm="fricas")

[Out]

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)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {x^{2} e^{x}}{e^{2 x} - 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*x**2/(1-exp(2*x)),x)

[Out]

-Integral(x**2*exp(x)/(exp(2*x) - 1), 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(exp(x)*x^2/(1-exp(2*x)),x, algorithm="giac")

[Out]

integrate(-x^2*e^x/(e^(2*x) - 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} -\int \frac {x^2\,{\mathrm {e}}^x}{{\mathrm {e}}^{2\,x}-1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x^2*exp(x))/(exp(2*x) - 1),x)

[Out]

-int((x^2*exp(x))/(exp(2*x) - 1), x)

________________________________________________________________________________________