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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 21 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-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] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2280, 46} \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-2 x-e^{-x}+2 \log \left (2 e^x+1\right ) \]

[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*} \text {integral}& = \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] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-e^{-x}-2 \log \left (e^x\right )+2 \log \left (1+2 e^x\right ) \]

[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] (verified)

Time = 0.05 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86

method result size
risch \(-{\mathrm e}^{-x}-2 x +2 \ln \left (\frac {1}{2}+{\mathrm e}^{x}\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\)
parallelrisch \(\left (-1+2 \ln \left (\frac {1}{2}+{\mathrm e}^{x}\right ) {\mathrm e}^{x}-2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}\) \(22\)
norman \(\left (-1-2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}+2 \ln \left (1+2 \,{\mathrm e}^{x}\right )\) \(23\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-{\left (2 \, x e^{x} - 2 \, e^{x} \log \left (2 \, e^{x} + 1\right ) + 1\right )} e^{\left (-x\right )} \]

[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] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=2 \log {\left (2 + e^{- x} \right )} - e^{- x} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-e^{\left (-x\right )} + 2 \, \log \left (e^{\left (-x\right )} + 2\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=-2 \, x - e^{\left (-x\right )} + 2 \, \log \left (2 \, e^{x} + 1\right ) \]

[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] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {e^{-x}}{1+2 e^x} \, dx=2\,\ln \left (2\,{\mathrm {e}}^x+1\right )-2\,x-{\mathrm {e}}^{-x} \]

[In]

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

[Out]

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