\(\int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx\) [122]

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

Optimal result

Integrand size = 13, antiderivative size = 113 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\log (\cosh (x))}{a}+\frac {(2 a+3 b) \log (1-\text {sech}(x))}{4 (a+b)^2}+\frac {(2 a-3 b) \log (1+\text {sech}(x))}{4 (a-b)^2}+\frac {b^4 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )^2}-\frac {1}{4 (a+b) (1-\text {sech}(x))}-\frac {1}{4 (a-b) (1+\text {sech}(x))} \] Output:

ln(cosh(x))/a+1/4*(2*a+3*b)*ln(1-sech(x))/(a+b)^2+1/4*(2*a-3*b)*ln(1+sech( 
x))/(a-b)^2+b^4*ln(a+b*sech(x))/a/(a^2-b^2)^2-1/4/(a+b)/(1-sech(x))-1/4/(a 
-b)/(1+sech(x))
 

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.95 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {1}{4} \left (\frac {4 \log (\cosh (x))}{a}+\frac {(2 a+3 b) \log (1-\text {sech}(x))}{(a+b)^2}+\frac {(2 a-3 b) \log (1+\text {sech}(x))}{(a-b)^2}+\frac {4 b^4 \log (a+b \text {sech}(x))}{a (a-b)^2 (a+b)^2}+\frac {1}{(a+b) (-1+\text {sech}(x))}-\frac {1}{(a-b) (1+\text {sech}(x))}\right ) \] Input:

Integrate[Coth[x]^3/(a + b*Sech[x]),x]
 

Output:

((4*Log[Cosh[x]])/a + ((2*a + 3*b)*Log[1 - Sech[x]])/(a + b)^2 + ((2*a - 3 
*b)*Log[1 + Sech[x]])/(a - b)^2 + (4*b^4*Log[a + b*Sech[x]])/(a*(a - b)^2* 
(a + b)^2) + 1/((a + b)*(-1 + Sech[x])) - 1/((a - b)*(1 + Sech[x])))/4
 

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.23, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 26, 4373, 615, 2009}

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 ^3(x)}{a+b \text {sech}(x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {i}{\cot \left (\frac {\pi }{2}+i x\right )^3 \left (a+b \csc \left (\frac {\pi }{2}+i x\right )\right )}dx\)

\(\Big \downarrow \) 26

\(\displaystyle i \int \frac {1}{\cot \left (i x+\frac {\pi }{2}\right )^3 \left (a+b \csc \left (i x+\frac {\pi }{2}\right )\right )}dx\)

\(\Big \downarrow \) 4373

\(\displaystyle -b^4 \int \frac {\cosh (x)}{b (a+b \text {sech}(x)) \left (b^2-b^2 \text {sech}^2(x)\right )^2}d(b \text {sech}(x))\)

\(\Big \downarrow \) 615

\(\displaystyle -b^4 \int \left (\frac {3 b-2 a}{4 (a-b)^2 b^4 (\text {sech}(x) b+b)}+\frac {\cosh (x)}{a b^5}+\frac {2 a+3 b}{4 b^4 (a+b)^2 (b-b \text {sech}(x))}-\frac {1}{a (a-b)^2 (a+b)^2 (a+b \text {sech}(x))}+\frac {1}{4 b^3 (a+b) (b-b \text {sech}(x))^2}-\frac {1}{4 (a-b) b^3 (\text {sech}(x) b+b)^2}\right )d(b \text {sech}(x))\)

\(\Big \downarrow \) 2009

\(\displaystyle -b^4 \left (-\frac {\log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )^2}+\frac {\log (b \text {sech}(x))}{a b^4}-\frac {(2 a+3 b) \log (b-b \text {sech}(x))}{4 b^4 (a+b)^2}-\frac {(2 a-3 b) \log (b \text {sech}(x)+b)}{4 b^4 (a-b)^2}+\frac {1}{4 b^3 (a+b) (b-b \text {sech}(x))}+\frac {1}{4 b^3 (a-b) (b \text {sech}(x)+b)}\right )\)

Input:

Int[Coth[x]^3/(a + b*Sech[x]),x]
 

