Integrand size = 79, antiderivative size = 20 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=x+\left (-e^{1+x}+x\right )^2 \log ^2(-1+x) \]
[Out]
\[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=\int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \int \frac {1-x-2 \left (e^{1+x}-x\right )^2 \log (-1+x)-2 \left (-1+e^{1+x}\right ) \left (e^{1+x}-x\right ) (-1+x) \log ^2(-1+x)}{1-x} \, dx \\ & = \int \left (\frac {2 e^{2+2 x} \log (-1+x) (1-\log (-1+x)+x \log (-1+x))}{-1+x}-\frac {2 e^{1+x} \log (-1+x) \left (2 x-\log (-1+x)+x^2 \log (-1+x)\right )}{-1+x}+\frac {-1+x+2 x^2 \log (-1+x)-2 x \log ^2(-1+x)+2 x^2 \log ^2(-1+x)}{-1+x}\right ) \, dx \\ & = 2 \int \frac {e^{2+2 x} \log (-1+x) (1-\log (-1+x)+x \log (-1+x))}{-1+x} \, dx-2 \int \frac {e^{1+x} \log (-1+x) \left (2 x-\log (-1+x)+x^2 \log (-1+x)\right )}{-1+x} \, dx+\int \frac {-1+x+2 x^2 \log (-1+x)-2 x \log ^2(-1+x)+2 x^2 \log ^2(-1+x)}{-1+x} \, dx \\ & = \frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}-2 \int \left (\frac {2 e^{1+x} x \log (-1+x)}{-1+x}+e^{1+x} (1+x) \log ^2(-1+x)\right ) \, dx+\int \left (1+\frac {2 x^2 \log (-1+x)}{-1+x}+2 x \log ^2(-1+x)\right ) \, dx \\ & = x+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}+2 \int \frac {x^2 \log (-1+x)}{-1+x} \, dx+2 \int x \log ^2(-1+x) \, dx-2 \int e^{1+x} (1+x) \log ^2(-1+x) \, dx-4 \int \frac {e^{1+x} x \log (-1+x)}{-1+x} \, dx \\ & = x-4 e^{1+x} \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}+2 \int \left (\log ^2(-1+x)+(-1+x) \log ^2(-1+x)\right ) \, dx-2 \int \left (2 e^{1+x} \log ^2(-1+x)+e^{1+x} (-1+x) \log ^2(-1+x)\right ) \, dx+2 \text {Subst}\left (\int \frac {(1+x)^2 \log (x)}{x} \, dx,x,-1+x\right )+4 \int \frac {e \left (-e^x-e \text {Ei}(-1+x)\right )}{1-x} \, dx \\ & = x-4 e^{1+x} \log (-1+x)-4 (1-x) \log (-1+x)+(1-x)^2 \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)+2 \log ^2(-1+x)+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}+2 \int \log ^2(-1+x) \, dx+2 \int (-1+x) \log ^2(-1+x) \, dx-2 \int e^{1+x} (-1+x) \log ^2(-1+x) \, dx-2 \text {Subst}\left (\int \left (2+\frac {x}{2}+\frac {\log (x)}{x}\right ) \, dx,x,-1+x\right )-4 \int e^{1+x} \log ^2(-1+x) \, dx+(4 e) \int \frac {-e^x-e \text {Ei}(-1+x)}{1-x} \, dx \\ & = -\frac {1}{2} (1-x)^2-3 x-4 e^{1+x} \log (-1+x)-4 (1-x) \log (-1+x)+(1-x)^2 \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)+2 \log ^2(-1+x)+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}-2 \int e^{1+x} (-1+x) \log ^2(-1+x) \, dx-2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,-1+x\right )+2 \text {Subst}\left (\int \log ^2(x) \, dx,x,-1+x\right )+2 \text {Subst}\left (\int x \log ^2(x) \, dx,x,-1+x\right )-4 \int e^{1+x} \log ^2(-1+x) \, dx+(4 e) \int \left (\frac {e^x}{-1+x}+\frac {e \text {Ei}(-1+x)}{-1+x}\right ) \, dx \\ & = -\frac {1}{2} (1-x)^2-3 x-4 e^{1+x} \log (-1+x)-4 (1-x) \log (-1+x)+(1-x)^2 \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)+\log ^2(-1+x)-2 (1-x) \log ^2(-1+x)+(1-x)^2 \log ^2(-1+x)+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}-2 \int e^{1+x} (-1+x) \log ^2(-1+x) \, dx-2 \text {Subst}(\int x \log (x) \, dx,x,-1+x)-4 \int e^{1+x} \log ^2(-1+x) \, dx-4 \text {Subst}(\int \log (x) \, dx,x,-1+x)+(4 e) \int \frac {e^x}{-1+x} \, dx+\left (4 e^2\right ) \int \frac {\text {Ei}(-1+x)}{-1+x} \, dx \\ & = x+4 e^2 \text {Ei}(-1+x)-4 e^{1+x} \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)+\log ^2(-1+x)-2 (1-x) \log ^2(-1+x)+(1-x)^2 \log ^2(-1+x)+\frac {e^{2+2 x} \log (-1+x) (\log (-1+x)-x \log (-1+x))}{1-x}-2 \int e^{1+x} (-1+x) \log ^2(-1+x) \, dx-4 \int e^{1+x} \log ^2(-1+x) \, dx+\left (4 e^2\right ) \int \frac {\text {Ei}(-1+x)}{-1+x} \, dx \\ \end{align*}
Time = 0.60 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=x+\left (e^{1+x}-x\right )^2 \log ^2(-1+x) \]
[In]
[Out]
Time = 0.49 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.35
method | result | size |
risch | \(\left (x^{2}-2 x \,{\mathrm e}^{1+x}+{\mathrm e}^{2+2 x}\right ) \ln \left (-1+x \right )^{2}+x\) | \(27\) |
parallelrisch | \(\ln \left (-1+x \right )^{2} x^{2}-2 \,{\mathrm e}^{1+x} \ln \left (-1+x \right )^{2} x +\ln \left (-1+x \right )^{2} {\mathrm e}^{2+2 x}+x +\frac {1}{2}\) | \(40\) |
default | \(x +\ln \left (-1+x \right )^{2} {\mathrm e}^{2+2 x}-2 \,{\mathrm e}^{1+x} \ln \left (-1+x \right )^{2} x +\left (-1+x \right )^{2} \ln \left (-1+x \right )^{2}+2 \left (-1+x \right ) \ln \left (-1+x \right )^{2}+\ln \left (-1+x \right )^{2}\) | \(58\) |
parts | \(x +\ln \left (-1+x \right )^{2} {\mathrm e}^{2+2 x}-2 \,{\mathrm e}^{1+x} \ln \left (-1+x \right )^{2} x +\left (-1+x \right )^{2} \ln \left (-1+x \right )^{2}+2 \left (-1+x \right ) \ln \left (-1+x \right )^{2}+\ln \left (-1+x \right )^{2}\) | \(58\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.30 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx={\left (x^{2} - 2 \, x e^{\left (x + 1\right )} + e^{\left (2 \, x + 2\right )}\right )} \log \left (x - 1\right )^{2} + x \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (15) = 30\).
Time = 0.21 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.95 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=x^{2} \log {\left (x - 1 \right )}^{2} - 2 x e^{x + 1} \log {\left (x - 1 \right )}^{2} + x + e^{2 x + 2} \log {\left (x - 1 \right )}^{2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (19) = 38\).
Time = 0.26 (sec) , antiderivative size = 107, normalized size of antiderivative = 5.35 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=\frac {1}{2} \, {\left (2 \, \log \left (x - 1\right )^{2} - 2 \, \log \left (x - 1\right ) + 1\right )} {\left (x - 1\right )}^{2} - {\left (2 \, x e^{\left (x + 1\right )} - e^{\left (2 \, x + 2\right )}\right )} \log \left (x - 1\right )^{2} + 2 \, {\left (\log \left (x - 1\right )^{2} - 2 \, \log \left (x - 1\right ) + 2\right )} {\left (x - 1\right )} - \frac {1}{2} \, x^{2} + {\left (x^{2} + 2 \, x + 2 \, \log \left (x - 1\right )\right )} \log \left (x - 1\right ) - \log \left (x - 1\right )^{2} - 2 \, x - 3 \, \log \left (x - 1\right ) \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.90 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx=x^{2} \log \left (x - 1\right )^{2} - 2 \, x e^{\left (x + 1\right )} \log \left (x - 1\right )^{2} + e^{\left (2 \, x + 2\right )} \log \left (x - 1\right )^{2} + x \]
[In]
[Out]
Time = 11.21 (sec) , antiderivative size = 41, normalized size of antiderivative = 2.05 \[ \int \frac {-1+x+\left (2 e^{2+2 x}-4 e^{1+x} x+2 x^2\right ) \log (-1+x)+\left (-2 x+2 x^2+e^{2+2 x} (-2+2 x)+e^{1+x} \left (2-2 x^2\right )\right ) \log ^2(-1+x)}{-1+x} \, dx={\ln \left (x-1\right )}^2\,{\mathrm {e}}^{2\,x+2}-x\,\left (2\,{\ln \left (x-1\right )}^2\,{\mathrm {e}}^{x+1}-1\right )+x^2\,{\ln \left (x-1\right )}^2 \]
[In]
[Out]