Optimal. Leaf size=34 \[ x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )-2 \text {Li}_2\left (-e^x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {2299, 6820,
2222, 2215, 2221, 2317, 2438} \begin {gather*} -2 \text {PolyLog}\left (2,-e^x\right )-\frac {x^2}{e^x+1}+x^2-2 x \log \left (e^x+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2215
Rule 2221
Rule 2222
Rule 2299
Rule 2317
Rule 2438
Rule 6820
Rubi steps
\begin {align*} \int \frac {x^2}{2+e^{-x}+e^x} \, dx &=\int \frac {e^x x^2}{1+2 e^x+e^{2 x}} \, dx\\ &=\int \frac {e^x x^2}{\left (1+e^x\right )^2} \, dx\\ &=-\frac {x^2}{1+e^x}+2 \int \frac {x}{1+e^x} \, dx\\ &=x^2-\frac {x^2}{1+e^x}-2 \int \frac {e^x x}{1+e^x} \, dx\\ &=x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )+2 \int \log \left (1+e^x\right ) \, dx\\ &=x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )+2 \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^x\right )\\ &=x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )-2 \text {Li}_2\left (-e^x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 33, normalized size = 0.97 \begin {gather*} x \left (\frac {e^x x}{1+e^x}-2 \log \left (1+e^x\right )\right )-2 \text {Li}_2\left (-e^x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 32, normalized size = 0.94
method | result | size |
risch | \(x^{2}-\frac {x^{2}}{1+{\mathrm e}^{x}}-2 x \ln \left (1+{\mathrm e}^{x}\right )-2 \polylog \left (2, -{\mathrm e}^{x}\right )\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 30, normalized size = 0.88 \begin {gather*} x^{2} - 2 \, x \log \left (e^{x} + 1\right ) - \frac {x^{2}}{e^{x} + 1} - 2 \, {\rm Li}_2\left (-e^{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 38, normalized size = 1.12 \begin {gather*} \frac {x^{2} e^{x} - 2 \, {\left (e^{x} + 1\right )} {\rm Li}_2\left (-e^{x}\right ) - 2 \, {\left (x e^{x} + x\right )} \log \left (e^{x} + 1\right )}{e^{x} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {x^{2}}{e^{x} + 1} + 2 \int \frac {x}{e^{x} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {x^2}{{\mathrm {e}}^{-x}+{\mathrm {e}}^x+2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________