\(\int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx\) [234]

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.50, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3160, 8} \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=\frac {\sinh (x)}{2 (\cosh (x)-\sinh (x))}-\frac {x}{2} \]

[In]

Int[Sinh[x]/(Cosh[x] - Sinh[x]),x]

[Out]

-1/2*x + Sinh[x]/(2*(Cosh[x] - Sinh[x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3160

Int[sin[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Simp[a*((a*Cos[c + d*x] + b*Sin[c + d*x])^n/(2*b*d*n*Sin[c + d*x]^n)), x] + Dist[1/(2*b), Int[(a*Cos[c
+ d*x] + b*Sin[c + d*x])^(n + 1)/Sin[c + d*x]^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[m + n, 0] && Eq
Q[a^2 + b^2, 0] && LtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\sinh (x)}{2 (\cosh (x)-\sinh (x))}-\frac {\int 1 \, dx}{2} \\ & = -\frac {x}{2}+\frac {\sinh (x)}{2 (\cosh (x)-\sinh (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.57 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=-\frac {x}{2}+\frac {\cosh ^2(x)}{2}+\frac {1}{4} \sinh (2 x) \]

[In]

Integrate[Sinh[x]/(Cosh[x] - Sinh[x]),x]

[Out]

-1/2*x + Cosh[x]^2/2 + Sinh[2*x]/4

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.79

method result size
risch \(-\frac {x}{2}+\frac {{\mathrm e}^{2 x}}{4}\) \(11\)
parallelrisch \(\frac {-\tanh \left (x \right ) x +x -1}{2 \tanh \left (x \right )-2}\) \(18\)
default \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{\tanh \left (\frac {x}{2}\right )-1}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}\) \(36\)

[In]

int(sinh(x)/(cosh(x)-sinh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (10) = 20\).

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.07 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=-\frac {{\left (2 \, x - 1\right )} \cosh \left (x\right ) - {\left (2 \, x + 1\right )} \sinh \left (x\right )}{4 \, {\left (\cosh \left (x\right ) - \sinh \left (x\right )\right )}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (10) = 20\).

Time = 0.27 (sec) , antiderivative size = 42, normalized size of antiderivative = 3.00 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=\frac {x \sinh {\left (x \right )}}{- 2 \sinh {\left (x \right )} + 2 \cosh {\left (x \right )}} - \frac {x \cosh {\left (x \right )}}{- 2 \sinh {\left (x \right )} + 2 \cosh {\left (x \right )}} + \frac {\cosh {\left (x \right )}}{- 2 \sinh {\left (x \right )} + 2 \cosh {\left (x \right )}} \]

[In]

integrate(sinh(x)/(cosh(x)-sinh(x)),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=-\frac {1}{2} \, x + \frac {1}{4} \, e^{\left (2 \, x\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=-\frac {1}{2} \, x + \frac {1}{4} \, e^{\left (2 \, x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int \frac {\sinh (x)}{\cosh (x)-\sinh (x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{4}-\frac {x}{2} \]

[In]

int(sinh(x)/(cosh(x) - sinh(x)),x)

[Out]

exp(2*x)/4 - x/2