3.120 \(\int \frac {\coth (x)}{a+b \text {sech}(x)} \, dx\)

Optimal. Leaf size=66 \[ -\frac {b^2 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )}+\frac {\log (1-\text {sech}(x))}{2 (a+b)}+\frac {\log (\text {sech}(x)+1)}{2 (a-b)}+\frac {\log (\cosh (x))}{a} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3885, 894} \[ -\frac {b^2 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )}+\frac {\log (1-\text {sech}(x))}{2 (a+b)}+\frac {\log (\text {sech}(x)+1)}{2 (a-b)}+\frac {\log (\cosh (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Coth[x]/(a + b*Sech[x]),x]

[Out]

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

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 3885

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Dist[(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[((b^2 - x^2)^((m - 1)/2)*(a + x)^n)/x, x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[Coth[x]/(a + b*Sech[x]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 81, normalized size = 1.23 \[ -\frac {b^{2} \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} + a b\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) - {\left (a^{2} - a b\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{3} - a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)/(a+b*sech(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 67, normalized size = 1.02 \[ -\frac {b^{2} \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 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)/(a+b*sech(x)),x, algorithm="giac")

[Out]

-b^2*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)

________________________________________________________________________________________

maple [A]  time = 0.16, size = 78, normalized size = 1.18 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {b^{2} \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +a +b \right )}{a \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a +b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 67, normalized size = 1.02 \[ -\frac {b^{2} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{3} - a b^{2}} + \frac {x}{a} + \frac {\log \left (e^{\left (-x\right )} + 1\right )}{a - b} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{a + b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)/(a+b*sech(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.72, size = 271, normalized size = 4.11 \[ \frac {\ln \left (64\,a\,b^4+32\,a^4\,b+32\,b^5+96\,a^2\,b^3+64\,a^3\,b^2+32\,b^5\,{\mathrm {e}}^x+64\,a\,b^4\,{\mathrm {e}}^x+32\,a^4\,b\,{\mathrm {e}}^x+96\,a^2\,b^3\,{\mathrm {e}}^x+64\,a^3\,b^2\,{\mathrm {e}}^x\right )}{a-b}-\frac {x}{a}+\frac {\ln \left (64\,a\,b^4-32\,a^4\,b-32\,b^5-96\,a^2\,b^3+64\,a^3\,b^2+32\,b^5\,{\mathrm {e}}^x-64\,a\,b^4\,{\mathrm {e}}^x+32\,a^4\,b\,{\mathrm {e}}^x+96\,a^2\,b^3\,{\mathrm {e}}^x-64\,a^3\,b^2\,{\mathrm {e}}^x\right )}{a+b}+\frac {b^2\,\ln \left (4\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+4\,a^5+4\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x+4\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+8\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}+8\,a^2\,b^3\,{\mathrm {e}}^x\right )}{a\,b^2-a^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(x)/(a + b/cosh(x)),x)

[Out]

log(64*a*b^4 + 32*a^4*b + 32*b^5 + 96*a^2*b^3 + 64*a^3*b^2 + 32*b^5*exp(x) + 64*a*b^4*exp(x) + 32*a^4*b*exp(x)
 + 96*a^2*b^3*exp(x) + 64*a^3*b^2*exp(x))/(a - b) - x/a + log(64*a*b^4 - 32*a^4*b - 32*b^5 - 96*a^2*b^3 + 64*a
^3*b^2 + 32*b^5*exp(x) - 64*a*b^4*exp(x) + 32*a^4*b*exp(x) + 96*a^2*b^3*exp(x) - 64*a^3*b^2*exp(x))/(a + b) +
(b^2*log(4*a^5*exp(2*x) + 4*a*b^4 + 4*a^5 + 4*a^3*b^2 + 8*b^5*exp(x) + 4*a^3*b^2*exp(2*x) + 8*a^4*b*exp(x) + 4
*a*b^4*exp(2*x) + 8*a^2*b^3*exp(x)))/(a*b^2 - a^3)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\coth {\relax (x )}}{a + b \operatorname {sech}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________