\(\int \frac {e^x}{1-\cosh (x)} \, dx\) [605]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 22 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=-\frac {2}{1-e^x}-2 \log \left (1-e^x\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2320, 12, 45} \[ \int \frac {e^x}{1-\cosh (x)} \, dx=-\frac {2}{1-e^x}-2 \log \left (1-e^x\right ) \]

[In]

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

[Out]

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

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])

Rule 2320

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*} \text {integral}& = \text {Subst}\left (\int -\frac {2 x}{(1-x)^2} \, dx,x,e^x\right ) \\ & = -\left (2 \text {Subst}\left (\int \frac {x}{(1-x)^2} \, dx,x,e^x\right )\right ) \\ & = -\left (2 \text {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] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.64 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=\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)} \]

[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] (verified)

Time = 0.09 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77

method result size
risch \(\frac {2}{-1+{\mathrm e}^{x}}-2 \ln \left (-1+{\mathrm e}^{x}\right )\) \(17\)
default \(2 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+\frac {1}{\tanh \left (\frac {x}{2}\right )}-2 \ln \left (\tanh \left (\frac {x}{2}\right )\right )\) \(24\)

[In]

int(exp(x)/(1-cosh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.18 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=-\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} \]

[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]

\[ \int \frac {e^x}{1-\cosh (x)} \, dx=- \int \frac {e^{x}}{\cosh {\left (x \right )} - 1}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=\frac {2}{e^{x} - 1} - 2 \, \log \left (e^{x} - 1\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=\frac {2}{e^{x} - 1} - 2 \, \log \left ({\left | e^{x} - 1 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73 \[ \int \frac {e^x}{1-\cosh (x)} \, dx=\frac {2}{{\mathrm {e}}^x-1}-2\,\ln \left ({\mathrm {e}}^x-1\right ) \]

[In]

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

[Out]

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