3.7.82 \(\int \frac {e^{-x}}{1+2 e^x} \, dx\) [682]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2280, 46} \begin {gather*} -2 x-e^{-x}+2 \log \left (2 e^x+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 46

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2280

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_.)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Wit
h[{m = FullSimplify[g*h*(Log[G]/(d*e*Log[F]))]}, Dist[Denominator[m]*(G^(f*h - c*g*(h/d))/(d*e*Log[F])), Subst
[Int[x^(Numerator[m] - 1)*(a + b*x^Denominator[m])^p, x], x, F^(e*((c + d*x)/Denominator[m]))], x] /; LeQ[m, -
1] || GeQ[m, 1]] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x]

Rubi steps

\begin {align*} \int \frac {e^{-x}}{1+2 e^x} \, dx &=\text {Subst}\left (\int \frac {1}{x^2 (1+2 x)} \, dx,x,e^x\right )\\ &=\text {Subst}\left (\int \left (\frac {1}{x^2}-\frac {2}{x}+\frac {4}{1+2 x}\right ) \, dx,x,e^x\right )\\ &=-e^{-x}-2 x+2 \log \left (1+2 e^x\right )\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 22, normalized size = 1.05

method result size
risch \(-{\mathrm e}^{-x}-2 x +2 \ln \left ({\mathrm e}^{x}+\frac {1}{2}\right )\) \(18\)
derivativedivides \(2 \ln \left (1+2 \,{\mathrm e}^{x}\right )-{\mathrm e}^{-x}-2 \ln \left ({\mathrm e}^{x}\right )\) \(22\)
default \(2 \ln \left (1+2 \,{\mathrm e}^{x}\right )-{\mathrm e}^{-x}-2 \ln \left ({\mathrm e}^{x}\right )\) \(22\)
norman \(\left (-1-2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}+2 \ln \left (1+2 \,{\mathrm e}^{x}\right )\) \(23\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 16, normalized size = 0.76 \begin {gather*} -e^{\left (-x\right )} + 2 \, \log \left (e^{\left (-x\right )} + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 24, normalized size = 1.14 \begin {gather*} -{\left (2 \, x e^{x} - 2 \, e^{x} \log \left (2 \, e^{x} + 1\right ) + 1\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 17, normalized size = 0.81 \begin {gather*} - 2 x + 2 \log {\left (e^{x} + \frac {1}{2} \right )} - e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 5.65, size = 19, normalized size = 0.90 \begin {gather*} -2 \, x - e^{\left (-x\right )} + 2 \, \log \left (2 \, e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 19, normalized size = 0.90 \begin {gather*} 2\,\ln \left (2\,{\mathrm {e}}^x+1\right )-2\,x-{\mathrm {e}}^{-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________