3.121 \(\int \frac{\coth ^4(x)}{a+b \text{csch}(x)} \, dx\)

Optimal. Leaf size=88 \[ \frac{2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac{a-b \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a b^3}-\frac{\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac{a \coth (x)}{b^2}+\frac{x}{a}-\frac{\coth (x) \text{csch}(x)}{2 b} \]

[Out]

x/a - ((2*a^2 + 3*b^2)*ArcTanh[Cosh[x]])/(2*b^3) + (2*(a^2 + b^2)^(3/2)*ArcTanh[(a - b*Tanh[x/2])/Sqrt[a^2 + b
^2]])/(a*b^3) + (a*Coth[x])/b^2 - (Coth[x]*Csch[x])/(2*b)

________________________________________________________________________________________

Rubi [A]  time = 0.332179, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3898, 2893, 3057, 2660, 618, 204, 3770} \[ \frac{2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac{a-b \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a b^3}-\frac{\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac{a \coth (x)}{b^2}+\frac{x}{a}-\frac{\coth (x) \text{csch}(x)}{2 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/a - ((2*a^2 + 3*b^2)*ArcTanh[Cosh[x]])/(2*b^3) + (2*(a^2 + b^2)^(3/2)*ArcTanh[(a - b*Tanh[x/2])/Sqrt[a^2 + b
^2]])/(a*b^3) + (a*Coth[x])/b^2 - (Coth[x]*Csch[x])/(2*b)

Rule 3898

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

Rule 2893

Int[cos[(e_.) + (f_.)*(x_)]^4*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)
, x_Symbol] :> Simp[(Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*(d*Sin[e + f*x])^(n + 1))/(a*d*f*(n + 1)), x] +
 (-Dist[1/(a^2*d^2*(n + 1)*(n + 2)), Int[(a + b*Sin[e + f*x])^m*(d*Sin[e + f*x])^(n + 2)*Simp[a^2*n*(n + 2) -
b^2*(m + n + 2)*(m + n + 3) + a*b*m*Sin[e + f*x] - (a^2*(n + 1)*(n + 2) - b^2*(m + n + 2)*(m + n + 4))*Sin[e +
 f*x]^2, x], x], x] - Simp[(b*(m + n + 2)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*(d*Sin[e + f*x])^(n + 2))/
(a^2*d^2*f*(n + 1)*(n + 2)), x]) /; FreeQ[{a, b, d, e, f, m}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || Intege
rsQ[2*m, 2*n]) &&  !m < -1 && LtQ[n, -1] && (LtQ[n, -2] || EqQ[m + n + 4, 0])

Rule 3057

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2)/(((a_) + (b_.)*sin[(e_.) + (f_.)
*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(C*x)/(b*d), x] + (Dist[(A*b^2 - a*b*B + a
^2*C)/(b*(b*c - a*d)), Int[1/(a + b*Sin[e + f*x]), x], x] - Dist[(c^2*C - B*c*d + A*d^2)/(d*(b*c - a*d)), Int[
1/(c + d*Sin[e + f*x]), x], x]) /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2
, 0] && NeQ[c^2 - d^2, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

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 204

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

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

Mathematica [A]  time = 0.574497, size = 151, normalized size = 1.72 \[ \frac{\text{csch}(x) (a \sinh (x)+b) \left (4 a \left (2 a^2+3 b^2\right ) \log \left (\tanh \left (\frac{x}{2}\right )\right )-16 \left (-a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{a-b \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )+4 a^2 b \tanh \left (\frac{x}{2}\right )+4 a^2 b \coth \left (\frac{x}{2}\right )-a b^2 \text{csch}^2\left (\frac{x}{2}\right )-a b^2 \text{sech}^2\left (\frac{x}{2}\right )+8 b^3 x\right )}{8 a b^3 (a+b \text{csch}(x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Csch[x]*(b + a*Sinh[x])*(8*b^3*x - 16*(-a^2 - b^2)^(3/2)*ArcTan[(a - b*Tanh[x/2])/Sqrt[-a^2 - b^2]] + 4*a^2*b
*Coth[x/2] - a*b^2*Csch[x/2]^2 + 4*a*(2*a^2 + 3*b^2)*Log[Tanh[x/2]] - a*b^2*Sech[x/2]^2 + 4*a^2*b*Tanh[x/2]))/
(8*a*b^3*(a + b*Csch[x]))

________________________________________________________________________________________

Maple [B]  time = 0.038, size = 207, normalized size = 2.4 \begin{align*}{\frac{1}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}}+{\frac{a}{2\,{b}^{2}}\tanh \left ({\frac{x}{2}} \right ) }+{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-2\,{\frac{{a}^{3}}{{b}^{3}\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tanh \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-4\,{\frac{a}{b\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tanh \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-2\,{\frac{b}{a\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tanh \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-{\frac{1}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-2}}+{\frac{{a}^{2}}{{b}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+{\frac{3}{2\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+{\frac{a}{2\,{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(x)^4/(a+b*csch(x)),x)

[Out]

1/8/b*tanh(1/2*x)^2+1/2/b^2*a*tanh(1/2*x)+1/a*ln(tanh(1/2*x)+1)-2*a^3/b^3/(a^2+b^2)^(1/2)*arctanh(1/2*(2*tanh(
1/2*x)*b-2*a)/(a^2+b^2)^(1/2))-4*a/b/(a^2+b^2)^(1/2)*arctanh(1/2*(2*tanh(1/2*x)*b-2*a)/(a^2+b^2)^(1/2))-2/a*b/
(a^2+b^2)^(1/2)*arctanh(1/2*(2*tanh(1/2*x)*b-2*a)/(a^2+b^2)^(1/2))-1/8/b/tanh(1/2*x)^2+1/b^3*ln(tanh(1/2*x))*a
^2+3/2/b*ln(tanh(1/2*x))+1/2*a/b^2/tanh(1/2*x)-1/a*ln(tanh(1/2*x)-1)

________________________________________________________________________________________

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(coth(x)^4/(a+b*csch(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.26011, size = 2174, normalized size = 24.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(2*b^3*x*cosh(x)^4 + 2*b^3*x*sinh(x)^4 - 2*a*b^2*cosh(x)^3 + 2*b^3*x - 2*a*b^2*cosh(x) + 2*(4*b^3*x*cosh(x
) - a*b^2)*sinh(x)^3 - 4*a^2*b - 4*(b^3*x - a^2*b)*cosh(x)^2 + 2*(6*b^3*x*cosh(x)^2 - 2*b^3*x - 3*a*b^2*cosh(x
) + 2*a^2*b)*sinh(x)^2 + 2*((a^2 + b^2)*cosh(x)^4 + 4*(a^2 + b^2)*cosh(x)*sinh(x)^3 + (a^2 + b^2)*sinh(x)^4 -
2*(a^2 + b^2)*cosh(x)^2 + 2*(3*(a^2 + b^2)*cosh(x)^2 - a^2 - b^2)*sinh(x)^2 + a^2 + b^2 + 4*((a^2 + b^2)*cosh(
x)^3 - (a^2 + b^2)*cosh(x))*sinh(x))*sqrt(a^2 + b^2)*log((a^2*cosh(x)^2 + a^2*sinh(x)^2 + 2*a*b*cosh(x) + a^2
+ 2*b^2 + 2*(a^2*cosh(x) + a*b)*sinh(x) + 2*sqrt(a^2 + b^2)*(a*cosh(x) + a*sinh(x) + b))/(a*cosh(x)^2 + a*sinh
(x)^2 + 2*b*cosh(x) + 2*(a*cosh(x) + b)*sinh(x) - a)) - ((2*a^3 + 3*a*b^2)*cosh(x)^4 + 4*(2*a^3 + 3*a*b^2)*cos
h(x)*sinh(x)^3 + (2*a^3 + 3*a*b^2)*sinh(x)^4 + 2*a^3 + 3*a*b^2 - 2*(2*a^3 + 3*a*b^2)*cosh(x)^2 - 2*(2*a^3 + 3*
a*b^2 - 3*(2*a^3 + 3*a*b^2)*cosh(x)^2)*sinh(x)^2 + 4*((2*a^3 + 3*a*b^2)*cosh(x)^3 - (2*a^3 + 3*a*b^2)*cosh(x))
*sinh(x))*log(cosh(x) + sinh(x) + 1) + ((2*a^3 + 3*a*b^2)*cosh(x)^4 + 4*(2*a^3 + 3*a*b^2)*cosh(x)*sinh(x)^3 +
(2*a^3 + 3*a*b^2)*sinh(x)^4 + 2*a^3 + 3*a*b^2 - 2*(2*a^3 + 3*a*b^2)*cosh(x)^2 - 2*(2*a^3 + 3*a*b^2 - 3*(2*a^3
+ 3*a*b^2)*cosh(x)^2)*sinh(x)^2 + 4*((2*a^3 + 3*a*b^2)*cosh(x)^3 - (2*a^3 + 3*a*b^2)*cosh(x))*sinh(x))*log(cos
h(x) + sinh(x) - 1) + 2*(4*b^3*x*cosh(x)^3 - 3*a*b^2*cosh(x)^2 - a*b^2 - 4*(b^3*x - a^2*b)*cosh(x))*sinh(x))/(
a*b^3*cosh(x)^4 + 4*a*b^3*cosh(x)*sinh(x)^3 + a*b^3*sinh(x)^4 - 2*a*b^3*cosh(x)^2 + a*b^3 + 2*(3*a*b^3*cosh(x)
^2 - a*b^3)*sinh(x)^2 + 4*(a*b^3*cosh(x)^3 - a*b^3*cosh(x))*sinh(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.20455, size = 217, normalized size = 2.47 \begin{align*} \frac{x}{a} - \frac{{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{x} + 1\right )}{2 \, b^{3}} + \frac{{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, b^{3}} - \frac{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac{{\left | 2 \, a e^{x} + 2 \, b - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, a e^{x} + 2 \, b + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{\sqrt{a^{2} + b^{2}} a b^{3}} - \frac{b e^{\left (3 \, x\right )} - 2 \, a e^{\left (2 \, x\right )} + b e^{x} + 2 \, a}{b^{2}{\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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