3.1.72 \(\int \frac {\sinh (x)}{1+\tanh (x)} \, dx\) [72]

Optimal. Leaf size=17 \[ \frac {\cosh ^3(x)}{3}-\frac {\sinh ^3(x)}{3} \]

[Out]

1/3*cosh(x)^3-1/3*sinh(x)^3

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {3599, 3187, 3186, 2645, 30, 2644} \begin {gather*} \frac {\cosh ^3(x)}{3}-\frac {\sinh ^3(x)}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sinh[x]/(1 + Tanh[x]),x]

[Out]

Cosh[x]^3/3 - Sinh[x]^3/3

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2644

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 3186

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 3187

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3599

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[Sin[e + f*x]^
m*((a*Cos[e + f*x] + b*Sin[e + f*x])^n/Cos[e + f*x]^n), x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rubi steps

\begin {align*} \int \frac {\sinh (x)}{1+\tanh (x)} \, dx &=\int \frac {\cosh (x) \sinh (x)}{\cosh (x)+\sinh (x)} \, dx\\ &=i \int \cosh (x) (-i \cosh (x)+i \sinh (x)) \sinh (x) \, dx\\ &=\int \left (\cosh ^2(x) \sinh (x)-\cosh (x) \sinh ^2(x)\right ) \, dx\\ &=\int \cosh ^2(x) \sinh (x) \, dx-\int \cosh (x) \sinh ^2(x) \, dx\\ &=-\left (i \text {Subst}\left (\int x^2 \, dx,x,i \sinh (x)\right )\right )+\text {Subst}\left (\int x^2 \, dx,x,\cosh (x)\right )\\ &=\frac {\cosh ^3(x)}{3}-\frac {\sinh ^3(x)}{3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 19, normalized size = 1.12 \begin {gather*} \frac {1}{12} \left (3 \cosh (x)+\cosh (3 x)-4 \sinh ^3(x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sinh[x]/(1 + Tanh[x]),x]

[Out]

(3*Cosh[x] + Cosh[3*x] - 4*Sinh[x]^3)/12

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(41\) vs. \(2(13)=26\).
time = 0.32, size = 42, normalized size = 2.47

method result size
risch \(\frac {{\mathrm e}^{x}}{4}+\frac {{\mathrm e}^{-3 x}}{12}\) \(12\)
default \(\frac {2}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {1}{2 \tanh \left (\frac {x}{2}\right )+2}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)/(1+tanh(x)),x,method=_RETURNVERBOSE)

[Out]

2/3/(tanh(1/2*x)+1)^3-1/(tanh(1/2*x)+1)^2+1/2/(tanh(1/2*x)+1)-1/2/(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 11, normalized size = 0.65 \begin {gather*} \frac {1}{12} \, e^{\left (-3 \, x\right )} + \frac {1}{4} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)/(1+tanh(x)),x, algorithm="maxima")

[Out]

1/12*e^(-3*x) + 1/4*e^x

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 23, normalized size = 1.35 \begin {gather*} \frac {\cosh \left (x\right )^{2} + \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}{3 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)/(1+tanh(x)),x, algorithm="fricas")

[Out]

1/3*(cosh(x)^2 + cosh(x)*sinh(x) + sinh(x)^2)/(cosh(x) + sinh(x))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (12) = 24\).
time = 0.19, size = 48, normalized size = 2.82 \begin {gather*} \frac {\sinh {\left (x \right )} \tanh {\left (x \right )}}{3 \tanh {\left (x \right )} + 3} - \frac {\sinh {\left (x \right )}}{3 \tanh {\left (x \right )} + 3} + \frac {2 \cosh {\left (x \right )} \tanh {\left (x \right )}}{3 \tanh {\left (x \right )} + 3} + \frac {\cosh {\left (x \right )}}{3 \tanh {\left (x \right )} + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)/(1+tanh(x)),x)

[Out]

sinh(x)*tanh(x)/(3*tanh(x) + 3) - sinh(x)/(3*tanh(x) + 3) + 2*cosh(x)*tanh(x)/(3*tanh(x) + 3) + cosh(x)/(3*tan
h(x) + 3)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 11, normalized size = 0.65 \begin {gather*} \frac {1}{12} \, e^{\left (-3 \, x\right )} + \frac {1}{4} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)/(1+tanh(x)),x, algorithm="giac")

[Out]

1/12*e^(-3*x) + 1/4*e^x

________________________________________________________________________________________

Mupad [B]
time = 1.12, size = 11, normalized size = 0.65 \begin {gather*} \frac {{\mathrm {e}}^{-3\,x}}{12}+\frac {{\mathrm {e}}^x}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)/(tanh(x) + 1),x)

[Out]

exp(-3*x)/12 + exp(x)/4

________________________________________________________________________________________