Optimal. Leaf size=27 \[ x \log \left (-x+\frac {1-e^x x-e^x x^2}{x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.32, antiderivative size = 21, normalized size of antiderivative = 0.78, number of steps used = 16, number of rules used = 5, integrand size = 75, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {6741, 6742, 6688, 77, 2548} \begin {gather*} x \log \left (\frac {(x+1) \left (-e^x x-x+1\right )}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 2548
Rule 6688
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-1-x^2-e^x \left (2 x^2+x^3\right )-\left (-1+x^2+e^x \left (x+x^2\right )\right ) \log \left (\frac {1-x^2+e^x \left (-x-x^2\right )}{x}\right )}{(1+x) \left (1-x-e^x x\right )} \, dx\\ &=\int \left (-\frac {-1-x+x^2}{-1+x+e^x x}+\frac {2 x+x^2+\log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right )+x \log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right )}{1+x}\right ) \, dx\\ &=-\int \frac {-1-x+x^2}{-1+x+e^x x} \, dx+\int \frac {2 x+x^2+\log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right )+x \log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right )}{1+x} \, dx\\ &=-\int \left (-\frac {1}{-1+x+e^x x}-\frac {x}{-1+x+e^x x}+\frac {x^2}{-1+x+e^x x}\right ) \, dx+\int \left (\frac {x (2+x)}{1+x}+\log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right )\right ) \, dx\\ &=\int \frac {x (2+x)}{1+x} \, dx+\int \frac {1}{-1+x+e^x x} \, dx+\int \frac {x}{-1+x+e^x x} \, dx-\int \frac {x^2}{-1+x+e^x x} \, dx+\int \log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right ) \, dx\\ &=x \log \left (\frac {(1+x) \left (1-x-e^x x\right )}{x}\right )+\int \left (1+\frac {1}{-1-x}+x\right ) \, dx+\int \frac {1}{-1+x+e^x x} \, dx+\int \frac {x}{-1+x+e^x x} \, dx-\int \frac {x^2}{-1+x+e^x x} \, dx-\int \frac {-1-\left (1+2 e^x\right ) x^2-e^x x^3}{(1+x) \left (1-x-e^x x\right )} \, dx\\ &=x+\frac {x^2}{2}-\log (1+x)+x \log \left (\frac {(1+x) \left (1-x-e^x x\right )}{x}\right )+\int \frac {1}{-1+x+e^x x} \, dx+\int \frac {x}{-1+x+e^x x} \, dx-\int \frac {x^2}{-1+x+e^x x} \, dx-\int \left (\frac {x (2+x)}{1+x}-\frac {-1-x+x^2}{-1+x+e^x x}\right ) \, dx\\ &=x+\frac {x^2}{2}-\log (1+x)+x \log \left (\frac {(1+x) \left (1-x-e^x x\right )}{x}\right )-\int \frac {x (2+x)}{1+x} \, dx+\int \frac {1}{-1+x+e^x x} \, dx+\int \frac {x}{-1+x+e^x x} \, dx-\int \frac {x^2}{-1+x+e^x x} \, dx+\int \frac {-1-x+x^2}{-1+x+e^x x} \, dx\\ &=x+\frac {x^2}{2}-\log (1+x)+x \log \left (\frac {(1+x) \left (1-x-e^x x\right )}{x}\right )-\int \left (1+\frac {1}{-1-x}+x\right ) \, dx+\int \frac {1}{-1+x+e^x x} \, dx+\int \frac {x}{-1+x+e^x x} \, dx-\int \frac {x^2}{-1+x+e^x x} \, dx+\int \left (-\frac {1}{-1+x+e^x x}-\frac {x}{-1+x+e^x x}+\frac {x^2}{-1+x+e^x x}\right ) \, dx\\ &=x \log \left (\frac {(1+x) \left (1-x-e^x x\right )}{x}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.19, size = 19, normalized size = 0.70 \begin {gather*} x \log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 21, normalized size = 0.78 \begin {gather*} x \log \left (-\frac {x^{2} + {\left (x^{2} + x\right )} e^{x} - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 23, normalized size = 0.85 \begin {gather*} x \log \left (-\frac {x^{2} e^{x} + x^{2} + x e^{x} - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 27, normalized size = 1.00
method | result | size |
norman | \(x \ln \left (\frac {\left (-x^{2}-x \right ) {\mathrm e}^{x}-x^{2}+1}{x}\right )\) | \(27\) |
risch | \(x \ln \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )-x \ln \relax (x )-\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}}{2}-i \pi x \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}+\frac {i \pi x \,\mathrm {csgn}\left (i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{3}}{2}+i \pi x\) | \(217\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 25, normalized size = 0.93 \begin {gather*} x \log \left (-x e^{x} - x + 1\right ) + x \log \left (x + 1\right ) - x \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.48, size = 21, normalized size = 0.78 \begin {gather*} x\,\ln \left (-\frac {x^2+{\mathrm {e}}^x\,\left (x^2+x\right )-1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.94, size = 42, normalized size = 1.56 \begin {gather*} \left (x + \frac {1}{6}\right ) \log {\left (\frac {- x^{2} + \left (- x^{2} - x\right ) e^{x} + 1}{x} \right )} - \frac {\log {\left (6 x + 6 \right )}}{6} - \frac {\log {\left (e^{x} + \frac {x - 1}{x} \right )}}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________