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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2282, 446, 72} \[ \frac {1}{2} \log \left (1-e^{4 x}\right )-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

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 {e^{-2 x}+e^{2 x}}{-e^{-2 x}+e^{2 x}} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1-x^2}{x \left (1-x^2\right )} \, dx,x,e^{2 x}\right )\\ &=\frac {1}{4} \operatorname {Subst}\left (\int \frac {-1-x}{(1-x) x} \, dx,x,e^{4 x}\right )\\ &=\frac {1}{4} \operatorname {Subst}\left (\int \left (\frac {2}{-1+x}-\frac {1}{x}\right ) \, dx,x,e^{4 x}\right )\\ &=-x+\frac {1}{2} \log \left (1-e^{4 x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 1.00 \[ \frac {1}{2} \log \left (1-e^{4 x}\right )-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 13, normalized size = 0.72 \[ -x + \frac {1}{2} \, \log \left (e^{\left (4 \, x\right )} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 14, normalized size = 0.78 \[ -x + \frac {1}{2} \, \log \left ({\left | e^{\left (4 \, x\right )} - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + 1/2*log(abs(e^(4*x) - 1))

________________________________________________________________________________________

maple [A]  time = 0.04, size = 30, normalized size = 1.67 \[ \frac {\ln \left ({\mathrm e}^{x}-1\right )}{2}+\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2}+\frac {\ln \left ({\mathrm e}^{2 x}+1\right )}{2}-\ln \left ({\mathrm e}^{x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.02, size = 14, normalized size = 0.78 \[ \frac {1}{2} \, \log \left (e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.34, size = 22, normalized size = 1.22 \[ \frac {\ln \left ({\mathrm {e}}^{2\,x}-1\right )}{2}-x+\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 10, normalized size = 0.56 \[ - x + \frac {\log {\left (e^{4 x} - 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________