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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2800, 46} \[ \int \frac {\coth (x)}{(a+b \sinh (x))^2} \, dx=-\frac {\log (a+b \sinh (x))}{a^2}+\frac {\log (\sinh (x))}{a^2}+\frac {1}{a (a+b \sinh (x))} \]

[In]

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

[Out]

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

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 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)^2} \, dx,x,b \sinh (x)\right ) \\ & = \text {Subst}\left (\int \left (\frac {1}{a^2 x}-\frac {1}{a (a+x)^2}-\frac {1}{a^2 (a+x)}\right ) \, dx,x,b \sinh (x)\right ) \\ & = \frac {\log (\sinh (x))}{a^2}-\frac {\log (a+b \sinh (x))}{a^2}+\frac {1}{a (a+b \sinh (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.84 \[ \int \frac {\coth (x)}{(a+b \sinh (x))^2} \, dx=\frac {\log (\sinh (x))-\log (a+b \sinh (x))+\frac {a}{a+b \sinh (x)}}{a^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.11 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.78

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

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (32) = 64\).

Time = 0.29 (sec) , antiderivative size = 158, normalized size of antiderivative = 4.94 \[ \int \frac {\coth (x)}{(a+b \sinh (x))^2} \, dx=\frac {2 \, a \cosh \left (x\right ) - {\left (b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, a \sinh \left (x\right )}{a^{2} b \cosh \left (x\right )^{2} + a^{2} b \sinh \left (x\right )^{2} + 2 \, a^{3} \cosh \left (x\right ) - a^{2} b + 2 \, {\left (a^{2} b \cosh \left (x\right ) + a^{3}\right )} \sinh \left (x\right )} \]

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (32) = 64\).

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (32) = 64\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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