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

Optimal result
Mathematica [A] (verified)
Rubi [C] (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)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 88 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\frac {x}{a}-\frac {\left (2 a^2+3 b^2\right ) \text {arctanh}(\cosh (x))}{2 b^3}+\frac {2 \left (a^2+b^2\right )^{3/2} \text {arctanh}\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} \] Output:

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

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.95 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\frac {\text {csch}(x) (b+a \sinh (x)) \left (8 b^3 x-16 \left (-a^2-b^2\right )^{3/2} \arctan \left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )+4 a^2 b \coth \left (\frac {x}{2}\right )-a b^2 \text {csch}^2\left (\frac {x}{2}\right )-4 a \left (2 a^2+3 b^2\right ) \log \left (\cosh \left (\frac {x}{2}\right )\right )+4 a \left (2 a^2+3 b^2\right ) \log \left (\sinh \left (\frac {x}{2}\right )\right )-a b^2 \text {sech}^2\left (\frac {x}{2}\right )+4 a^2 b \tanh \left (\frac {x}{2}\right )\right )}{8 a b^3 (a+b \text {csch}(x))} \] Input:

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

Output:

(Csch[x]*(b + a*Sinh[x])*(8*b^3*x - 16*(-a^2 - b^2)^(3/2)*ArcTan[(a - b*Ta 
nh[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[Cosh[x/2]] + 4*a*(2*a^2 + 3*b^2)*Log[Sinh[x/2]] - a*b^2 
*Sech[x/2]^2 + 4*a^2*b*Tanh[x/2]))/(8*a*b^3*(a + b*Csch[x]))
 

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.79 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.34, number of steps used = 19, number of rules used = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.385, Rules used = {3042, 4386, 26, 26, 3042, 26, 3372, 26, 3042, 26, 3536, 26, 3042, 26, 3139, 1083, 219, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cot (i x)^4}{a+i b \csc (i x)}dx\)

\(\Big \downarrow \) 4386

\(\displaystyle \int \frac {i \cosh (x) \coth ^3(x)}{i a \sinh (x)+i b}dx\)

\(\Big \downarrow \) 26

\(\displaystyle i \int -\frac {i \cosh (x) \coth ^3(x)}{b+a \sinh (x)}dx\)

\(\Big \downarrow \) 26

\(\displaystyle \int \frac {\cosh (x) \coth ^3(x)}{a \sinh (x)+b}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {i \cos (i x)^4}{\sin (i x)^3 (b-i a \sin (i x))}dx\)

\(\Big \downarrow \) 26

\(\displaystyle -i \int \frac {\cos (i x)^4}{\sin (i x)^3 (b-i a \sin (i x))}dx\)

\(\Big \downarrow \) 3372

\(\displaystyle -i \left (-\frac {\int -\frac {i \text {csch}(x) \left (2 a^2-b \sinh (x) a+3 b^2+2 b^2 \sinh ^2(x)\right )}{b+a \sinh (x)}dx}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (\frac {i \int \frac {\text {csch}(x) \left (2 a^2-b \sinh (x) a+3 b^2+2 b^2 \sinh ^2(x)\right )}{b+a \sinh (x)}dx}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -i \left (\frac {i \int \frac {i \left (2 a^2+i b \sin (i x) a+3 b^2-2 b^2 \sin (i x)^2\right )}{\sin (i x) (b-i a \sin (i x))}dx}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (-\frac {\int \frac {2 a^2+i b \sin (i x) a+3 b^2-2 b^2 \sin (i x)^2}{\sin (i x) (b-i a \sin (i x))}dx}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 3536

\(\displaystyle -i \left (-\frac {\frac {2 i \left (a^2+b^2\right )^2 \int \frac {1}{b+a \sinh (x)}dx}{a b}+\frac {\left (2 a^2+3 b^2\right ) \int -i \text {csch}(x)dx}{b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (-\frac {\frac {2 i \left (a^2+b^2\right )^2 \int \frac {1}{b+a \sinh (x)}dx}{a b}-\frac {i \left (2 a^2+3 b^2\right ) \int \text {csch}(x)dx}{b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -i \left (-\frac {\frac {2 i \left (a^2+b^2\right )^2 \int \frac {1}{b-i a \sin (i x)}dx}{a b}-\frac {i \left (2 a^2+3 b^2\right ) \int i \csc (i x)dx}{b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (-\frac {\frac {2 i \left (a^2+b^2\right )^2 \int \frac {1}{b-i a \sin (i x)}dx}{a b}+\frac {\left (2 a^2+3 b^2\right ) \int \csc (i x)dx}{b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 3139

\(\displaystyle -i \left (-\frac {\frac {\left (2 a^2+3 b^2\right ) \int \csc (i x)dx}{b}+\frac {4 i \left (a^2+b^2\right )^2 \int \frac {1}{-b \tanh ^2\left (\frac {x}{2}\right )+2 a \tanh \left (\frac {x}{2}\right )+b}d\tanh \left (\frac {x}{2}\right )}{a b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 1083

\(\displaystyle -i \left (-\frac {\frac {\left (2 a^2+3 b^2\right ) \int \csc (i x)dx}{b}-\frac {8 i \left (a^2+b^2\right )^2 \int \frac {1}{4 \left (a^2+b^2\right )-\left (2 a-2 b \tanh \left (\frac {x}{2}\right )\right )^2}d\left (2 a-2 b \tanh \left (\frac {x}{2}\right )\right )}{a b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 219

\(\displaystyle -i \left (-\frac {\frac {\left (2 a^2+3 b^2\right ) \int \csc (i x)dx}{b}-\frac {4 i \left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {2 a-2 b \tanh \left (\frac {x}{2}\right )}{2 \sqrt {a^2+b^2}}\right )}{a b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

\(\Big \downarrow \) 4257

\(\displaystyle -i \left (-\frac {\frac {i \left (2 a^2+3 b^2\right ) \text {arctanh}(\cosh (x))}{b}-\frac {4 i \left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {2 a-2 b \tanh \left (\frac {x}{2}\right )}{2 \sqrt {a^2+b^2}}\right )}{a b}-\frac {2 i b^2 x}{a}}{2 b^2}+\frac {i a \coth (x)}{b^2}-\frac {i \coth (x) \text {csch}(x)}{2 b}\right )\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

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

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3139
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre 
eFactors[Tan[(c + d*x)/2], x]}, Simp[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 3372
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] + (-Si 
mp[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] - Simp[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]) /; FreeQ[{a, b, 
d, e, f, m}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n]) 
 &&  !m < -1 && LtQ[n, -1] && (LtQ[n, -2] || EqQ[m + n + 4, 0])
 

rule 3536
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] + (Simp[(A*b^2 - a*b*B + a^2*C) 
/(b*(b*c - a*d))   Int[1/(a + b*Sin[e + f*x]), x], x] - Simp[(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 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 

rule 4386
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])
 
Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.70

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

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 831 vs. \(2 (80) = 160\).

Time = 0.16 (sec) , antiderivative size = 831, normalized size of antiderivative = 9.44 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\text {Too large to display} \] Input:

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

Output:

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)*si 
nh(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)*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(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(cosh(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...
 

Sympy [F]

\[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\int \frac {\coth ^{4}{\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \] Input:

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (80) = 160\).

Time = 0.11 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.02 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\frac {b e^{\left (-x\right )} + 2 \, a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )} - 2 \, a}{2 \, b^{2} e^{\left (-2 \, x\right )} - b^{2} e^{\left (-4 \, x\right )} - b^{2}} + \frac {x}{a} - \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, b^{3}} + \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, b^{3}} - \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {a e^{\left (-x\right )} - b - \sqrt {a^{2} + b^{2}}}{a e^{\left (-x\right )} - b + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a b^{3}} \] Input:

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

Output:

(b*e^(-x) + 2*a*e^(-2*x) + b*e^(-3*x) - 2*a)/(2*b^2*e^(-2*x) - b^2*e^(-4*x 
) - b^2) + 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(e^(-x) - 1)/b^3 - (a^4 + 2*a^2*b^2 + b^4)*log((a*e^(-x) - b - sqr 
t(a^2 + b^2))/(a*e^(-x) - b + sqrt(a^2 + b^2)))/(sqrt(a^2 + b^2)*a*b^3)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (80) = 160\).

Time = 0.13 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.83 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\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}} \] Input:

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

Output:

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)
 

Mupad [B] (verification not implemented)

Time = 3.73 (sec) , antiderivative size = 378, normalized size of antiderivative = 4.30 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\frac {\frac {2\,a}{b^2}-\frac {{\mathrm {e}}^x}{b}}{{\mathrm {e}}^{2\,x}-1}+\frac {x}{a}+\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (2\,a^2+3\,b^2\right )}{2\,b^3}-\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (2\,a^2+3\,b^2\right )}{2\,b^3}-\frac {2\,{\mathrm {e}}^x}{b\,\left ({\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1\right )}+\frac {\ln \left (a^3\,\sqrt {{\left (a^2+b^2\right )}^3}-2\,a^5\,b-2\,a\,b^5-4\,a^3\,b^3+a^6\,{\mathrm {e}}^x+4\,b^6\,{\mathrm {e}}^x+2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^3}-4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}+9\,a^2\,b^4\,{\mathrm {e}}^x+6\,a^4\,b^2\,{\mathrm {e}}^x-3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a\,b^3}-\frac {\ln \left (a^6\,{\mathrm {e}}^x-2\,a^5\,b-a^3\,\sqrt {{\left (a^2+b^2\right )}^3}-4\,a^3\,b^3-2\,a\,b^5+4\,b^6\,{\mathrm {e}}^x-2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^3}+4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}+9\,a^2\,b^4\,{\mathrm {e}}^x+6\,a^4\,b^2\,{\mathrm {e}}^x+3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a\,b^3} \] Input:

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

Output:

((2*a)/b^2 - exp(x)/b)/(exp(2*x) - 1) + x/a + (log(exp(x) - 1)*(2*a^2 + 3* 
b^2))/(2*b^3) - (log(exp(x) + 1)*(2*a^2 + 3*b^2))/(2*b^3) - (2*exp(x))/(b* 
(exp(4*x) - 2*exp(2*x) + 1)) + (log(a^3*((a^2 + b^2)^3)^(1/2) - 2*a^5*b - 
2*a*b^5 - 4*a^3*b^3 + a^6*exp(x) + 4*b^6*exp(x) + 2*a*b^2*((a^2 + b^2)^3)^ 
(1/2) - 4*b^3*exp(x)*((a^2 + b^2)^3)^(1/2) + 9*a^2*b^4*exp(x) + 6*a^4*b^2* 
exp(x) - 3*a^2*b*exp(x)*((a^2 + b^2)^3)^(1/2))*((a^2 + b^2)^3)^(1/2))/(a*b 
^3) - (log(a^6*exp(x) - 2*a^5*b - a^3*((a^2 + b^2)^3)^(1/2) - 4*a^3*b^3 - 
2*a*b^5 + 4*b^6*exp(x) - 2*a*b^2*((a^2 + b^2)^3)^(1/2) + 4*b^3*exp(x)*((a^ 
2 + b^2)^3)^(1/2) + 9*a^2*b^4*exp(x) + 6*a^4*b^2*exp(x) + 3*a^2*b*exp(x)*( 
(a^2 + b^2)^3)^(1/2))*((a^2 + b^2)^3)^(1/2))/(a*b^3)
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 504, normalized size of antiderivative = 5.73 \[ \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx=\frac {2 e^{4 x} a^{2} b -2 e^{3 x} a \,b^{2}-2 e^{x} a \,b^{2}+2 b^{3} x -4 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) b^{2} i +3 e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a \,b^{2}-3 e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a \,b^{2}+3 \,\mathrm {log}\left (e^{x}-1\right ) a \,b^{2}-3 \,\mathrm {log}\left (e^{x}+1\right ) a \,b^{2}-4 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) a^{2} i +8 e^{2 x} \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) a^{2} i +2 \,\mathrm {log}\left (e^{x}-1\right ) a^{3}-2 \,\mathrm {log}\left (e^{x}+1\right ) a^{3}-2 a^{2} b -4 e^{4 x} \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) a^{2} i -4 e^{4 x} \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) b^{2} i +8 e^{2 x} \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a i +b i}{\sqrt {a^{2}+b^{2}}}\right ) b^{2} i -4 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a^{3}+6 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a \,b^{2}-6 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a \,b^{2}+4 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a^{3}+2 e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a^{3}-2 e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a^{3}+2 e^{4 x} b^{3} x -4 e^{2 x} b^{3} x}{2 a \,b^{3} \left (e^{4 x}-2 e^{2 x}+1\right )} \] Input:

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

Output:

( - 4*e**(4*x)*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt(a**2 + b**2))* 
a**2*i - 4*e**(4*x)*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt(a**2 + b* 
*2))*b**2*i + 8*e**(2*x)*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt(a**2 
 + b**2))*a**2*i + 8*e**(2*x)*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt 
(a**2 + b**2))*b**2*i - 4*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt(a** 
2 + b**2))*a**2*i - 4*sqrt(a**2 + b**2)*atan((e**x*a*i + b*i)/sqrt(a**2 + 
b**2))*b**2*i + 2*e**(4*x)*log(e**x - 1)*a**3 + 3*e**(4*x)*log(e**x - 1)*a 
*b**2 - 2*e**(4*x)*log(e**x + 1)*a**3 - 3*e**(4*x)*log(e**x + 1)*a*b**2 + 
2*e**(4*x)*a**2*b + 2*e**(4*x)*b**3*x - 2*e**(3*x)*a*b**2 - 4*e**(2*x)*log 
(e**x - 1)*a**3 - 6*e**(2*x)*log(e**x - 1)*a*b**2 + 4*e**(2*x)*log(e**x + 
1)*a**3 + 6*e**(2*x)*log(e**x + 1)*a*b**2 - 4*e**(2*x)*b**3*x - 2*e**x*a*b 
**2 + 2*log(e**x - 1)*a**3 + 3*log(e**x - 1)*a*b**2 - 2*log(e**x + 1)*a**3 
 - 3*log(e**x + 1)*a*b**2 - 2*a**2*b + 2*b**3*x)/(2*a*b**3*(e**(4*x) - 2*e 
**(2*x) + 1))