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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0124029, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {2282, 261} \[ -\frac{1}{2 \left (e^{2 x}+1\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps

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

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.022, size = 11, normalized size = 0.9 \begin{align*} -{\frac{1}{2+2\, \left ({{\rm e}^{x}} \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2/(1+exp(x)^2)

________________________________________________________________________________________

Maxima [A]  time = 0.965802, size = 14, normalized size = 1.08 \begin{align*} \frac{1}{2 \,{\left (e^{\left (-2 \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 0.79847, size = 27, normalized size = 2.08 \begin{align*} -\frac{1}{2 \,{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.075101, size = 10, normalized size = 0.77 \begin{align*} - \frac{1}{2 e^{2 x} + 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.31566, size = 14, normalized size = 1.08 \begin{align*} -\frac{1}{2 \,{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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