\(\int \frac {\coth (x)}{a+b \sinh (x)} \, dx\) [232]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 20 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=\frac {\log (\sinh (x))}{a}-\frac {\log (a+b \sinh (x))}{a} \]

[Out]

ln(sinh(x))/a-ln(a+b*sinh(x))/a

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {2800, 36, 29, 31} \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=\frac {\log (\sinh (x))}{a}-\frac {\log (a+b \sinh (x))}{a} \]

[In]

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

[Out]

Log[Sinh[x]]/a - Log[a + b*Sinh[x]]/a

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

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

Rule 2800

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]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{x (a+x)} \, dx,x,b \sinh (x)\right ) \\ & = \frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,b \sinh (x)\right )}{a}-\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sinh (x)\right )}{a} \\ & = \frac {\log (\sinh (x))}{a}-\frac {\log (a+b \sinh (x))}{a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=\frac {\log (\sinh (x))}{a}-\frac {\log (a+b \sinh (x))}{a} \]

[In]

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

[Out]

Log[Sinh[x]]/a - Log[a + b*Sinh[x]]/a

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.65

method result size
risch \(\frac {\ln \left ({\mathrm e}^{2 x}-1\right )}{a}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{a}\) \(33\)
default \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -2 b \tanh \left (\frac {x}{2}\right )-a \right )}{a}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) \(36\)

[In]

int(coth(x)/(a+b*sinh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 40, normalized size of antiderivative = 2.00 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=-\frac {\log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=\int \frac {\coth {\left (x \right )}}{a + b \sinh {\left (x \right )}}\, dx \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (20) = 40\).

Time = 0.28 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.30 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=-\frac {\log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a} + \frac {\log \left (e^{\left (-x\right )} + 1\right )}{a} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{a} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.95 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=-\frac {\log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{a} + \frac {\log \left ({\left | -e^{\left (-x\right )} + e^{x} \right |}\right )}{a} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 195, normalized size of antiderivative = 9.75 \[ \int \frac {\coth (x)}{a+b \sinh (x)} \, dx=\frac {2\,\mathrm {atan}\left (\frac {a\,\sqrt {-a^2}+b\,{\mathrm {e}}^x\,\sqrt {-a^2}-2\,a\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^2}-b\,{\mathrm {e}}^{3\,x}\,\sqrt {-a^2}}{a^2}\right )}{\sqrt {-a^2}}-\frac {2\,\mathrm {atan}\left (\left (4\,a^4\,b\,\sqrt {-a^2}+4\,a^2\,b^3\,\sqrt {-a^2}\right )\,\left (\frac {1}{8\,a\,b\,{\left (a^2+b^2\right )}^2}-{\mathrm {e}}^x\,\left (\frac {1}{16\,b^2\,{\left (a^2+b^2\right )}^2}-\frac {{\left (a^2+2\,b^2\right )}^2}{16\,a^4\,b^2\,{\left (a^2+b^2\right )}^2}\right )+\frac {a^2+2\,b^2}{8\,a^3\,b\,{\left (a^2+b^2\right )}^2}\right )\right )}{\sqrt {-a^2}} \]

[In]

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

[Out]

(2*atan((a*(-a^2)^(1/2) + b*exp(x)*(-a^2)^(1/2) - 2*a*exp(2*x)*(-a^2)^(1/2) - b*exp(3*x)*(-a^2)^(1/2))/a^2))/(
-a^2)^(1/2) - (2*atan((4*a^4*b*(-a^2)^(1/2) + 4*a^2*b^3*(-a^2)^(1/2))*(1/(8*a*b*(a^2 + b^2)^2) - exp(x)*(1/(16
*b^2*(a^2 + b^2)^2) - (a^2 + 2*b^2)^2/(16*a^4*b^2*(a^2 + b^2)^2)) + (a^2 + 2*b^2)/(8*a^3*b*(a^2 + b^2)^2))))/(
-a^2)^(1/2)