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]
________________________________________________________________________________________
Rubi [A] time = 0.229501, 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, Rules used = {6688, 2185, 2184, 2190, 2531, 2282, 6589, 2191, 2279, 2391} \[ -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]
[Out]
Rule 6688
Rule 2185
Rule 2184
Rule 2190
Rule 2531
Rule 2282
Rule 6589
Rule 2191
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{x^2}{1+2 e^x+e^{2 x}} \, dx &=\int \frac{x^2}{\left (1+e^x\right )^2} \, dx\\ &=-\int \frac{e^x x^2}{\left (1+e^x\right )^2} \, dx+\int \frac{x^2}{1+e^x} \, dx\\ &=\frac{x^2}{1+e^x}+\frac{x^3}{3}-2 \int \frac{x}{1+e^x} \, dx-\int \frac{e^x x^2}{1+e^x} \, dx\\ &=-x^2+\frac{x^2}{1+e^x}+\frac{x^3}{3}-x^2 \log \left (1+e^x\right )+2 \int \frac{e^x x}{1+e^x} \, dx+2 \int x \log \left (1+e^x\right ) \, dx\\ &=-x^2+\frac{x^2}{1+e^x}+\frac{x^3}{3}+2 x \log \left (1+e^x\right )-x^2 \log \left (1+e^x\right )-2 x \text{Li}_2\left (-e^x\right )-2 \int \log \left (1+e^x\right ) \, dx+2 \int \text{Li}_2\left (-e^x\right ) \, dx\\ &=-x^2+\frac{x^2}{1+e^x}+\frac{x^3}{3}+2 x \log \left (1+e^x\right )-x^2 \log \left (1+e^x\right )-2 x \text{Li}_2\left (-e^x\right )-2 \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^x\right )+2 \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^x\right )\\ &=-x^2+\frac{x^2}{1+e^x}+\frac{x^3}{3}+2 x \log \left (1+e^x\right )-x^2 \log \left (1+e^x\right )+2 \text{Li}_2\left (-e^x\right )-2 x \text{Li}_2\left (-e^x\right )+2 \text{Li}_3\left (-e^x\right )\\ \end{align*}
Mathematica [A] time = 0.091594, 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]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 65, normalized size = 0.9 \begin{align*} -{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 ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.985644, size = 84, normalized size = 1.17 \begin{align*} \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}) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.49997, size = 212, normalized size = 2.94 \begin{align*} \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 polylog}\left (3, -e^{x}\right )}{3 \,{\left (e^{x} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{x^{2}}{e^{x} + 1} + \int \frac{x \left (x - 2\right )}{e^{x} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{e^{\left (2 \, x\right )} + 2 \, e^{x} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]