Optimal. Leaf size=24 \[ (-1+x) \left (-x+\frac {e \left (-4-x+\log \left (2+e^x\right )\right )}{x}\right ) \]
________________________________________________________________________________________
Rubi [F] time = 0.56, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {2 x^2-4 x^3+e \left (-8-2 x^2\right )+e^x \left (e (-4-x)+x^2-2 x^3\right )+\left (2 e+e^{1+x}\right ) \log \left (2+e^x\right )}{2 x^2+e^x x^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 e (-1+x)}{\left (2+e^x\right ) x}+\frac {-4 e-e x+x^2-2 x^3+e \log \left (2+e^x\right )}{x^2}\right ) \, dx\\ &=-\left ((2 e) \int \frac {-1+x}{\left (2+e^x\right ) x} \, dx\right )+\int \frac {-4 e-e x+x^2-2 x^3+e \log \left (2+e^x\right )}{x^2} \, dx\\ &=-\left ((2 e) \int \left (\frac {1}{2+e^x}-\frac {1}{\left (2+e^x\right ) x}\right ) \, dx\right )+\int \left (\frac {-4 e-e x+x^2-2 x^3}{x^2}+\frac {e \log \left (2+e^x\right )}{x^2}\right ) \, dx\\ &=e \int \frac {\log \left (2+e^x\right )}{x^2} \, dx-(2 e) \int \frac {1}{2+e^x} \, dx+(2 e) \int \frac {1}{\left (2+e^x\right ) x} \, dx+\int \frac {-4 e-e x+x^2-2 x^3}{x^2} \, dx\\ &=-\frac {e \log \left (2+e^x\right )}{x}+e \int \frac {e^x}{\left (2+e^x\right ) x} \, dx+(2 e) \int \frac {1}{\left (2+e^x\right ) x} \, dx-(2 e) \operatorname {Subst}\left (\int \frac {1}{x (2+x)} \, dx,x,e^x\right )+\int \left (1-\frac {4 e}{x^2}-\frac {e}{x}-2 x\right ) \, dx\\ &=\frac {4 e}{x}+x-x^2-\frac {e \log \left (2+e^x\right )}{x}-e \log (x)+e \int \frac {e^x}{\left (2+e^x\right ) x} \, dx-e \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )+e \operatorname {Subst}\left (\int \frac {1}{2+x} \, dx,x,e^x\right )+(2 e) \int \frac {1}{\left (2+e^x\right ) x} \, dx\\ &=\frac {4 e}{x}+x-e x-x^2+e \log \left (2+e^x\right )-\frac {e \log \left (2+e^x\right )}{x}-e \log (x)+e \int \frac {e^x}{\left (2+e^x\right ) x} \, dx+(2 e) \int \frac {1}{\left (2+e^x\right ) x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 31, normalized size = 1.29 \begin {gather*} \frac {4 e}{x}+x-e x-x^2+\frac {e (-1+x) \log \left (2+e^x\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 42, normalized size = 1.75 \begin {gather*} -\frac {x^{3} - {\left (x - 1\right )} e \log \left ({\left (2 \, e + e^{\left (x + 1\right )}\right )} e^{\left (-1\right )}\right ) - x^{2} + {\left (x^{2} - 4\right )} e}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.46, size = 42, normalized size = 1.75 \begin {gather*} -\frac {x^{3} + x^{2} e - x e \log \left (e^{x} + 2\right ) - x^{2} + e \log \left (e^{x} + 2\right ) - 4 \, e}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 43, normalized size = 1.79
method | result | size |
norman | \(\frac {\left (1-{\mathrm e}\right ) x^{2}+{\mathrm e} x \ln \left ({\mathrm e}^{x}+2\right )-x^{3}-{\mathrm e} \ln \left ({\mathrm e}^{x}+2\right )+4 \,{\mathrm e}}{x}\) | \(43\) |
risch | \(-\frac {{\mathrm e} \ln \left ({\mathrm e}^{x}+2\right )}{x}+\frac {{\mathrm e} x \ln \left ({\mathrm e}^{x}+2\right )-x^{2} {\mathrm e}-x^{3}+x^{2}+4 \,{\mathrm e}}{x}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.58, size = 37, normalized size = 1.54 \begin {gather*} -\frac {x^{3} + x^{2} {\left (e - 1\right )} - {\left (x e - e\right )} \log \left (e^{x} + 2\right ) - 4 \, e}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.12, size = 160, normalized size = 6.67 \begin {gather*} -\frac {4\,x^3\,{\mathrm {e}}^x-16\,\mathrm {e}-4\,{\mathrm {e}}^{2\,x+1}-16\,{\mathrm {e}}^{x+1}+4\,{\mathrm {e}}^{x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+x^2\,\left (4\,\mathrm {e}-4\right )+4\,\mathrm {e}\,\ln \left ({\mathrm {e}}^x+2\right )+x^3\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{2\,x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+4\,x^3-x\,{\mathrm {e}}^{2\,x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+x^2\,{\mathrm {e}}^{2\,x}\,\left (\mathrm {e}-1\right )+x^2\,{\mathrm {e}}^x\,\left (4\,\mathrm {e}-4\right )-4\,x\,{\mathrm {e}}^{x+1}\,\ln \left ({\mathrm {e}}^x+2\right )-4\,x\,\mathrm {e}\,\ln \left ({\mathrm {e}}^x+2\right )}{4\,x+x\,{\mathrm {e}}^{2\,x}+4\,x\,{\mathrm {e}}^x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.26, size = 37, normalized size = 1.54 \begin {gather*} - x^{2} - x \left (-1 + e\right ) + e \log {\left (e^{x} + 2 \right )} - \frac {e \log {\left (e^{x} + 2 \right )}}{x} + \frac {4 e}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________