Optimal. Leaf size=24 \[ 5-\frac {1-\log \left (e^x+x\right )}{-4+2 x}+\log (\log (50)) \]
________________________________________________________________________________________
Rubi [A] time = 0.93, antiderivative size = 29, normalized size of antiderivative = 1.21, number of steps used = 15, number of rules used = 5, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6688, 12, 6742, 43, 2551} \begin {gather*} \frac {1}{2 (2-x)}-\frac {\log \left (x+e^x\right )}{2 (2-x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2551
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (2+e^x\right ) (-1+x)-\left (e^x+x\right ) \log \left (e^x+x\right )}{2 (2-x)^2 \left (e^x+x\right )} \, dx\\ &=\frac {1}{2} \int \frac {\left (2+e^x\right ) (-1+x)-\left (e^x+x\right ) \log \left (e^x+x\right )}{(2-x)^2 \left (e^x+x\right )} \, dx\\ &=\frac {1}{2} \int \left (-\frac {-1+x}{(-2+x) \left (e^x+x\right )}+\frac {-1+x-\log \left (e^x+x\right )}{(-2+x)^2}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {-1+x}{(-2+x) \left (e^x+x\right )} \, dx\right )+\frac {1}{2} \int \frac {-1+x-\log \left (e^x+x\right )}{(-2+x)^2} \, dx\\ &=-\left (\frac {1}{2} \int \left (\frac {1}{e^x+x}+\frac {1}{(-2+x) \left (e^x+x\right )}\right ) \, dx\right )+\frac {1}{2} \int \left (\frac {-1+x}{(-2+x)^2}-\frac {\log \left (e^x+x\right )}{(-2+x)^2}\right ) \, dx\\ &=\frac {1}{2} \int \frac {-1+x}{(-2+x)^2} \, dx-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \frac {\log \left (e^x+x\right )}{(-2+x)^2} \, dx\\ &=-\frac {\log \left (e^x+x\right )}{2 (2-x)}+\frac {1}{2} \int \left (\frac {1}{(-2+x)^2}+\frac {1}{-2+x}\right ) \, dx-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \frac {1+e^x}{(-2+x) \left (e^x+x\right )} \, dx\\ &=\frac {1}{2 (2-x)}+\frac {1}{2} \log (2-x)-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \left (\frac {1}{-2+x}-\frac {-1+x}{(-2+x) \left (e^x+x\right )}\right ) \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx+\frac {1}{2} \int \frac {-1+x}{(-2+x) \left (e^x+x\right )} \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx+\frac {1}{2} \int \left (\frac {1}{e^x+x}+\frac {1}{(-2+x) \left (e^x+x\right )}\right ) \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 17, normalized size = 0.71 \begin {gather*} \frac {-1+\log \left (e^x+x\right )}{2 (-2+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 14, normalized size = 0.58 \begin {gather*} \frac {\log \left (x + e^{x}\right ) - 1}{2 \, {\left (x - 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 14, normalized size = 0.58 \begin {gather*} \frac {\log \left (x + e^{x}\right ) - 1}{2 \, {\left (x - 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 16, normalized size = 0.67
method | result | size |
norman | \(\frac {\frac {\ln \left ({\mathrm e}^{x}+x \right )}{2}-\frac {1}{2}}{x -2}\) | \(16\) |
risch | \(\frac {\ln \left ({\mathrm e}^{x}+x \right )}{2 x -4}-\frac {1}{2 \left (x -2\right )}\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.68, size = 14, normalized size = 0.58 \begin {gather*} \frac {\log \left (x + e^{x}\right ) - 1}{2 \, {\left (x - 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.93, size = 15, normalized size = 0.62 \begin {gather*} \frac {\ln \left (x+{\mathrm {e}}^x\right )-1}{2\,\left (x-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 17, normalized size = 0.71 \begin {gather*} \frac {\log {\left (x + e^{x} \right )}}{2 x - 4} - \frac {1}{2 x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________