3.788 \(\int \frac{\text{csch}^2(x)}{a+b \coth (x)+c \text{csch}(x)} \, dx\)

Optimal. Leaf size=118 \[ -\frac{2 a c \tanh ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2+c^2}}\right )}{\left (b^2-c^2\right ) \sqrt{a^2-b^2+c^2}}-\frac{b \log \left (2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )+b+c\right )}{b^2-c^2}+\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c} \]

[Out]

(-2*a*c*ArcTanh[(a + (b - c)*Tanh[x/2])/Sqrt[a^2 - b^2 + c^2]])/((b^2 - c^2)*Sqrt[a^2 - b^2 + c^2]) + Log[Tanh
[x/2]]/(b + c) - (b*Log[b + c + 2*a*Tanh[x/2] + (b - c)*Tanh[x/2]^2])/(b^2 - c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.584307, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.412, Rules used = {4397, 12, 1628, 634, 618, 206, 628} \[ -\frac{2 a c \tanh ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2+c^2}}\right )}{\left (b^2-c^2\right ) \sqrt{a^2-b^2+c^2}}-\frac{b \log \left (2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )+b+c\right )}{b^2-c^2}+\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*a*c*ArcTanh[(a + (b - c)*Tanh[x/2])/Sqrt[a^2 - b^2 + c^2]])/((b^2 - c^2)*Sqrt[a^2 - b^2 + c^2]) + Log[Tanh
[x/2]]/(b + c) - (b*Log[b + c + 2*a*Tanh[x/2] + (b - c)*Tanh[x/2]^2])/(b^2 - c^2)

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

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

Rule 618

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

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

Mathematica [A]  time = 0.193392, size = 97, normalized size = 0.82 \[ \frac{-\frac{2 a c \tan ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2+b^2-c^2}}\right )}{\sqrt{-a^2+b^2-c^2}}+b \log (a \sinh (x)+b \cosh (x)+c)-b \log (\sinh (x))+c \log \left (\tanh \left (\frac{x}{2}\right )\right )}{c^2-b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((-2*a*c*ArcTan[(a + (b - c)*Tanh[x/2])/Sqrt[-a^2 + b^2 - c^2]])/Sqrt[-a^2 + b^2 - c^2] - b*Log[Sinh[x]] + b*L
og[c + b*Cosh[x] + a*Sinh[x]] + c*Log[Tanh[x/2]])/(-b^2 + c^2)

________________________________________________________________________________________

Maple [A]  time = 0.038, size = 180, normalized size = 1.5 \begin{align*} -{\frac{b}{ \left ( b-c \right ) \left ( b+c \right ) }\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}c+2\,a\tanh \left ( x/2 \right ) +b+c \right ) }-2\,{\frac{a}{ \left ( b+c \right ) \sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}\arctan \left ( 1/2\,{\frac{2\, \left ( b-c \right ) \tanh \left ( x/2 \right ) +2\,a}{\sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}} \right ) }+2\,{\frac{ab}{ \left ( b+c \right ) \sqrt{-{a}^{2}+{b}^{2}-{c}^{2}} \left ( b-c \right ) }\arctan \left ( 1/2\,{\frac{2\, \left ( b-c \right ) \tanh \left ( x/2 \right ) +2\,a}{\sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}} \right ) }+{\frac{1}{b+c}\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)^2/(a+b*coth(x)+c*csch(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 14.5817, size = 1372, normalized size = 11.63 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-(sqrt(a^2 - b^2 + c^2)*a*c*log((2*(a + b)*c*cosh(x) + (a^2 + 2*a*b + b^2)*cosh(x)^2 + (a^2 + 2*a*b + b^2)*si
nh(x)^2 + a^2 - b^2 + 2*c^2 + 2*((a + b)*c + (a^2 + 2*a*b + b^2)*cosh(x))*sinh(x) + 2*sqrt(a^2 - b^2 + c^2)*((
a + b)*cosh(x) + (a + b)*sinh(x) + c))/((a + b)*cosh(x)^2 + (a + b)*sinh(x)^2 + 2*c*cosh(x) + 2*((a + b)*cosh(
x) + c)*sinh(x) - a + b)) + (a^2*b - b^3 + b*c^2)*log(2*(b*cosh(x) + a*sinh(x) + c)/(cosh(x) - sinh(x))) - (a^
2*b - b^3 + b*c^2 + c^3 + (a^2 - b^2)*c)*log(cosh(x) + sinh(x) + 1) - (a^2*b - b^3 + b*c^2 - c^3 - (a^2 - b^2)
*c)*log(cosh(x) + sinh(x) - 1))/(a^2*b^2 - b^4 - c^4 - (a^2 - 2*b^2)*c^2), (2*sqrt(-a^2 + b^2 - c^2)*a*c*arcta
n(sqrt(-a^2 + b^2 - c^2)*((a + b)*cosh(x) + (a + b)*sinh(x) + c)/(a^2 - b^2 + c^2)) - (a^2*b - b^3 + b*c^2)*lo
g(2*(b*cosh(x) + a*sinh(x) + c)/(cosh(x) - sinh(x))) + (a^2*b - b^3 + b*c^2 + c^3 + (a^2 - b^2)*c)*log(cosh(x)
 + sinh(x) + 1) + (a^2*b - b^3 + b*c^2 - c^3 - (a^2 - b^2)*c)*log(cosh(x) + sinh(x) - 1))/(a^2*b^2 - b^4 - c^4
 - (a^2 - 2*b^2)*c^2)]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15592, size = 165, normalized size = 1.4 \begin{align*} \frac{2 \, a c \arctan \left (\frac{a e^{x} + b e^{x} + c}{\sqrt{-a^{2} + b^{2} - c^{2}}}\right )}{\sqrt{-a^{2} + b^{2} - c^{2}}{\left (b^{2} - c^{2}\right )}} - \frac{b \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + 2 \, c e^{x} - a + b\right )}{b^{2} - c^{2}} + \frac{\log \left (e^{x} + 1\right )}{b - c} + \frac{\log \left ({\left | e^{x} - 1 \right |}\right )}{b + c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*a*c*arctan((a*e^x + b*e^x + c)/sqrt(-a^2 + b^2 - c^2))/(sqrt(-a^2 + b^2 - c^2)*(b^2 - c^2)) - b*log(a*e^(2*x
) + b*e^(2*x) + 2*c*e^x - a + b)/(b^2 - c^2) + log(e^x + 1)/(b - c) + log(abs(e^x - 1))/(b + c)