3.515 \(\int \frac{x^2}{1+2 e^x+e^{2 x}} \, dx\)

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.341545, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 10, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.556 \[ -2 x \text{PolyLog}\left (2,-e^x\right )+2 \text{PolyLog}\left (2,-e^x\right )+2 \text{PolyLog}\left (3,-e^x\right )+\frac{x^3}{3}+\frac{x^2}{e^x+1}-x^2-x^2 \log \left (e^x+1\right )+2 x \log \left (e^x+1\right ) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{2}}{e^{2 x} + 2 e^{x} + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2/(1+2*exp(x)+exp(2*x)),x)

[Out]

Integral(x**2/(exp(2*x) + 2*exp(x) + 1), x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.13834, size = 57, normalized size = 0.79 \[ -2 (x-1) \text{PolyLog}\left (2,-e^x\right )+2 \text{PolyLog}\left (3,-e^x\right )+\frac{\left (e^x (x-3)+x\right ) x^2}{3 \left (e^x+1\right )}-(x-2) x \log \left (e^x+1\right ) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.044, size = 65, normalized size = 0.9 \[ -{x}^{2}+{\frac{{x}^{2}}{1+{{\rm e}^{x}}}}+{\frac{{x}^{3}}{3}}+2\,x\ln \left ( 1+{{\rm e}^{x}} \right ) -{x}^{2}\ln \left ( 1+{{\rm e}^{x}} \right ) +2\,{\it polylog} \left ( 2,-{{\rm e}^{x}} \right ) -2\,x{\it polylog} \left ( 2,-{{\rm e}^{x}} \right ) +2\,{\it polylog} \left ( 3,-{{\rm e}^{x}} \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2/(1+2*exp(x)+exp(2*x)),x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.845112, size = 84, normalized size = 1.17 \[ \frac{1}{3} \, x^{3} - x^{2} \log \left (e^{x} + 1\right ) - x^{2} - 2 \, x{\rm Li}_2\left (-e^{x}\right ) + 2 \, x \log \left (e^{x} + 1\right ) + \frac{x^{2}}{e^{x} + 1} + 2 \,{\rm Li}_2\left (-e^{x}\right ) + 2 \,{\rm Li}_{3}(-e^{x}) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(e^(2*x) + 2*e^x + 1),x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.254305, size = 103, normalized size = 1.43 \[ \frac{x^{3} - 6 \,{\left ({\left (x - 1\right )} e^{x} + x - 1\right )}{\rm Li}_2\left (-e^{x}\right ) +{\left (x^{3} - 3 \, x^{2}\right )} e^{x} - 3 \,{\left (x^{2} +{\left (x^{2} - 2 \, x\right )} e^{x} - 2 \, x\right )} \log \left (e^{x} + 1\right ) + 6 \,{\left (e^{x} + 1\right )}{\rm Li}_{3}(-e^{x})}{3 \,{\left (e^{x} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(e^(2*x) + 2*e^x + 1),x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{x^{2}}{e^{x} + 1} + \int \frac{x \left (x - 2\right )}{e^{x} + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2/(1+2*exp(x)+exp(2*x)),x)

[Out]

x**2/(exp(x) + 1) + Integral(x*(x - 2)/(exp(x) + 1), x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{2}}{e^{\left (2 \, x\right )} + 2 \, e^{x} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(e^(2*x) + 2*e^x + 1),x, algorithm="giac")

[Out]

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