3.605 \(\int \frac{e^x}{1-\cosh (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0242695, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2282, 12, 43} \[ -\frac{2}{1-e^x}-2 \log \left (1-e^x\right ) \]

Antiderivative was successfully verified.

[In]

Int[E^x/(1 - Cosh[x]),x]

[Out]

-2/(1 - E^x) - 2*Log[1 - E^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 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

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, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

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

Mathematica [A]  time = 0.0318872, size = 36, normalized size = 1.64 \[ \frac{4 \left (\frac{1}{1-e^x}+\log \left (1-e^x\right )\right ) \sinh ^2\left (\frac{x}{2}\right )}{1-\cosh (x)} \]

Antiderivative was successfully verified.

[In]

Integrate[E^x/(1 - Cosh[x]),x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 24, normalized size = 1.1 \begin{align*} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}-2\,\ln \left ( \tanh \left ( x/2 \right ) \right ) +2\,\ln \left ( -1+\tanh \left ( x/2 \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x)/(1-cosh(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.948572, size = 22, normalized size = 1. \begin{align*} \frac{2}{e^{x} - 1} - 2 \, \log \left (e^{x} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.98946, size = 115, normalized size = 5.23 \begin{align*} -\frac{2 \,{\left ({\left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) - 1\right )}}{\cosh \left (x\right ) + \sinh \left (x\right ) - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*((cosh(x) + sinh(x) - 1)*log(cosh(x) + sinh(x) - 1) - 1)/(cosh(x) + sinh(x) - 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{e^{x}}{\cosh{\left (x \right )} - 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)/(1-cosh(x)),x)

[Out]

-Integral(exp(x)/(cosh(x) - 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.11136, size = 23, normalized size = 1.05 \begin{align*} \frac{2}{e^{x} - 1} - 2 \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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