3.1.73 \(\int \frac {\text {csch}(x)}{1+\tanh (x)} \, dx\) [73]

Optimal. Leaf size=12 \[ -\tanh ^{-1}(\cosh (x))+\cosh (x)-\sinh (x) \]

[Out]

-arctanh(cosh(x))+cosh(x)-sinh(x)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.778, Rules used = {3599, 3187, 3186, 2717, 2672, 327, 212} \begin {gather*} -\sinh (x)+\cosh (x)-\tanh ^{-1}(\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTanh[Cosh[x]] + Cosh[x] - Sinh[x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

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 {\text {csch}(x)}{1+\tanh (x)} \, dx &=\int \frac {\coth (x)}{\cosh (x)+\sinh (x)} \, dx\\ &=i \int \coth (x) (-i \cosh (x)+i \sinh (x)) \, dx\\ &=-\int (\cosh (x)-\cosh (x) \coth (x)) \, dx\\ &=-\int \cosh (x) \, dx+\int \cosh (x) \coth (x) \, dx\\ &=-\sinh (x)-\text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cosh (x)\right )\\ &=\cosh (x)-\sinh (x)-\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cosh (x)\right )\\ &=-\tanh ^{-1}(\cosh (x))+\cosh (x)-\sinh (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 14, normalized size = 1.17 \begin {gather*} \cosh (x)+\log \left (\tanh \left (\frac {x}{2}\right )\right )-\sinh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Cosh[x] + Log[Tanh[x/2]] - Sinh[x]

________________________________________________________________________________________

Maple [A]
time = 0.56, size = 17, normalized size = 1.42

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 21, normalized size = 1.75 \begin {gather*} e^{\left (-x\right )} - \log \left (e^{\left (-x\right )} + 1\right ) + \log \left (e^{\left (-x\right )} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

e^(-x) - log(e^(-x) + 1) + log(e^(-x) - 1)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (12) = 24\).
time = 0.39, size = 38, normalized size = 3.17 \begin {gather*} -\frac {{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) - 1}{\cosh \left (x\right ) + \sinh \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}{\left (x \right )}}{\tanh {\left (x \right )} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(csch(x)/(tanh(x) + 1), x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 18, normalized size = 1.50 \begin {gather*} e^{\left (-x\right )} - \log \left (e^{x} + 1\right ) + \log \left ({\left | e^{x} - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

e^(-x) - log(e^x + 1) + log(abs(e^x - 1))

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 21, normalized size = 1.75 \begin {gather*} \ln \left (2-2\,{\mathrm {e}}^x\right )-\ln \left (-2\,{\mathrm {e}}^x-2\right )+{\mathrm {e}}^{-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________