3.3.61 \(\int \frac {(2 x-x^2-x^3) \log (-2-x) \log (1-x)+\frac {e^{-x} \log (-2-x) ((-2 x-x^2) \log (-2-x)+(-x+x^2+(2+x-2 x^2-x^3) \log (-2-x)) \log (1-x))}{x \log (1-x)}}{(-2 x+x^2+x^3) \log (-2-x) \log (1-x)} \, dx\)

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]

Int[((2*x - x^2 - x^3)*Log[-2 - x]*Log[1 - x] + (Log[-2 - x]*((-2*x - x^2)*Log[-2 - x] + (-x + x^2 + (2 + x -
2*x^2 - x^3)*Log[-2 - x])*Log[1 - x]))/(E^x*x*Log[1 - x]))/((-2*x + x^2 + x^3)*Log[-2 - x]*Log[1 - x]),x]

[Out]

-x - Defer[Int][Log[-2 - x]/(E^x*(-1 + x)*Log[1 - x]^2), x] + Defer[Int][Log[-2 - x]/(E^x*x*Log[1 - x]^2), x]
+ Defer[Int][1/(E^x*x*Log[1 - x]), x]/2 - Defer[Int][1/(E^x*(2 + x)*Log[1 - x]), x]/2 - Defer[Int][Log[-2 - x]
/(E^x*x^2*Log[1 - x]), x] - Defer[Int][Log[-2 - x]/(E^x*x*Log[1 - x]), x]

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]

Integrate[((2*x - x^2 - x^3)*Log[-2 - x]*Log[1 - x] + (Log[-2 - x]*((-2*x - x^2)*Log[-2 - x] + (-x + x^2 + (2
+ x - 2*x^2 - x^3)*Log[-2 - x])*Log[1 - x]))/(E^x*x*Log[1 - x]))/((-2*x + x^2 + x^3)*Log[-2 - x]*Log[1 - x]),x
]

[Out]

-x + Log[-2 - x]/(E^x*x*Log[1 - x])

________________________________________________________________________________________

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]

integrate(((((-x^3-2*x^2+x+2)*log(-x-2)+x^2-x)*log(-x+1)+(-x^2-2*x)*log(-x-2))*exp(log(log(-x-2)/x/log(-x+1))-
x)+(-x^3-x^2+2*x)*log(-x-2)*log(-x+1))/(x^3+x^2-2*x)/log(-x-2)/log(-x+1),x, algorithm="fricas")

[Out]

-x + e^(-x + log(log(-x - 2)/(x*log(-x + 1))))

________________________________________________________________________________________

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]

integrate(((((-x^3-2*x^2+x+2)*log(-x-2)+x^2-x)*log(-x+1)+(-x^2-2*x)*log(-x-2))*exp(log(log(-x-2)/x/log(-x+1))-
x)+(-x^3-x^2+2*x)*log(-x-2)*log(-x+1))/(x^3+x^2-2*x)/log(-x-2)/log(-x+1),x, algorithm="giac")

[Out]

-(x^2*log(-x + 1) - e^(-x)*log(-x - 2))/(x*log(-x + 1))

________________________________________________________________________________________

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]

int(((((-x^3-2*x^2+x+2)*ln(-x-2)+x^2-x)*ln(1-x)+(-x^2-2*x)*ln(-x-2))*exp(ln(ln(-x-2)/x/ln(1-x))-x)+(-x^3-x^2+2
*x)*ln(-x-2)*ln(1-x))/(x^3+x^2-2*x)/ln(-x-2)/ln(1-x),x)

[Out]

int(((((-x^3-2*x^2+x+2)*ln(-x-2)+x^2-x)*ln(1-x)+(-x^2-2*x)*ln(-x-2))*exp(ln(ln(-x-2)/x/ln(1-x))-x)+(-x^3-x^2+2
*x)*ln(-x-2)*ln(1-x))/(x^3+x^2-2*x)/ln(-x-2)/ln(1-x),x)

________________________________________________________________________________________

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]

integrate(((((-x^3-2*x^2+x+2)*log(-x-2)+x^2-x)*log(-x+1)+(-x^2-2*x)*log(-x-2))*exp(log(log(-x-2)/x/log(-x+1))-
x)+(-x^3-x^2+2*x)*log(-x-2)*log(-x+1))/(x^3+x^2-2*x)/log(-x-2)/log(-x+1),x, algorithm="maxima")

[Out]

-x + e^(-x)*log(-x - 2)/(x*log(-x + 1))

________________________________________________________________________________________

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]

int(-(exp(log(log(- x - 2)/(x*log(1 - x))) - x)*(log(- x - 2)*(2*x + x^2) - log(1 - x)*(log(- x - 2)*(x - 2*x^
2 - x^3 + 2) - x + x^2)) + log(1 - x)*log(- x - 2)*(x^2 - 2*x + x^3))/(log(1 - x)*log(- x - 2)*(x^2 - 2*x + x^
3)),x)

[Out]

int(-(exp(log(log(- x - 2)/(x*log(1 - x))) - x)*(log(- x - 2)*(2*x + x^2) - log(1 - x)*(log(- x - 2)*(x - 2*x^
2 - x^3 + 2) - x + x^2)) + log(1 - x)*log(- x - 2)*(x^2 - 2*x + x^3))/(log(1 - x)*log(- x - 2)*(x^2 - 2*x + x^
3)), x)

________________________________________________________________________________________

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]

integrate(((((-x**3-2*x**2+x+2)*ln(-x-2)+x**2-x)*ln(-x+1)+(-x**2-2*x)*ln(-x-2))*exp(ln(ln(-x-2)/x/ln(-x+1))-x)
+(-x**3-x**2+2*x)*ln(-x-2)*ln(-x+1))/(x**3+x**2-2*x)/ln(-x-2)/ln(-x+1),x)

[Out]

-x + exp(-x)*log(-x - 2)/(x*log(1 - x))

________________________________________________________________________________________