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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0241844, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2282, 32} \[ -\frac{1}{e^x+1} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

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]

Rubi steps

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

Mathematica [A]  time = 0.0074786, size = 9, normalized size = 1. \[ -\frac{1}{e^x+1} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 9, normalized size = 1. \begin{align*} - \left ( 1+{{\rm e}^{x}} \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(1+exp(x))

________________________________________________________________________________________

Maxima [A]  time = 0.971287, size = 11, normalized size = 1.22 \begin{align*} -\frac{1}{e^{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(e^x + 1)

________________________________________________________________________________________

Fricas [A]  time = 0.806071, size = 19, normalized size = 2.11 \begin{align*} -\frac{1}{e^{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(e^x + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.079009, size = 7, normalized size = 0.78 \begin{align*} - \frac{1}{e^{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(exp(x) + 1)

________________________________________________________________________________________

Giac [A]  time = 1.24297, size = 11, normalized size = 1.22 \begin{align*} -\frac{1}{e^{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(e^x + 1)