3.172 \(\int \frac{\text{csch}(x)}{a+b \cosh (x)} \, dx\)

Optimal. Leaf size=53 \[ \frac{b \log (a+b \cosh (x))}{a^2-b^2}+\frac{\log (1-\cosh (x))}{2 (a+b)}-\frac{\log (\cosh (x)+1)}{2 (a-b)} \]

[Out]

Log[1 - Cosh[x]]/(2*(a + b)) - Log[1 + Cosh[x]]/(2*(a - b)) + (b*Log[a + b*Cosh[x]])/(a^2 - b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0770954, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {2668, 706, 31, 633} \[ \frac{b \log (a+b \cosh (x))}{a^2-b^2}+\frac{\log (1-\cosh (x))}{2 (a+b)}-\frac{\log (\cosh (x)+1)}{2 (a-b)} \]

Antiderivative was successfully verified.

[In]

Int[Csch[x]/(a + b*Cosh[x]),x]

[Out]

Log[1 - Cosh[x]]/(2*(a + b)) - Log[1 + Cosh[x]]/(2*(a - b)) + (b*Log[a + b*Cosh[x]])/(a^2 - b^2)

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 706

Int[1/(((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 + a*e^2), Int[1/(d + e*x), x],
 x] + Dist[1/(c*d^2 + a*e^2), Int[(c*d - c*e*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a
*e^2, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rubi steps

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

Mathematica [A]  time = 0.0646628, size = 37, normalized size = 0.7 \[ \frac{b \log (a+b \cosh (x))+a \log \left (\tanh \left (\frac{x}{2}\right )\right )-b \log (\sinh (x))}{a^2-b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Csch[x]/(a + b*Cosh[x]),x]

[Out]

(b*Log[a + b*Cosh[x]] - b*Log[Sinh[x]] + a*Log[Tanh[x/2]])/(a^2 - b^2)

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 52, normalized size = 1. \begin{align*}{\frac{b}{ \left ( a+b \right ) \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b-a-b \right ) }+{\frac{1}{a+b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(x)/(a+b*cosh(x)),x)

[Out]

b/(a+b)/(a-b)*ln(a*tanh(1/2*x)^2-tanh(1/2*x)^2*b-a-b)+1/(a+b)*ln(tanh(1/2*x))

________________________________________________________________________________________

Maxima [A]  time = 1.03591, size = 80, normalized size = 1.51 \begin{align*} \frac{b \log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a^{2} - b^{2}} - \frac{\log \left (e^{\left (-x\right )} + 1\right )}{a - b} + \frac{\log \left (e^{\left (-x\right )} - 1\right )}{a + b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*cosh(x)),x, algorithm="maxima")

[Out]

b*log(2*a*e^(-x) + b*e^(-2*x) + b)/(a^2 - b^2) - log(e^(-x) + 1)/(a - b) + log(e^(-x) - 1)/(a + b)

________________________________________________________________________________________

Fricas [A]  time = 2.01879, size = 181, normalized size = 3.42 \begin{align*} \frac{b \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) -{\left (a + b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) +{\left (a - b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{2} - b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*cosh(x)),x, algorithm="fricas")

[Out]

(b*log(2*(b*cosh(x) + a)/(cosh(x) - sinh(x))) - (a + b)*log(cosh(x) + sinh(x) + 1) + (a - b)*log(cosh(x) + sin
h(x) - 1))/(a^2 - b^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{csch}{\left (x \right )}}{a + b \cosh{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*cosh(x)),x)

[Out]

Integral(csch(x)/(a + b*cosh(x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.20039, size = 90, normalized size = 1.7 \begin{align*} \frac{b^{2} \log \left ({\left | b{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a^{2} b - b^{3}} - \frac{\log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{2 \,{\left (a - b\right )}} + \frac{\log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{2 \,{\left (a + b\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*cosh(x)),x, algorithm="giac")

[Out]

b^2*log(abs(b*(e^(-x) + e^x) + 2*a))/(a^2*b - b^3) - 1/2*log(e^(-x) + e^x + 2)/(a - b) + 1/2*log(e^(-x) + e^x
- 2)/(a + b)