Optimal. Leaf size=77 \[ -2 x \text{PolyLog}\left (2,-e^x\right )+x \text{PolyLog}\left (2,-\frac{e^x}{2}\right )+2 \text{PolyLog}\left (3,-e^x\right )-\text{PolyLog}\left (3,-\frac{e^x}{2}\right )+\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (\frac{e^x}{2}+1\right )-x^2 \log \left (e^x+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.222342, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2263, 2184, 2190, 2531, 2282, 6589} \[ -2 x \text{PolyLog}\left (2,-e^x\right )+x \text{PolyLog}\left (2,-\frac{e^x}{2}\right )+2 \text{PolyLog}\left (3,-e^x\right )-\text{PolyLog}\left (3,-\frac{e^x}{2}\right )+\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (\frac{e^x}{2}+1\right )-x^2 \log \left (e^x+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2263
Rule 2184
Rule 2190
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int \frac{x^2}{2+3 e^x+e^{2 x}} \, dx &=2 \int \frac{x^2}{2+2 e^x} \, dx-2 \int \frac{x^2}{4+2 e^x} \, dx\\ &=\frac{x^3}{6}-2 \int \frac{e^x x^2}{2+2 e^x} \, dx+\int \frac{e^x x^2}{4+2 e^x} \, dx\\ &=\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (1+\frac{e^x}{2}\right )-x^2 \log \left (1+e^x\right )+2 \int x \log \left (1+e^x\right ) \, dx-\int x \log \left (1+\frac{e^x}{2}\right ) \, dx\\ &=\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (1+\frac{e^x}{2}\right )-x^2 \log \left (1+e^x\right )-2 x \text{Li}_2\left (-e^x\right )+x \text{Li}_2\left (-\frac{e^x}{2}\right )+2 \int \text{Li}_2\left (-e^x\right ) \, dx-\int \text{Li}_2\left (-\frac{e^x}{2}\right ) \, dx\\ &=\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (1+\frac{e^x}{2}\right )-x^2 \log \left (1+e^x\right )-2 x \text{Li}_2\left (-e^x\right )+x \text{Li}_2\left (-\frac{e^x}{2}\right )+2 \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^x\right )-\operatorname{Subst}\left (\int \frac{\text{Li}_2\left (-\frac{x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=\frac{x^3}{6}+\frac{1}{2} x^2 \log \left (1+\frac{e^x}{2}\right )-x^2 \log \left (1+e^x\right )-2 x \text{Li}_2\left (-e^x\right )+x \text{Li}_2\left (-\frac{e^x}{2}\right )+2 \text{Li}_3\left (-e^x\right )-\text{Li}_3\left (-\frac{e^x}{2}\right )\\ \end{align*}
Mathematica [A] time = 0.0098889, size = 77, normalized size = 1. \[ -x \text{PolyLog}\left (2,-2 e^{-x}\right )+2 x \text{PolyLog}\left (2,-e^{-x}\right )-\text{PolyLog}\left (3,-2 e^{-x}\right )+2 \text{PolyLog}\left (3,-e^{-x}\right )+x^2 \left (-\log \left (e^{-x}+1\right )\right )+\frac{1}{2} x^2 \log \left (2 e^{-x}+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 62, normalized size = 0.8 \begin{align*}{\frac{{x}^{3}}{6}}+{\frac{{x}^{2}}{2}\ln \left ( 1+{\frac{{{\rm e}^{x}}}{2}} \right ) }-{x}^{2}\ln \left ( 1+{{\rm e}^{x}} \right ) -2\,x{\it polylog} \left ( 2,-{{\rm e}^{x}} \right ) +x{\it polylog} \left ( 2,-{\frac{{{\rm e}^{x}}}{2}} \right ) +2\,{\it polylog} \left ( 3,-{{\rm e}^{x}} \right ) -{\it polylog} \left ( 3,-{\frac{{{\rm e}^{x}}}{2}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.989142, size = 80, normalized size = 1.04 \begin{align*} \frac{1}{6} \, x^{3} - x^{2} \log \left (e^{x} + 1\right ) + \frac{1}{2} \, x^{2} \log \left (\frac{1}{2} \, e^{x} + 1\right ) + x{\rm Li}_2\left (-\frac{1}{2} \, e^{x}\right ) - 2 \, x{\rm Li}_2\left (-e^{x}\right ) -{\rm Li}_{3}(-\frac{1}{2} \, e^{x}) + 2 \,{\rm Li}_{3}(-e^{x}) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.48589, size = 185, normalized size = 2.4 \begin{align*} \frac{1}{6} \, x^{3} - x^{2} \log \left (e^{x} + 1\right ) + \frac{1}{2} \, x^{2} \log \left (\frac{1}{2} \, e^{x} + 1\right ) + x{\rm Li}_2\left (-\frac{1}{2} \, e^{x}\right ) - 2 \, x{\rm Li}_2\left (-e^{x}\right ) -{\rm polylog}\left (3, -\frac{1}{2} \, e^{x}\right ) + 2 \,{\rm polylog}\left (3, -e^{x}\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*} \int \frac{x^{2}}{\left (e^{x} + 1\right ) \left (e^{x} + 2\right )}\, 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 )} + 3 \, e^{x} + 2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]