Optimal. Leaf size=20 \[ x-\frac {x}{1+e^x}-\log \left (1+e^x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2299, 6820,
2222, 2320, 36, 29, 31} \begin {gather*} -\frac {x}{e^x+1}+x-\log \left (e^x+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 2222
Rule 2299
Rule 2320
Rule 6820
Rubi steps
\begin {align*} \int \frac {x}{2+e^{-x}+e^x} \, dx &=\int \frac {e^x x}{1+2 e^x+e^{2 x}} \, dx\\ &=\int \frac {e^x x}{\left (1+e^x\right )^2} \, dx\\ &=-\frac {x}{1+e^x}+\int \frac {1}{1+e^x} \, dx\\ &=-\frac {x}{1+e^x}+\text {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,e^x\right )\\ &=-\frac {x}{1+e^x}+\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\text {Subst}\left (\int \frac {1}{1+x} \, dx,x,e^x\right )\\ &=x-\frac {x}{1+e^x}-\log \left (1+e^x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 20, normalized size = 1.00 \begin {gather*} x-\frac {x}{1+e^x}-\log \left (1+e^x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 19, normalized size = 0.95
method | result | size |
default | \(-\ln \left (1+{\mathrm e}^{x}\right )+\frac {x \,{\mathrm e}^{x}}{1+{\mathrm e}^{x}}\) | \(19\) |
norman | \(-\ln \left (1+{\mathrm e}^{x}\right )+\frac {x \,{\mathrm e}^{x}}{1+{\mathrm e}^{x}}\) | \(19\) |
risch | \(x -\frac {x}{1+{\mathrm e}^{x}}-\ln \left (1+{\mathrm e}^{x}\right )\) | \(19\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 18, normalized size = 0.90 \begin {gather*} \frac {x e^{x}}{e^{x} + 1} - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 23, normalized size = 1.15 \begin {gather*} \frac {x e^{x} - {\left (e^{x} + 1\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 [A]
time = 0.03, size = 14, normalized size = 0.70 \begin {gather*} x - \frac {x}{e^{x} + 1} - \log {\left (e^{x} + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.94, size = 28, normalized size = 1.40 \begin {gather*} \frac {x e^{x} - e^{x} \log \left (e^{x} + 1\right ) - \log \left (e^{x} + 1\right )}{e^{x} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 18, normalized size = 0.90 \begin {gather*} \frac {x\,{\mathrm {e}}^x}{{\mathrm {e}}^x+1}-\ln \left ({\mathrm {e}}^x+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________