Optimal. Leaf size=28 \[ 3-x+\frac {e^{-x} \log (-2-x)}{x \log (1-x)} \]
________________________________________________________________________________________
Rubi [F] time = 13.63, 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 {\left (2 x-x^2-x^3\right ) \log (-2-x) \log (1-x)+\frac {e^{-x} \log (-2-x) \left (\left (-2 x-x^2\right ) \log (-2-x)+\left (-x+x^2+\left (2+x-2 x^2-x^3\right ) \log (-2-x)\right ) \log (1-x)\right )}{x \log (1-x)}}{\left (-2 x+x^2+x^3\right ) \log (-2-x) \log (1-x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (2 x-x^2-x^3\right ) \log (-2-x) \log (1-x)+\frac {e^{-x} \log (-2-x) \left (\left (-2 x-x^2\right ) \log (-2-x)+\left (-x+x^2+\left (2+x-2 x^2-x^3\right ) \log (-2-x)\right ) \log (1-x)\right )}{x \log (1-x)}}{x \left (-2+x+x^2\right ) \log (-2-x) \log (1-x)} \, dx\\ &=\int \frac {e^{-x} \left ((-1+x) x \log (1-x) \left (-1+e^x x (2+x) \log (1-x)\right )+(2+x) \log (-2-x) \left (x+\left (-1+x^2\right ) \log (1-x)\right )\right )}{x^2 \left (2-x-x^2\right ) \log ^2(1-x)} \, dx\\ &=\int \left (-1+\frac {e^{-x} \left (-2 x \log (-2-x)-x^2 \log (-2-x)-x \log (1-x)+x^2 \log (1-x)+2 \log (-2-x) \log (1-x)+x \log (-2-x) \log (1-x)-2 x^2 \log (-2-x) \log (1-x)-x^3 \log (-2-x) \log (1-x)\right )}{(-1+x) x^2 (2+x) \log ^2(1-x)}\right ) \, dx\\ &=-x+\int \frac {e^{-x} \left (-2 x \log (-2-x)-x^2 \log (-2-x)-x \log (1-x)+x^2 \log (1-x)+2 \log (-2-x) \log (1-x)+x \log (-2-x) \log (1-x)-2 x^2 \log (-2-x) \log (1-x)-x^3 \log (-2-x) \log (1-x)\right )}{(-1+x) x^2 (2+x) \log ^2(1-x)} \, dx\\ &=-x+\int \frac {e^{-x} \left (-((-1+x) x \log (1-x))+(2+x) \log (-2-x) \left (x+\left (-1+x^2\right ) \log (1-x)\right )\right )}{x^2 \left (2-x-x^2\right ) \log ^2(1-x)} \, dx\\ &=-x+\int \left (-\frac {e^{-x} \log (-2-x)}{(-1+x) x \log ^2(1-x)}+\frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{x^2 (2+x) \log (1-x)}\right ) \, dx\\ &=-x-\int \frac {e^{-x} \log (-2-x)}{(-1+x) x \log ^2(1-x)} \, dx+\int \frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{x^2 (2+x) \log (1-x)} \, dx\\ &=-x-\int \left (\frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)}-\frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)}\right ) \, dx+\int \frac {e^{-x} \left (x-\left (2+3 x+x^2\right ) \log (-2-x)\right )}{x^2 (2+x) \log (1-x)} \, dx\\ &=-x+\int \left (\frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{2 x^2 \log (1-x)}+\frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{4 (2+x) \log (1-x)}+\frac {e^{-x} \left (-x+2 \log (-2-x)+3 x \log (-2-x)+x^2 \log (-2-x)\right )}{4 x \log (1-x)}\right ) \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx\\ &=-x+\frac {1}{4} \int \frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{(2+x) \log (1-x)} \, dx+\frac {1}{4} \int \frac {e^{-x} \left (-x+2 \log (-2-x)+3 x \log (-2-x)+x^2 \log (-2-x)\right )}{x \log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x} \left (x-2 \log (-2-x)-3 x \log (-2-x)-x^2 \log (-2-x)\right )}{x^2 \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx\\ &=-x+\frac {1}{4} \int \frac {e^{-x} \left (x-\left (2+3 x+x^2\right ) \log (-2-x)\right )}{(2+x) \log (1-x)} \, dx+\frac {1}{4} \int \frac {e^{-x} \left (-x+\left (2+3 x+x^2\right ) \log (-2-x)\right )}{x \log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x} \left (x-\left (2+3 x+x^2\right ) \log (-2-x)\right )}{x^2 \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx\\ &=-x+\frac {1}{4} \int \left (-\frac {e^{-x}}{\log (1-x)}+\frac {3 e^{-x} \log (-2-x)}{\log (1-x)}+\frac {2 e^{-x} \log (-2-x)}{x \log (1-x)}+\frac {e^{-x} x \log (-2-x)}{\log (1-x)}\right ) \, dx+\frac {1}{4} \int \left (\frac {e^{-x} x}{(2+x) \log (1-x)}-\frac {2 e^{-x} \log (-2-x)}{(2+x) \log (1-x)}-\frac {3 e^{-x} x \log (-2-x)}{(2+x) \log (1-x)}-\frac {e^{-x} x^2 \log (-2-x)}{(2+x) \log (1-x)}\right ) \, dx+\frac {1}{2} \int \left (\frac {e^{-x}}{x \log (1-x)}-\frac {e^{-x} \log (-2-x)}{\log (1-x)}-\frac {2 e^{-x} \log (-2-x)}{x^2 \log (1-x)}-\frac {3 e^{-x} \log (-2-x)}{x \log (1-x)}\right ) \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx\\ &=-x-\frac {1}{4} \int \frac {e^{-x}}{\log (1-x)} \, dx+\frac {1}{4} \int \frac {e^{-x} x}{(2+x) \log (1-x)} \, dx+\frac {1}{4} \int \frac {e^{-x} x \log (-2-x)}{\log (1-x)} \, dx-\frac {1}{4} \int \frac {e^{-x} x^2 \log (-2-x)}{(2+x) \log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x}}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{\log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{(2+x) \log (1-x)} \, dx+\frac {3}{4} \int \frac {e^{-x} \log (-2-x)}{\log (1-x)} \, dx-\frac {3}{4} \int \frac {e^{-x} x \log (-2-x)}{(2+x) \log (1-x)} \, dx-\frac {3}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{x^2 \log (1-x)} \, dx\\ &=-x+\frac {1}{4} \int \left (\frac {e^{-x}}{\log (1-x)}-\frac {2 e^{-x}}{(2+x) \log (1-x)}\right ) \, dx-\frac {1}{4} \int \left (-\frac {2 e^{-x} \log (-2-x)}{\log (1-x)}+\frac {e^{-x} x \log (-2-x)}{\log (1-x)}+\frac {4 e^{-x} \log (-2-x)}{(2+x) \log (1-x)}\right ) \, dx-\frac {1}{4} \int \frac {e^{-x}}{\log (1-x)} \, dx+\frac {1}{4} \int \frac {e^{-x} x \log (-2-x)}{\log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x}}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{\log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{(2+x) \log (1-x)} \, dx-\frac {3}{4} \int \left (\frac {e^{-x} \log (-2-x)}{\log (1-x)}-\frac {2 e^{-x} \log (-2-x)}{(2+x) \log (1-x)}\right ) \, dx+\frac {3}{4} \int \frac {e^{-x} \log (-2-x)}{\log (1-x)} \, dx-\frac {3}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{x^2 \log (1-x)} \, dx\\ &=-x+\frac {1}{2} \int \frac {e^{-x}}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x}}{(2+x) \log (1-x)} \, dx+\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx-\frac {1}{2} \int \frac {e^{-x} \log (-2-x)}{(2+x) \log (1-x)} \, dx-\frac {3}{2} \int \frac {e^{-x} \log (-2-x)}{x \log (1-x)} \, dx+\frac {3}{2} \int \frac {e^{-x} \log (-2-x)}{(2+x) \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(-1+x) \log ^2(1-x)} \, dx+\int \frac {e^{-x} \log (-2-x)}{x \log ^2(1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{x^2 \log (1-x)} \, dx-\int \frac {e^{-x} \log (-2-x)}{(2+x) \log (1-x)} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 1.21, size = 27, normalized size = 0.96 \begin {gather*} -x+\frac {e^{-x} \log (-2-x)}{x \log (1-x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.84, size = 28, normalized size = 1.00 \begin {gather*} -x + e^{\left (-x + \log \left (\frac {\log \left (-x - 2\right )}{x \log \left (-x + 1\right )}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.48, size = 36, normalized size = 1.29 \begin {gather*} -\frac {x^{2} \log \left (-x + 1\right ) - e^{\left (-x\right )} \log \left (-x - 2\right )}{x \log \left (-x + 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {\left (\left (\left (-x^{3}-2 x^{2}+x +2\right ) \ln \left (-x -2\right )+x^{2}-x \right ) \ln \left (1-x \right )+\left (-x^{2}-2 x \right ) \ln \left (-x -2\right )\right ) {\mathrm e}^{\ln \left (\frac {\ln \left (-x -2\right )}{x \ln \left (1-x \right )}\right )-x}+\left (-x^{3}-x^{2}+2 x \right ) \ln \left (-x -2\right ) \ln \left (1-x \right )}{\left (x^{3}+x^{2}-2 x \right ) \ln \left (-x -2\right ) \ln \left (1-x \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.67, size = 26, normalized size = 0.93 \begin {gather*} -x + \frac {e^{\left (-x\right )} \log \left (-x - 2\right )}{x \log \left (-x + 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int -\frac {{\mathrm {e}}^{\ln \left (\frac {\ln \left (-x-2\right )}{x\,\ln \left (1-x\right )}\right )-x}\,\left (\ln \left (-x-2\right )\,\left (x^2+2\,x\right )-\ln \left (1-x\right )\,\left (\ln \left (-x-2\right )\,\left (-x^3-2\,x^2+x+2\right )-x+x^2\right )\right )+\ln \left (1-x\right )\,\ln \left (-x-2\right )\,\left (x^3+x^2-2\,x\right )}{\ln \left (1-x\right )\,\ln \left (-x-2\right )\,\left (x^3+x^2-2\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.49, size = 17, normalized size = 0.61 \begin {gather*} - x + \frac {e^{- x} \log {\left (- x - 2 \right )}}{x \log {\left (1 - x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________