3.94.69 \(\int \frac {e^{-2 x} (-4+14 x-8 x^2+e (-16+18 x-4 x^2)+e^{2 x} (-4 x+5 x^2+e (3-6 x+2 x^2))+(-2+6 x-4 x^2+e (-4+4 x)+e^{2 x} (e (1-x)-2 x+2 x^2)) \log (1-x))}{-1+x} \, dx\)

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

________________________________________________________________________________________

Rubi [C]  time = 3.88, antiderivative size = 167, normalized size of antiderivative = 4.91, number of steps used = 43, number of rules used = 11, integrand size = 106, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.104, Rules used = {6742, 2178, 2199, 2194, 2176, 2554, 12, 6688, 698, 2395, 43} \begin {gather*} \frac {2 \text {Ei}(2-2 x)}{e}-\frac {2 \text {Ei}(2 (1-x))}{e}+\frac {1}{2} (5+2 e) x^2-\frac {1}{8} (e-2 x)^2-6 e^{1-2 x}+2 e^{1-2 x} x+4 e^{-2 x} x-\frac {1}{2} (2-e) x+(1-4 e) x+\frac {1}{4} (e-2 x)^2 \log (1-x)-2 e^{1-2 x} \log (1-x)+2 e^{-2 x} x \log (1-x)-\frac {1}{4} (2-e)^2 \log (1-x)+(1-e) \log (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-4 + 14*x - 8*x^2 + E*(-16 + 18*x - 4*x^2) + E^(2*x)*(-4*x + 5*x^2 + E*(3 - 6*x + 2*x^2)) + (-2 + 6*x - 4
*x^2 + E*(-4 + 4*x) + E^(2*x)*(E*(1 - x) - 2*x + 2*x^2))*Log[1 - x])/(E^(2*x)*(-1 + x)),x]

[Out]

