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

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

[Out]

-1/(1+exp(x))

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

-(1 + E^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 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]]]

Rubi steps

\begin {align*} \int \frac {1}{2+e^{-x}+e^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.01, size = 9, normalized size = 1.00 \[ -\frac {1}{e^x+1} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 8, normalized size = 0.89 \[ -\frac {1}{e^{x} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(e^x + 1)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 8, normalized size = 0.89 \[ -\frac {1}{e^{x} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(e^x + 1)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 9, normalized size = 1.00 \[ -\frac {1}{{\mathrm e}^{x}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(exp(x)+1)

________________________________________________________________________________________

maxima [A]  time = 1.02, size = 8, normalized size = 0.89 \[ \frac {1}{e^{\left (-x\right )} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 8, normalized size = 0.89 \[ -\frac {1}{{\mathrm {e}}^x+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(exp(x) + 1)

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 7, normalized size = 0.78 \[ - \frac {1}{e^{x} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(exp(x) + 1)

________________________________________________________________________________________