Integrand size = 18, antiderivative size = 72 \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, 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 \operatorname {PolyLog}\left (2,-e^x\right )-2 x \operatorname {PolyLog}\left (2,-e^x\right )+2 \operatorname {PolyLog}\left (3,-e^x\right ) \]
[Out]
Time = 0.15 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {6820, 2216, 2215, 2221, 2611, 2320, 6724, 2222, 2317, 2438} \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=-2 x \operatorname {PolyLog}\left (2,-e^x\right )+2 \operatorname {PolyLog}\left (2,-e^x\right )+2 \operatorname {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 ) \]
[In]
[Out]
Rule 2215
Rule 2216
Rule 2221
Rule 2222
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 6724
Rule 6820
Rubi steps \begin{align*} \text {integral}& = \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 \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^x\right )+2 \text {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*}
Time = 0.08 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.79 \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\frac {x^2 \left (e^x (-3+x)+x\right )}{3 \left (1+e^x\right )}-(-2+x) x \log \left (1+e^x\right )-2 (-1+x) \operatorname {PolyLog}\left (2,-e^x\right )+2 \operatorname {PolyLog}\left (3,-e^x\right ) \]
[In]
[Out]
Time = 0.03 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.90
method | result | size |
risch | \(-x^{2}+\frac {x^{2}}{1+{\mathrm e}^{x}}+\frac {x^{3}}{3}+2 x \ln \left (1+{\mathrm e}^{x}\right )-x^{2} \ln \left (1+{\mathrm e}^{x}\right )+2 \,\operatorname {Li}_{2}\left (-{\mathrm e}^{x}\right )-2 x \,\operatorname {Li}_{2}\left (-{\mathrm e}^{x}\right )+2 \,\operatorname {Li}_{3}\left (-{\mathrm e}^{x}\right )\) | \(65\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.06 \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\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 )}} \]
[In]
[Out]
\[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\frac {x^{2}}{e^{x} + 1} + \int \frac {x \left (x - 2\right )}{e^{x} + 1}\, dx \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.86 \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\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}) \]
[In]
[Out]
\[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\int { \frac {x^{2}}{e^{\left (2 \, x\right )} + 2 \, e^{x} + 1} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^2}{1+2 e^x+e^{2 x}} \, dx=\int \frac {x^2}{{\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1} \,d x \]
[In]
[Out]