-6*E^(1 - 2*x) - (E - 2*x)^2/8 + (1 - 4*E)*x - ((2 - E)*x)/2 + 2*E^(1 - 2*x)*x + (4*x)/E^(2*x) + ((5 + 2*E)*x^
2)/2 + (2*ExpIntegralEi[2 - 2*x])/E - (2*ExpIntegralEi[2*(1 - x)])/E + (1 - E)*Log[1 - x] - ((2 - E)^2*Log[1 -
 x])/4 - 2*E^(1 - 2*x)*Log[1 - x] + ((E - 2*x)^2*Log[1 - x])/4 + (2*x*Log[1 - x])/E^(2*x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {4 e^{-2 x}}{-1+x}+\frac {14 e^{-2 x} x}{-1+x}-\frac {8 e^{-2 x} x^2}{-1+x}-\frac {2 e^{1-2 x} \left (8-9 x+2 x^2\right )}{-1+x}+4 e^{1-2 x} \log (1-x)-\frac {2 e^{-2 x} \log (1-x)}{-1+x}+\frac {6 e^{-2 x} x \log (1-x)}{-1+x}-\frac {4 e^{-2 x} x^2 \log (1-x)}{-1+x}+\frac {-3 e+4 \left (1+\frac {3 e}{2}\right ) x-5 \left (1+\frac {2 e}{5}\right ) x^2-e \log (1-x)+2 \left (1+\frac {e}{2}\right ) x \log (1-x)-2 x^2 \log (1-x)}{1-x}\right ) \, dx\\ &=-\left (2 \int \frac {e^{1-2 x} \left (8-9 x+2 x^2\right )}{-1+x} \, dx\right )-2 \int \frac {e^{-2 x} \log (1-x)}{-1+x} \, dx-4 \int \frac {e^{-2 x}}{-1+x} \, dx+4 \int e^{1-2 x} \log (1-x) \, dx-4 \int \frac {e^{-2 x} x^2 \log (1-x)}{-1+x} \, dx+6 \int \frac {e^{-2 x} x \log (1-x)}{-1+x} \, dx-8 \int \frac {e^{-2 x} x^2}{-1+x} \, dx+14 \int \frac {e^{-2 x} x}{-1+x} \, dx+\int \frac {-3 e+4 \left (1+\frac {3 e}{2}\right ) x-5 \left (1+\frac {2 e}{5}\right ) x^2-e \log (1-x)+2 \left (1+\frac {e}{2}\right ) x \log (1-x)-2 x^2 \log (1-x)}{1-x} \, dx\\ &=-\frac {4 \text {Ei}(2 (1-x))}{e^2}-2 e^{1-2 x} \log (1-x)+2 e^{-2 x} x \log (1-x)-2 \int \left (-7 e^{1-2 x}+\frac {e^{1-2 x}}{-1+x}+2 e^{1-2 x} x\right ) \, dx+2 \int \frac {\text {Ei}(2-2 x)}{e^2 (-1+x)} \, dx-4 \int \frac {e^{1-2 x}}{2-2 x} \, dx+4 \int \frac {e^{-2 x} (3+2 x)-\frac {4 \text {Ei}(2-2 x)}{e^2}}{4 (1-x)} \, dx-6 \int \frac {e^{-2 x}-\frac {2 \text {Ei}(2-2 x)}{e^2}}{2-2 x} \, dx-8 \int \left (e^{-2 x}+\frac {e^{-2 x}}{-1+x}+e^{-2 x} x\right ) \, dx+14 \int \left (e^{-2 x}+\frac {e^{-2 x}}{-1+x}\right ) \, dx+\int \frac {-x (-4+5 x)-e \left (3-6 x+2 x^2\right )+(e-2 x) (-1+x) \log (1-x)}{1-x} \, dx\\ &=\frac {2 \text {Ei}(2-2 x)}{e}-\frac {4 \text {Ei}(2 (1-x))}{e^2}-2 e^{1-2 x} \log (1-x)+2 e^{-2 x} x \log (1-x)-2 \int \frac {e^{1-2 x}}{-1+x} \, dx-4 \int e^{1-2 x} x \, dx-6 \int \left (-\frac {e^{-2 x}}{2 (-1+x)}+\frac {\text {Ei}(2-2 x)}{e^2 (-1+x)}\right ) \, dx-8 \int e^{-2 x} \, dx-8 \int \frac {e^{-2 x}}{-1+x} \, dx-8 \int e^{-2 x} x \, dx+14 \int e^{1-2 x} \, dx+14 \int e^{-2 x} \, dx+14 \int \frac {e^{-2 x}}{-1+x} \, dx+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\int \frac {e^{-2 x} (3+2 x)-\frac {4 \text {Ei}(2-2 x)}{e^2}}{1-x} \, dx+\int \left (\frac {-3 e+2 (2+3 e) x-(5+2 e) x^2}{1-x}-(e-2 x) \log (1-x)\right ) \, dx\\ &=-7 e^{1-2 x}-3 e^{-2 x}+2 e^{1-2 x} x+4 e^{-2 x} x+\frac {2 \text {Ei}(2-2 x)}{e}+\frac {2 \text {Ei}(2 (1-x))}{e^2}-\frac {2 \text {Ei}(2 (1-x))}{e}-2 e^{1-2 x} \log (1-x)+2 e^{-2 x} x \log (1-x)-2 \int e^{1-2 x} \, dx+3 \int \frac {e^{-2 x}}{-1+x} \, dx-4 \int e^{-2 x} \, dx+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\frac {6 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\int \frac {-3 e+2 (2+3 e) x-(5+2 e) x^2}{1-x} \, dx+\int \left (-\frac {e^{-2 x} (3+2 x)}{-1+x}+\frac {4 \text {Ei}(2-2 x)}{e^2 (-1+x)}\right ) \, dx-\int (e-2 x) \log (1-x) \, dx\\ &=-6 e^{1-2 x}-e^{-2 x}+2 e^{1-2 x} x+4 e^{-2 x} x+\frac {2 \text {Ei}(2-2 x)}{e}+\frac {5 \text {Ei}(2 (1-x))}{e^2}-\frac {2 \text {Ei}(2 (1-x))}{e}-2 e^{1-2 x} \log (1-x)+\frac {1}{4} (e-2 x)^2 \log (1-x)+2 e^{-2 x} x \log (1-x)+\frac {1}{4} \int \frac {(e-2 x)^2}{1-x} \, dx+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\frac {4 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\frac {6 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\int \frac {e^{-2 x} (3+2 x)}{-1+x} \, dx+\int \left (1-4 e+\frac {1-e}{-1+x}+(5+2 e) x\right ) \, dx\\ &=-6 e^{1-2 x}-e^{-2 x}+(1-4 e) x+2 e^{1-2 x} x+4 e^{-2 x} x+\frac {1}{2} (5+2 e) x^2+\frac {2 \text {Ei}(2-2 x)}{e}+\frac {5 \text {Ei}(2 (1-x))}{e^2}-\frac {2 \text {Ei}(2 (1-x))}{e}+(1-e) \log (1-x)-2 e^{1-2 x} \log (1-x)+\frac {1}{4} (e-2 x)^2 \log (1-x)+2 e^{-2 x} x \log (1-x)+\frac {1}{4} \int \left (2 (-2+e)+2 (e-2 x)+\frac {(-2+e)^2}{1-x}\right ) \, dx+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\frac {4 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\frac {6 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\int \left (2 e^{-2 x}+\frac {5 e^{-2 x}}{-1+x}\right ) \, dx\\ &=-6 e^{1-2 x}-e^{-2 x}-\frac {1}{8} (e-2 x)^2+(1-4 e) x-\frac {1}{2} (2-e) x+2 e^{1-2 x} x+4 e^{-2 x} x+\frac {1}{2} (5+2 e) x^2+\frac {2 \text {Ei}(2-2 x)}{e}+\frac {5 \text {Ei}(2 (1-x))}{e^2}-\frac {2 \text {Ei}(2 (1-x))}{e}+(1-e) \log (1-x)-\frac {1}{4} (2-e)^2 \log (1-x)-2 e^{1-2 x} \log (1-x)+\frac {1}{4} (e-2 x)^2 \log (1-x)+2 e^{-2 x} x \log (1-x)-2 \int e^{-2 x} \, dx-5 \int \frac {e^{-2 x}}{-1+x} \, dx+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\frac {4 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\frac {6 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}\\ &=-6 e^{1-2 x}-\frac {1}{8} (e-2 x)^2+(1-4 e) x-\frac {1}{2} (2-e) x+2 e^{1-2 x} x+4 e^{-2 x} x+\frac {1}{2} (5+2 e) x^2+\frac {2 \text {Ei}(2-2 x)}{e}-\frac {2 \text {Ei}(2 (1-x))}{e}+(1-e) \log (1-x)-\frac {1}{4} (2-e)^2 \log (1-x)-2 e^{1-2 x} \log (1-x)+\frac {1}{4} (e-2 x)^2 \log (1-x)+2 e^{-2 x} x \log (1-x)+\frac {2 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}+\frac {4 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}-\frac {6 \int \frac {\text {Ei}(2-2 x)}{-1+x} \, dx}{e^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(-4 + 14*x - 8*x^2 + E*(-16 + 18*x - 4*x^2) + E^(2*x)*(-4*x + 5*x^2 + E*(3 - 6*x + 2*x^2)) + (-2 + 6
*x - 4*x^2 + E*(-4 + 4*x) + E^(2*x)*(E*(1 - x) - 2*x + 2*x^2))*Log[1 - x])/(E^(2*x)*(-1 + x)),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 66, normalized size = 1.94 \begin {gather*} {\left (2 \, {\left (x - 3\right )} e + {\left (2 \, x^{2} + {\left (x^{2} - 3 \, x\right )} e\right )} e^{\left (2 \, x\right )} + {\left ({\left (x^{2} - x e\right )} e^{\left (2 \, x\right )} + 2 \, x - 2 \, e\right )} \log \left (-x + 1\right ) + 4 \, x\right )} e^{\left (-2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((((-x+1)*exp(1)+2*x^2-2*x)*exp(x)^2+(4*x-4)*exp(1)-4*x^2+6*x-2)*log(-x+1)+((2*x^2-6*x+3)*exp(1)+5*x
^2-4*x)*exp(x)^2+(-4*x^2+18*x-16)*exp(1)-8*x^2+14*x-4)/(x-1)/exp(x)^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.21, size = 89, normalized size = 2.62 \begin {gather*} x^{2} e + x^{2} \log \left (-x + 1\right ) - x e \log \left (-x + 1\right ) + 2 \, x e^{\left (-2 \, x\right )} \log \left (-x + 1\right ) + 2 \, x^{2} - 3 \, x e + 4 \, x e^{\left (-2 \, x\right )} + 2 \, x e^{\left (-2 \, x + 1\right )} - 2 \, e^{\left (-2 \, x + 1\right )} \log \left (-x + 1\right ) - 6 \, e^{\left (-2 \, x + 1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((((-x+1)*exp(1)+2*x^2-2*x)*exp(x)^2+(4*x-4)*exp(1)-4*x^2+6*x-2)*log(-x+1)+((2*x^2-6*x+3)*exp(1)+5*x
^2-4*x)*exp(x)^2+(-4*x^2+18*x-16)*exp(1)-8*x^2+14*x-4)/(x-1)/exp(x)^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.56, size = 85, normalized size = 2.50




method result size



risch \(-\left (x \,{\mathrm e}^{2 x +1}-{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}-2 x \right ) {\mathrm e}^{-2 x} \ln \left (1-x \right )+\left (x^{2} {\mathrm e}^{2 x +1}-3 x \,{\mathrm e}^{2 x +1}+2 \,{\mathrm e}^{2 x} x^{2}+2 x \,{\mathrm e}-6 \,{\mathrm e}+4 x \right ) {\mathrm e}^{-2 x}\) \(85\)
norman \(\left (\left (2 \,{\mathrm e}+4\right ) x +\left ({\mathrm e}+2\right ) x^{2} {\mathrm e}^{2 x}+{\mathrm e}^{2 x} \ln \left (1-x \right ) x^{2}+2 x \ln \left (1-x \right )-2 \,{\mathrm e} \ln \left (1-x \right )-3 x \,{\mathrm e} \,{\mathrm e}^{2 x}-{\mathrm e} \,{\mathrm e}^{2 x} \ln \left (1-x \right ) x -6 \,{\mathrm e}\right ) {\mathrm e}^{-2 x}\) \(88\)
default \(\left (\left (2 \,{\mathrm e}+4\right ) x -2 \,{\mathrm e} \ln \left (1-x \right )+2 x \ln \left (1-x \right )-6 \,{\mathrm e}\right ) {\mathrm e}^{-2 x}-{\mathrm e} \ln \left (1-x \right ) x +{\mathrm e} \ln \left (1-x \right )-3 x \,{\mathrm e}-{\mathrm e}-2 \left (1-x \right ) \ln \left (1-x \right )+\frac {3}{2}+\ln \left (1-x \right ) \left (1-x \right )^{2}+2 x^{2}+x^{2} {\mathrm e}-\ln \left (x -1\right ) {\mathrm e}+\ln \left (x -1\right )\) \(119\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((((1-x)*exp(1)+2*x^2-2*x)*exp(x)^2+(4*x-4)*exp(1)-4*x^2+6*x-2)*ln(1-x)+((2*x^2-6*x+3)*exp(1)+5*x^2-4*x)*e
xp(x)^2+(-4*x^2+18*x-16)*exp(1)-8*x^2+14*x-4)/(x-1)/exp(x)^2,x,method=_RETURNVERBOSE)

[Out]

-(x*exp(2*x+1)-exp(2*x)*x^2+2*exp(1)-2*x)*exp(-2*x)*ln(1-x)+(x^2*exp(2*x+1)-3*x*exp(2*x+1)+2*exp(2*x)*x^2+2*x*
exp(1)-6*exp(1)+4*x)*exp(-2*x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 16 \, e^{\left (-1\right )} E_{1}\left (2 \, x - 2\right ) + 4 \, e^{\left (-2\right )} E_{1}\left (2 \, x - 2\right ) + \frac {x^{3} {\left (e + 2\right )} - 2 \, x^{2} {\left (2 \, e + 1\right )} + 3 \, x e + 2 \, {\left (x^{2} {\left (e + 2\right )} - 2 \, x {\left (2 \, e + 1\right )}\right )} e^{\left (-2 \, x\right )} + {\left (x^{3} - x^{2} {\left (e + 1\right )} + x e + 2 \, {\left (x^{2} - x {\left (e + 1\right )} + e\right )} e^{\left (-2 \, x\right )}\right )} \log \left (-x + 1\right )}{x - 1} + \int \frac {2 \, {\left (2 \, x {\left (e + 1\right )} - 5 \, e - 2\right )} e^{\left (-2 \, x\right )}}{x^{2} - 2 \, x + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((((-x+1)*exp(1)+2*x^2-2*x)*exp(x)^2+(4*x-4)*exp(1)-4*x^2+6*x-2)*log(-x+1)+((2*x^2-6*x+3)*exp(1)+5*x
^2-4*x)*exp(x)^2+(-4*x^2+18*x-16)*exp(1)-8*x^2+14*x-4)/(x-1)/exp(x)^2,x, algorithm="maxima")

[Out]

16*e^(-1)*exp_integral_e(1, 2*x - 2) + 4*e^(-2)*exp_integral_e(1, 2*x - 2) + (x^3*(e + 2) - 2*x^2*(2*e + 1) +
3*x*e + 2*(x^2*(e + 2) - 2*x*(2*e + 1))*e^(-2*x) + (x^3 - x^2*(e + 1) + x*e + 2*(x^2 - x*(e + 1) + e)*e^(-2*x)
)*log(-x + 1))/(x - 1) + integrate(2*(2*x*(e + 1) - 5*e - 2)*e^(-2*x)/(x^2 - 2*x + 1), x)

________________________________________________________________________________________

mupad [B]  time = 7.78, size = 39, normalized size = 1.15 \begin {gather*} \left (x+2\,{\mathrm {e}}^{-2\,x}\right )\,\left (2\,x-3\,\mathrm {e}+x\,\mathrm {e}-\mathrm {e}\,\ln \left (1-x\right )+x\,\ln \left (1-x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-2*x)*(log(1 - x)*(exp(2*x)*(2*x + exp(1)*(x - 1) - 2*x^2) - 6*x + 4*x^2 - exp(1)*(4*x - 4) + 2) - 1
4*x + exp(1)*(4*x^2 - 18*x + 16) - exp(2*x)*(exp(1)*(2*x^2 - 6*x + 3) - 4*x + 5*x^2) + 8*x^2 + 4))/(x - 1),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.61, size = 66, normalized size = 1.94 \begin {gather*} x^{2} \left (2 + e\right ) - 3 e x + \left (x^{2} - e x\right ) \log {\left (1 - x \right )} + \left (2 x \log {\left (1 - x \right )} + 4 x + 2 e x - 2 e \log {\left (1 - x \right )} - 6 e\right ) e^{- 2 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((((-x+1)*exp(1)+2*x**2-2*x)*exp(x)**2+(4*x-4)*exp(1)-4*x**2+6*x-2)*ln(-x+1)+((2*x**2-6*x+3)*exp(1)+
5*x**2-4*x)*exp(x)**2+(-4*x**2+18*x-16)*exp(1)-8*x**2+14*x-4)/(x-1)/exp(x)**2,x)

[Out]

x**2*(2 + E) - 3*E*x + (x**2 - E*x)*log(1 - x) + (2*x*log(1 - x) + 4*x + 2*E*x - 2*E*log(1 - x) - 6*E)*exp(-2*
x)

________________________________________________________________________________________