\(\int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx\) [186]

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

Optimal result

Integrand size = 13, antiderivative size = 137 \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\frac {2 a^4 \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2}}-\frac {a^3 \coth (x)}{\left (a^2-b^2\right )^2}-\frac {a \coth ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \text {csch}(x)}{\left (a^2-b^2\right )^2}+\frac {b \text {csch}(x)}{a^2-b^2}+\frac {b \text {csch}^3(x)}{3 \left (a^2-b^2\right )} \]

[Out]

2*a^4*arctanh((a-b)^(1/2)*tanh(1/2*x)/(a+b)^(1/2))/(a-b)^(5/2)/(a+b)^(5/2)-a^3*coth(x)/(a^2-b^2)^2-1/3*a*coth(
x)^3/(a^2-b^2)+a^2*b*csch(x)/(a^2-b^2)^2+b*csch(x)/(a^2-b^2)+1/3*b*csch(x)^3/(a^2-b^2)

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {2806, 2687, 30, 2686, 3852, 8, 2738, 214} \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\frac {2 a^4 \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2}}-\frac {a \coth ^3(x)}{3 \left (a^2-b^2\right )}+\frac {b \text {csch}^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \text {csch}(x)}{\left (a^2-b^2\right )^2}+\frac {b \text {csch}(x)}{a^2-b^2}-\frac {a^3 \coth (x)}{\left (a^2-b^2\right )^2} \]

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 214

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

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*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 2806

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[a/(a^2 - b^
2), Int[(g*Tan[e + f*x])^p/Sin[e + f*x]^2, x], x] + (-Dist[b*(g/(a^2 - b^2)), Int[(g*Tan[e + f*x])^(p - 1)/Cos
[e + f*x], x], x] - Dist[a^2*(g^2/(a^2 - b^2)), Int[(g*Tan[e + f*x])^(p - 2)/(a + b*Sin[e + f*x]), x], x]) /;
FreeQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[2*p] && GtQ[p, 1]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

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

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.96 \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\frac {1}{24} \left (-\frac {48 a^4 \arctan \left (\frac {(a-b) \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{5/2}}-\frac {2 (8 a+5 b) \coth \left (\frac {x}{2}\right )}{(a+b)^2}+\frac {8 \text {csch}^3(x) \sinh ^4\left (\frac {x}{2}\right )}{a-b}-\frac {\text {csch}^4\left (\frac {x}{2}\right ) \sinh (x)}{2 (a+b)}+\frac {2 (-8 a+5 b) \tanh \left (\frac {x}{2}\right )}{(a-b)^2}\right ) \]

[In]

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

[Out]

((-48*a^4*ArcTan[((a - b)*Tanh[x/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(5/2) - (2*(8*a + 5*b)*Coth[x/2])/(a + b)
^2 + (8*Csch[x]^3*Sinh[x/2]^4)/(a - b) - (Csch[x/2]^4*Sinh[x])/(2*(a + b)) + (2*(-8*a + 5*b)*Tanh[x/2])/(a - b
)^2)/24

Maple [A] (verified)

Time = 1.03 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.93

method result size
default \(-\frac {\frac {a \tanh \left (\frac {x}{2}\right )^{3}}{3}-\frac {b \tanh \left (\frac {x}{2}\right )^{3}}{3}+5 a \tanh \left (\frac {x}{2}\right )-3 b \tanh \left (\frac {x}{2}\right )}{8 \left (a -b \right )^{2}}-\frac {1}{24 \left (a +b \right ) \tanh \left (\frac {x}{2}\right )^{3}}-\frac {5 a +3 b}{8 \left (a +b \right )^{2} \tanh \left (\frac {x}{2}\right )}+\frac {2 a^{4} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a -b \right )^{2} \left (a +b \right )^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}\) \(127\)
risch \(-\frac {2 \left (-6 a^{2} b \,{\mathrm e}^{5 x}+3 b^{3} {\mathrm e}^{5 x}+6 a^{3} {\mathrm e}^{4 x}-3 a \,b^{2} {\mathrm e}^{4 x}+8 a^{2} b \,{\mathrm e}^{3 x}-2 b^{3} {\mathrm e}^{3 x}-6 a^{3} {\mathrm e}^{2 x}-6 a^{2} b \,{\mathrm e}^{x}+3 b^{3} {\mathrm e}^{x}+4 a^{3}-a \,b^{2}\right )}{3 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \left ({\mathrm e}^{2 x}-1\right )^{3}}+\frac {a^{4} \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}-a^{2}+b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}-\frac {a^{4} \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}+a^{2}-b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}\) \(259\)

[In]

int(coth(x)^4/(a+b*cosh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1174 vs. \(2 (123) = 246\).

Time = 0.27 (sec) , antiderivative size = 2417, normalized size of antiderivative = 17.64 \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\text {Too large to display} \]

[In]

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

[Out]

[1/3*(6*(2*a^4*b - 3*a^2*b^3 + b^5)*cosh(x)^5 + 6*(2*a^4*b - 3*a^2*b^3 + b^5)*sinh(x)^5 - 8*a^5 + 10*a^3*b^2 -
 2*a*b^4 - 6*(2*a^5 - 3*a^3*b^2 + a*b^4)*cosh(x)^4 - 6*(2*a^5 - 3*a^3*b^2 + a*b^4 - 5*(2*a^4*b - 3*a^2*b^3 + b
^5)*cosh(x))*sinh(x)^4 - 4*(4*a^4*b - 5*a^2*b^3 + b^5)*cosh(x)^3 - 4*(4*a^4*b - 5*a^2*b^3 + b^5 - 15*(2*a^4*b
- 3*a^2*b^3 + b^5)*cosh(x)^2 + 6*(2*a^5 - 3*a^3*b^2 + a*b^4)*cosh(x))*sinh(x)^3 + 12*(a^5 - a^3*b^2)*cosh(x)^2
 + 12*(a^5 - a^3*b^2 + 5*(2*a^4*b - 3*a^2*b^3 + b^5)*cosh(x)^3 - 3*(2*a^5 - 3*a^3*b^2 + a*b^4)*cosh(x)^2 - (4*
a^4*b - 5*a^2*b^3 + b^5)*cosh(x))*sinh(x)^2 + 3*(a^4*cosh(x)^6 + 6*a^4*cosh(x)*sinh(x)^5 + a^4*sinh(x)^6 - 3*a
^4*cosh(x)^4 + 3*a^4*cosh(x)^2 + 3*(5*a^4*cosh(x)^2 - a^4)*sinh(x)^4 - a^4 + 4*(5*a^4*cosh(x)^3 - 3*a^4*cosh(x
))*sinh(x)^3 + 3*(5*a^4*cosh(x)^4 - 6*a^4*cosh(x)^2 + a^4)*sinh(x)^2 + 6*(a^4*cosh(x)^5 - 2*a^4*cosh(x)^3 + a^
4*cosh(x))*sinh(x))*sqrt(a^2 - b^2)*log((b^2*cosh(x)^2 + b^2*sinh(x)^2 + 2*a*b*cosh(x) + 2*a^2 - b^2 + 2*(b^2*
cosh(x) + a*b)*sinh(x) - 2*sqrt(a^2 - b^2)*(b*cosh(x) + b*sinh(x) + a))/(b*cosh(x)^2 + b*sinh(x)^2 + 2*a*cosh(
x) + 2*(b*cosh(x) + a)*sinh(x) + b)) + 6*(2*a^4*b - 3*a^2*b^3 + b^5)*cosh(x) + 6*(2*a^4*b - 3*a^2*b^3 + b^5 +
5*(2*a^4*b - 3*a^2*b^3 + b^5)*cosh(x)^4 - 4*(2*a^5 - 3*a^3*b^2 + a*b^4)*cosh(x)^3 - 2*(4*a^4*b - 5*a^2*b^3 + b
^5)*cosh(x)^2 + 4*(a^5 - a^3*b^2)*cosh(x))*sinh(x))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^6 + 6*(a^6 -
3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)*sinh(x)^5 + (a^6 - 3*a^4*b^2 + 3*a^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 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^2)*sinh(x)^4 + 4*(5*(
a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^3 - 3*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x))*sinh(x)^3 + 3*(a
^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^2 + 3*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6 + 5*(a^6 - 3*a^4*b^2 + 3*a^
2*b^4 - b^6)*cosh(x)^4 - 6*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^2)*sinh(x)^2 + 6*((a^6 - 3*a^4*b^2 + 3*
a^2*b^4 - b^6)*cosh(x)^5 - 2*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*cosh(x)^3 + (a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^
6)*cosh(x))*sinh(x))]

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\text {Exception raised: ValueError} \]

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
 for more de

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.26 \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\frac {2 \, a^{4} \arctan \left (\frac {b e^{x} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {2 \, {\left (6 \, a^{2} b e^{\left (5 \, x\right )} - 3 \, b^{3} e^{\left (5 \, x\right )} - 6 \, a^{3} e^{\left (4 \, x\right )} + 3 \, a b^{2} e^{\left (4 \, x\right )} - 8 \, a^{2} b e^{\left (3 \, x\right )} + 2 \, b^{3} e^{\left (3 \, x\right )} + 6 \, a^{3} e^{\left (2 \, x\right )} + 6 \, a^{2} b e^{x} - 3 \, b^{3} e^{x} - 4 \, a^{3} + a b^{2}\right )}}{3 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \]

[In]

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

[Out]

2*a^4*arctan((b*e^x + a)/sqrt(-a^2 + b^2))/((a^4 - 2*a^2*b^2 + b^4)*sqrt(-a^2 + b^2)) + 2/3*(6*a^2*b*e^(5*x) -
 3*b^3*e^(5*x) - 6*a^3*e^(4*x) + 3*a*b^2*e^(4*x) - 8*a^2*b*e^(3*x) + 2*b^3*e^(3*x) + 6*a^3*e^(2*x) + 6*a^2*b*e
^x - 3*b^3*e^x - 4*a^3 + a*b^2)/((a^4 - 2*a^2*b^2 + b^4)*(e^(2*x) - 1)^3)

Mupad [B] (verification not implemented)

Time = 2.55 (sec) , antiderivative size = 666, normalized size of antiderivative = 4.86 \[ \int \frac {\coth ^4(x)}{a+b \cosh (x)} \, dx=\frac {\frac {4\,\left (a\,b^2-a^3\right )}{{\left (a^2-b^2\right )}^2}+\frac {8\,{\mathrm {e}}^x\,\left (a^2\,b-b^3\right )}{3\,{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {\frac {8\,a}{3\,\left (a^2-b^2\right )}-\frac {8\,b\,{\mathrm {e}}^x}{3\,\left (a^2-b^2\right )}}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1}-\frac {\frac {2\,a\,\left (2\,a^2-b^2\right )}{{\left (a^2-b^2\right )}^2}-\frac {2\,b\,{\mathrm {e}}^x\,\left (2\,a^2-b^2\right )}{{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{2\,x}-1}+\frac {2\,\mathrm {atan}\left (\left ({\mathrm {e}}^x\,\left (\frac {2\,a^4}{b^2\,{\left (a^2-b^2\right )}^2\,\sqrt {a^8}\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {2\,\left (a^5\,\sqrt {a^8}-2\,a^3\,b^2\,\sqrt {a^8}+a\,b^4\,\sqrt {a^8}\right )}{a^3\,b^2\,\sqrt {-{\left (a^2-b^2\right )}^5}\,\left (a^4-2\,a^2\,b^2+b^4\right )\,\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}}\right )+\frac {2\,\left (b^5\,\sqrt {a^8}-2\,a^2\,b^3\,\sqrt {a^8}+a^4\,b\,\sqrt {a^8}\right )}{a^3\,b^2\,\sqrt {-{\left (a^2-b^2\right )}^5}\,\left (a^4-2\,a^2\,b^2+b^4\right )\,\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}}\right )\,\left (\frac {b^5\,\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}}{2}-a^2\,b^3\,\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}+\frac {a^4\,b\,\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}}{2}\right )\right )\,\sqrt {a^8}}{\sqrt {-a^{10}+5\,a^8\,b^2-10\,a^6\,b^4+10\,a^4\,b^6-5\,a^2\,b^8+b^{10}}} \]

[In]

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

[Out]

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