Output:

-(b^4*(Log[b*Sech[x]]/(a*b^4) - ((2*a + 3*b)*Log[b - b*Sech[x]])/(4*b^4*(a 
 + b)^2) - Log[a + b*Sech[x]]/(a*(a^2 - b^2)^2) - ((2*a - 3*b)*Log[b + b*S 
ech[x]])/(4*(a - b)^2*b^4) + 1/(4*b^3*(a + b)*(b - b*Sech[x])) + 1/(4*(a - 
 b)*b^3*(b + b*Sech[x]))))
 

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 615
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), 
 x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] 
 /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4373
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1))   Subst[Int[(b^2 - x^ 
2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, 
 d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 0.66 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.00

method result size
default \(-\frac {\tanh \left (\frac {x}{2}\right )^{2}}{8 \left (a -b \right )}+\frac {b^{4} \ln \left (a \tanh \left (\frac {x}{2}\right )^{2}-b \tanh \left (\frac {x}{2}\right )^{2}+a +b \right )}{\left (a -b \right )^{2} \left (a +b \right )^{2} a}-\frac {1}{8 \left (a +b \right ) \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\left (4 a +6 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{4 \left (a +b \right )^{2}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}\) \(113\)
risch \(\frac {x}{a}-\frac {x a}{a^{2}+2 a b +b^{2}}-\frac {3 x b}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {x a}{a^{2}-2 a b +b^{2}}+\frac {3 x b}{2 \left (a^{2}-2 a b +b^{2}\right )}-\frac {2 x \,b^{4}}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}-\frac {{\mathrm e}^{x} \left (-{\mathrm e}^{2 x} b +2 \,{\mathrm e}^{x} a -b \right )}{\left ({\mathrm e}^{2 x}-1\right )^{2} \left (a^{2}-b^{2}\right )}+\frac {a \ln \left ({\mathrm e}^{x}-1\right )}{a^{2}+2 a b +b^{2}}+\frac {3 \ln \left ({\mathrm e}^{x}-1\right ) b}{2 \left (a^{2}+2 a b +b^{2}\right )}+\frac {a \ln \left (1+{\mathrm e}^{x}\right )}{a^{2}-2 a b +b^{2}}-\frac {3 \ln \left (1+{\mathrm e}^{x}\right ) b}{2 \left (a^{2}-2 a b +b^{2}\right )}+\frac {b^{4} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}\) \(261\)

Input:

int(coth(x)^3/(a+b*sech(x)),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1222 vs. \(2 (103) = 206\).

Time = 0.15 (sec) , antiderivative size = 1222, normalized size of antiderivative = 10.81 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\text {Too large to display} \] Input:

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

Output:

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

Sympy [F]

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

integrate(coth(x)**3/(a+b*sech(x)),x)
 

Output:

Integral(coth(x)**3/(a + b*sech(x)), x)
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.45 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {b^{4} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{5} - 2 \, a^{3} b^{2} + a b^{4}} + \frac {{\left (2 \, a - 3 \, b\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (2 \, a + 3 \, b\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {b e^{\left (-x\right )} - 2 \, a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )}}{a^{2} - b^{2} - 2 \, {\left (a^{2} - b^{2}\right )} e^{\left (-2 \, x\right )} + {\left (a^{2} - b^{2}\right )} e^{\left (-4 \, x\right )}} + \frac {x}{a} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.71 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {b^{4} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{5} - 2 \, a^{3} b^{2} + a b^{4}} + \frac {{\left (2 \, a - 3 \, b\right )} \log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (2 \, a + 3 \, b\right )} \log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {a^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 2 \, a b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 2 \, a^{2} b {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b^{3} {\left (e^{\left (-x\right )} + e^{x}\right )} + 4 \, a b^{2}}{2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 4\right )}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.08 (sec) , antiderivative size = 339, normalized size of antiderivative = 3.00 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (2\,a+3\,b\right )}{2\,a^2+4\,a\,b+2\,b^2}-\frac {x}{a}-\frac {\frac {2\,a}{a^2-b^2}-\frac {2\,b\,{\mathrm {e}}^x}{a^2-b^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {\frac {2\,\left (a^4-a^2\,b^2\right )}{a\,{\left (a^2-b^2\right )}^2}-\frac {{\mathrm {e}}^x\,\left (a^2\,b-b^3\right )}{{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{2\,x}-1}+\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (2\,a-3\,b\right )}{2\,a^2-4\,a\,b+2\,b^2}+\frac {b^4\,\ln \left (4\,a^9\,{\mathrm {e}}^{2\,x}+4\,a\,b^8+4\,a^9+7\,a^3\,b^6+14\,a^5\,b^4-17\,a^7\,b^2+8\,b^9\,{\mathrm {e}}^x+7\,a^3\,b^6\,{\mathrm {e}}^{2\,x}+14\,a^5\,b^4\,{\mathrm {e}}^{2\,x}-17\,a^7\,b^2\,{\mathrm {e}}^{2\,x}+8\,a^8\,b\,{\mathrm {e}}^x+4\,a\,b^8\,{\mathrm {e}}^{2\,x}+14\,a^2\,b^7\,{\mathrm {e}}^x+28\,a^4\,b^5\,{\mathrm {e}}^x-34\,a^6\,b^3\,{\mathrm {e}}^x\right )}{a^5-2\,a^3\,b^2+a\,b^4} \] Input:

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

Output:

(log(exp(x) - 1)*(2*a + 3*b))/(4*a*b + 2*a^2 + 2*b^2) - x/a - ((2*a)/(a^2 
- b^2) - (2*b*exp(x))/(a^2 - b^2))/(exp(4*x) - 2*exp(2*x) + 1) - ((2*(a^4 
- a^2*b^2))/(a*(a^2 - b^2)^2) - (exp(x)*(a^2*b - b^3))/(a^2 - b^2)^2)/(exp 
(2*x) - 1) + (log(exp(x) + 1)*(2*a - 3*b))/(2*a^2 - 4*a*b + 2*b^2) + (b^4* 
log(4*a^9*exp(2*x) + 4*a*b^8 + 4*a^9 + 7*a^3*b^6 + 14*a^5*b^4 - 17*a^7*b^2 
 + 8*b^9*exp(x) + 7*a^3*b^6*exp(2*x) + 14*a^5*b^4*exp(2*x) - 17*a^7*b^2*ex 
p(2*x) + 8*a^8*b*exp(x) + 4*a*b^8*exp(2*x) + 14*a^2*b^7*exp(x) + 28*a^4*b^ 
5*exp(x) - 34*a^6*b^3*exp(x)))/(a*b^4 + a^5 - 2*a^3*b^2)
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 701, normalized size of antiderivative = 6.20 \[ \int \frac {\coth ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {3 \,\mathrm {log}\left (e^{x}-1\right ) a \,b^{3}-3 \,\mathrm {log}\left (e^{x}+1\right ) a \,b^{3}-2 e^{4 x} a^{4}-2 e^{4 x} a^{4} x -2 e^{4 x} b^{4} x +2 e^{3 x} a^{3} b -2 e^{3 x} a \,b^{3}+2 e^{x} a^{3} b +2 e^{4 x} \mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) b^{4}-8 e^{2 x} a^{2} b^{2} x +2 e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a^{4}+2 e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a^{4}-4 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a^{4}-4 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a^{4}-4 \,\mathrm {log}\left (e^{x}-1\right ) a^{2} b^{2}-4 \,\mathrm {log}\left (e^{x}+1\right ) a^{2} b^{2}+3 e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a \,b^{3}-3 e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a \,b^{3}+2 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a^{3} b -6 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a \,b^{3}-2 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a^{3} b +6 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a \,b^{3}+4 e^{2 x} a^{4} x +4 e^{2 x} b^{4} x -2 e^{x} a \,b^{3}+2 \,\mathrm {log}\left (e^{x}-1\right ) a^{4}+2 \,\mathrm {log}\left (e^{x}+1\right ) a^{4}-2 a^{4} x +2 a^{2} b^{2}-2 a^{4}-e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a^{3} b +e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a^{3} b -\mathrm {log}\left (e^{x}-1\right ) a^{3} b +\mathrm {log}\left (e^{x}+1\right ) a^{3} b -4 e^{2 x} \mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) b^{4}+2 e^{4 x} a^{2} b^{2}-4 e^{4 x} \mathrm {log}\left (e^{x}-1\right ) a^{2} b^{2}-4 e^{4 x} \mathrm {log}\left (e^{x}+1\right ) a^{2} b^{2}+8 e^{2 x} \mathrm {log}\left (e^{x}-1\right ) a^{2} b^{2}+8 e^{2 x} \mathrm {log}\left (e^{x}+1\right ) a^{2} b^{2}+4 a^{2} b^{2} x +4 e^{4 x} a^{2} b^{2} x +2 \,\mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) b^{4}-2 b^{4} x}{2 a \left (e^{4 x} a^{4}-2 e^{4 x} a^{2} b^{2}+e^{4 x} b^{4}-2 e^{2 x} a^{4}+4 e^{2 x} a^{2} b^{2}-2 e^{2 x} b^{4}+a^{4}-2 a^{2} b^{2}+b^{4}\right )} \] Input:

int(coth(x)^3/(a+b*sech(x)),x)
 

Output:

(2*e**(4*x)*log(e**x - 1)*a**4 - e**(4*x)*log(e**x - 1)*a**3*b - 4*e**(4*x 
)*log(e**x - 1)*a**2*b**2 + 3*e**(4*x)*log(e**x - 1)*a*b**3 + 2*e**(4*x)*l 
og(e**x + 1)*a**4 + e**(4*x)*log(e**x + 1)*a**3*b - 4*e**(4*x)*log(e**x + 
1)*a**2*b**2 - 3*e**(4*x)*log(e**x + 1)*a*b**3 + 2*e**(4*x)*log(e**(2*x)*a 
 + 2*e**x*b + a)*b**4 - 2*e**(4*x)*a**4*x - 2*e**(4*x)*a**4 + 4*e**(4*x)*a 
**2*b**2*x + 2*e**(4*x)*a**2*b**2 - 2*e**(4*x)*b**4*x + 2*e**(3*x)*a**3*b 
- 2*e**(3*x)*a*b**3 - 4*e**(2*x)*log(e**x - 1)*a**4 + 2*e**(2*x)*log(e**x 
- 1)*a**3*b + 8*e**(2*x)*log(e**x - 1)*a**2*b**2 - 6*e**(2*x)*log(e**x - 1 
)*a*b**3 - 4*e**(2*x)*log(e**x + 1)*a**4 - 2*e**(2*x)*log(e**x + 1)*a**3*b 
 + 8*e**(2*x)*log(e**x + 1)*a**2*b**2 + 6*e**(2*x)*log(e**x + 1)*a*b**3 - 
4*e**(2*x)*log(e**(2*x)*a + 2*e**x*b + a)*b**4 + 4*e**(2*x)*a**4*x - 8*e** 
(2*x)*a**2*b**2*x + 4*e**(2*x)*b**4*x + 2*e**x*a**3*b - 2*e**x*a*b**3 + 2* 
log(e**x - 1)*a**4 - log(e**x - 1)*a**3*b - 4*log(e**x - 1)*a**2*b**2 + 3* 
log(e**x - 1)*a*b**3 + 2*log(e**x + 1)*a**4 + log(e**x + 1)*a**3*b - 4*log 
(e**x + 1)*a**2*b**2 - 3*log(e**x + 1)*a*b**3 + 2*log(e**(2*x)*a + 2*e**x* 
b + a)*b**4 - 2*a**4*x - 2*a**4 + 4*a**2*b**2*x + 2*a**2*b**2 - 2*b**4*x)/ 
(2*a*(e**(4*x)*a**4 - 2*e**(4*x)*a**2*b**2 + e**(4*x)*b**4 - 2*e**(2*x)*a* 
*4 + 4*e**(2*x)*a**2*b**2 - 2*e**(2*x)*b**4 + a**4 - 2*a**2*b**2 + b**4))