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

Optimal. Leaf size=9 \[ \frac {x}{e^x+x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 11, normalized size of antiderivative = 1.22, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {6688, 6711, 32} \begin {gather*} \frac {1}{\frac {e^x}{x}+1} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(1 + E^x/x)^(-1)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 6688

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

Rule 6711

Int[(u_)*((a_.)*(v_)^(p_.) + (b_.)*(w_)^(q_.))^(m_.), x_Symbol] :> With[{c = Simplify[u/(p*w*D[v, x] - q*v*D[w
, x])]}, Dist[c*p, Subst[Int[(b + a*x^p)^m, x], x, v*w^(m*q + 1)], x] /; FreeQ[c, x]] /; FreeQ[{a, b, m, p, q}
, x] && EqQ[p + q*(m*p + 1), 0] && IntegerQ[p] && IntegerQ[m]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^x (1-x)}{\left (e^x+x\right )^2} \, dx\\ &=-\operatorname {Subst}\left (\int \frac {1}{(1+x)^2} \, dx,x,\frac {e^x}{x}\right )\\ &=\frac {1}{1+\frac {e^x}{x}}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 9, normalized size = 1.00 \begin {gather*} \frac {x}{e^x+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x/(E^x + x)

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 8, normalized size = 0.89 \begin {gather*} \frac {x}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(x + e^x)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 8, normalized size = 0.89 \begin {gather*} \frac {x}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(x + e^x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 9, normalized size = 1.00




method result size



risch \(\frac {x}{{\mathrm e}^{x}+x}\) \(9\)
norman \(-\frac {{\mathrm e}^{x}}{{\mathrm e}^{x}+x}\) \(11\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(exp(x)+x)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 8, normalized size = 0.89 \begin {gather*} \frac {x}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(x + e^x)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 8, normalized size = 0.89 \begin {gather*} \frac {x}{x+{\mathrm {e}}^x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(x + exp(x))

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 5, normalized size = 0.56 \begin {gather*} \frac {x}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(x + exp(x))

________________________________________________________________________________________