Optimal. Leaf size=15 \[ -5+\log (5)-x \log \left (\left (4+e^x\right )^2\right ) \]
________________________________________________________________________________________
Rubi [C] time = 0.15, antiderivative size = 56, normalized size of antiderivative = 3.73, number of steps used = 8, number of rules used = 7, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {6688, 2190, 2279, 2391, 2282, 2394, 2315} \begin {gather*} -2 \text {Li}_2\left (-\frac {e^x}{4}\right )-2 \text {Li}_2\left (1+\frac {e^x}{4}\right )-2 x \log \left (\frac {e^x}{4}+1\right )-\log \left (-\frac {e^x}{4}\right ) \log \left (\left (e^x+4\right )^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2282
Rule 2315
Rule 2391
Rule 2394
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 e^x x}{4+e^x}-\log \left (\left (4+e^x\right )^2\right )\right ) \, dx\\ &=-\left (2 \int \frac {e^x x}{4+e^x} \, dx\right )-\int \log \left (\left (4+e^x\right )^2\right ) \, dx\\ &=-2 x \log \left (1+\frac {e^x}{4}\right )+2 \int \log \left (1+\frac {e^x}{4}\right ) \, dx-\operatorname {Subst}\left (\int \frac {\log \left ((4+x)^2\right )}{x} \, dx,x,e^x\right )\\ &=-2 x \log \left (1+\frac {e^x}{4}\right )-\log \left (-\frac {e^x}{4}\right ) \log \left (\left (4+e^x\right )^2\right )+2 \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {x}{4}\right )}{x} \, dx,x,e^x\right )+2 \operatorname {Subst}\left (\int \frac {\log \left (-\frac {x}{4}\right )}{4+x} \, dx,x,e^x\right )\\ &=-2 x \log \left (1+\frac {e^x}{4}\right )-\log \left (-\frac {e^x}{4}\right ) \log \left (\left (4+e^x\right )^2\right )-2 \text {Li}_2\left (-\frac {e^x}{4}\right )-2 \text {Li}_2\left (1+\frac {e^x}{4}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.02, size = 56, normalized size = 3.73 \begin {gather*} -2 x \log \left (1+\frac {e^x}{4}\right )-\log \left (-\frac {e^x}{4}\right ) \log \left (\left (4+e^x\right )^2\right )-2 \text {Li}_2\left (-\frac {e^x}{4}\right )-2 \text {Li}_2\left (\frac {1}{4} \left (4+e^x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.01, size = 14, normalized size = 0.93 \begin {gather*} -x \log \left (e^{\left (2 \, x\right )} + 8 \, e^{x} + 16\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 8, normalized size = 0.53 \begin {gather*} -2 \, x \log \left (e^{x} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 15, normalized size = 1.00
method | result | size |
norman | \(-x \ln \left ({\mathrm e}^{2 x}+8 \,{\mathrm e}^{x}+16\right )\) | \(15\) |
default | \(-2 x \ln \left (1+\frac {{\mathrm e}^{x}}{4}\right )-\left (\ln \left (\left ({\mathrm e}^{x}+4\right )^{2}\right )-2 \ln \left ({\mathrm e}^{x}+4\right )\right ) \ln \left ({\mathrm e}^{x}\right )-2 \left (\ln \left ({\mathrm e}^{x}+4\right )-\ln \left (1+\frac {{\mathrm e}^{x}}{4}\right )\right ) \ln \left (-\frac {{\mathrm e}^{x}}{4}\right )\) | \(54\) |
risch | \(-2 x \ln \left ({\mathrm e}^{x}+4\right )+\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right ) \left (\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )\right )^{2}-2 \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )\right )+\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right )^{2}\right ) x}{2}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 8, normalized size = 0.53 \begin {gather*} -2 \, x \log \left (e^{x} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.08, size = 10, normalized size = 0.67 \begin {gather*} -x\,\ln \left ({\left ({\mathrm {e}}^x+4\right )}^2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 15, normalized size = 1.00 \begin {gather*} - x \log {\left (e^{2 x} + 8 e^{x} + 16 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________