3.64 \(\int \frac{\text{csch}(x)}{a+b \text{sech}(x)} \, dx\)

Optimal. Leaf size=53 \[ \frac{b \log (a \cosh (x)+b)}{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[b + a*Cosh[x]])/(a^2 - b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.118449, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {3872, 2721, 801} \[ \frac{b \log (a \cosh (x)+b)}{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*Sech[x]),x]

[Out]

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

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(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] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps

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

Mathematica [A]  time = 0.0727261, size = 37, normalized size = 0.7 \[ \frac{b \log (a \cosh (x)+b)+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*Sech[x]),x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.022, size = 48, normalized size = 0.9 \begin{align*}{\frac{1}{a+b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+{\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 ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.10733, size = 80, normalized size = 1.51 \begin{align*} \frac{b \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\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*sech(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.47507, size = 181, normalized size = 3.42 \begin{align*} \frac{b \log \left (\frac{2 \,{\left (a \cosh \left (x\right ) + b\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*sech(x)),x, algorithm="fricas")

[Out]

(b*log(2*(a*cosh(x) + b)/(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 \operatorname{sech}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.12509, size = 88, normalized size = 1.66 \begin{align*} \frac{a b \log \left ({\left | a{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{3} - a b^{2}} - \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*sech(x)),x, algorithm="giac")

[Out]

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