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

Optimal. Leaf size=20 \[ x+\left (-e^{1+x}+x\right )^2 \log ^2(-1+x) \]

________________________________________________________________________________________

Rubi [F]  time = 1.45, 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 {-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 \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

\begin {gather*} \begin {aligned} \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 \operatorname {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 e^2 \text {Ei}(-1+x) \log (-1+x)-\left (4 (1-x)-(-1+x)^2-2 \log (-1+x)\right ) \log (-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 \operatorname {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 e^2 \text {Ei}(-1+x) \log (-1+x)-\left (4 (1-x)-(-1+x)^2-2 \log (-1+x)\right ) \log (-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 \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,-1+x\right )+2 \operatorname {Subst}\left (\int \log ^2(x) \, dx,x,-1+x\right )+2 \operatorname {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 e^2 \text {Ei}(-1+x) \log (-1+x)-\left (4 (1-x)-(-1+x)^2-2 \log (-1+x)\right ) \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 \operatorname {Subst}(\int x \log (x) \, dx,x,-1+x)-4 \int e^{1+x} \log ^2(-1+x) \, dx-4 \operatorname {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 (1-x) \log (-1+x)-(1-x)^2 \log (-1+x)-4 e^2 \text {Ei}(-1+x) \log (-1+x)-\left (4 (1-x)-(-1+x)^2-2 \log (-1+x)\right ) \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.43, size = 20, normalized size = 1.00 \begin {gather*} x+\left (e^{1+x}-x\right )^2 \log ^2(-1+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 26, normalized size = 1.30 \begin {gather*} {\left (x^{2} - 2 \, x e^{\left (x + 1\right )} + e^{\left (2 \, x + 2\right )}\right )} \log \left (x - 1\right )^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 38, normalized size = 1.90 \begin {gather*} 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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.39, size = 27, normalized size = 1.35




method result size



risch \(\left (x^{2}-2 x \,{\mathrm e}^{x +1}+{\mathrm e}^{2 x +2}\right ) \ln \left (x -1\right )^{2}+x\) \(27\)
default \(x +{\mathrm e}^{2 x +2} \ln \left (x -1\right )^{2}-2 \,{\mathrm e}^{x +1} \ln \left (x -1\right )^{2} x +\left (x -1\right )^{2} \ln \left (x -1\right )^{2}+2 \left (x -1\right ) \ln \left (x -1\right )^{2}+\ln \left (x -1\right )^{2}\) \(58\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((2*x-2)*exp(x+1)^2+(-2*x^2+2)*exp(x+1)+2*x^2-2*x)*ln(x-1)^2+(2*exp(x+1)^2-4*x*exp(x+1)+2*x^2)*ln(x-1)+x-
1)/(x-1),x,method=_RETURNVERBOSE)

[Out]

(x^2-2*x*exp(x+1)+exp(2*x+2))*ln(x-1)^2+x

________________________________________________________________________________________

maxima [B]  time = 0.45, size = 107, normalized size = 5.35 \begin {gather*} \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 ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.47, size = 41, normalized size = 2.05 \begin {gather*} {\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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x + log(x - 1)*(2*exp(2*x + 2) - 4*x*exp(x + 1) + 2*x^2) - log(x - 1)^2*(2*x - exp(2*x + 2)*(2*x - 2) + e
xp(x + 1)*(2*x^2 - 2) - 2*x^2) - 1)/(x - 1),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.44, size = 39, normalized size = 1.95 \begin {gather*} 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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________