\(\int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx\) [111]

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

Optimal result

Integrand size = 13, antiderivative size = 102 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=-\frac {a \left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^4}+\frac {\left (a^2-b^2\right )^{3/2} \arctan \left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^4}-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {\text {sech}^3(x)}{3 b}+\frac {a \text {sech}(x) \tanh (x)}{2 b^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.14 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\frac {-6 \left (a \left (2 a^2-3 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+2 \sqrt {a-b} \sqrt {a+b} \left (-a^2+b^2\right ) \arctan \left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )\right )+2 b^3 \text {sech}^3(x)+3 b \text {sech}(x) \left (-2 a^2+2 b^2+a b \tanh (x)\right )}{6 b^4} \] Input:

Integrate[Sech[x]^5/(a + b*Tanh[x]),x]
 

Output:

(-6*(a*(2*a^2 - 3*b^2)*ArcTan[Tanh[x/2]] + 2*Sqrt[a - b]*Sqrt[a + b]*(-a^2 
 + b^2)*ArcTan[(b + a*Tanh[x/2])/(Sqrt[a - b]*Sqrt[a + b])]) + 2*b^3*Sech[ 
x]^3 + 3*b*Sech[x]*(-2*a^2 + 2*b^2 + a*b*Tanh[x]))/(6*b^4)
 

Rubi [A] (verified)

Time = 0.94 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.01, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.077, Rules used = {3042, 3989, 3042, 3967, 3042, 3989, 3042, 3967, 3042, 3988, 219, 4255, 3042, 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 {\text {sech}^5(x)}{a+b \tanh (x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (i x)^5}{a-i b \tan (i x)}dx\)

\(\Big \downarrow \) 3989

\(\displaystyle \frac {\int \text {sech}^3(x) (a-b \tanh (x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}^3(x)}{a+b \tanh (x)}dx}{b^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \sec (i x)^3 (a+i b \tan (i x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\)

\(\Big \downarrow \) 3967

\(\displaystyle \frac {a \int \text {sech}^3(x)dx+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\)

\(\Big \downarrow \) 3989

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

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {\int \sec (i x) (a+i b \tan (i x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 3967

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {a \int \text {sech}(x)dx+b \text {sech}(x)}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 3988

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {a \left (\frac {\int \text {sech}(x)dx}{2}+\frac {1}{2} \tanh (x) \text {sech}(x)\right )+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \left (\frac {1}{2} \tanh (x) \text {sech}(x)+\frac {1}{2} \int \csc \left (i x+\frac {\pi }{2}\right )dx\right )}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {a \left (\frac {1}{2} \arctan (\sinh (x))+\frac {1}{2} \tanh (x) \text {sech}(x)\right )+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {a \arctan (\sinh (x))+b \text {sech}(x)}{b^2}-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}\right )}{b^2}\)

Input:

Int[Sech[x]^5/(a + b*Tanh[x]),x]
 

Output:

-(((a^2 - b^2)*(-((Sqrt[a^2 - b^2]*ArcTan[(Cosh[x]*(b + a*Tanh[x]))/Sqrt[a 
^2 - b^2]])/b^2) + (a*ArcTan[Sinh[x]] + b*Sech[x])/b^2))/b^2) + ((b*Sech[x 
]^3)/3 + a*(ArcTan[Sinh[x]]/2 + (Sech[x]*Tanh[x])/2))/b^2
 

Defintions of rubi rules used

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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3967
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a   Int[(d 
*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] 
|| NeQ[a^2 + b^2, 0])
 

rule 3988
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo 
l] :> Simp[-f^(-1)   Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f 
*x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
 

rule 3989
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ 
Symbol] :> Simp[-(b^2)^(-1)   Int[Sec[e + f*x]^(m - 2)*(a - b*Tan[e + f*x]) 
, x], x] + Simp[(a^2 + b^2)/b^2   Int[Sec[e + f*x]^(m - 2)/(a + b*Tan[e + f 
*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[(m - 1) 
/2, 0]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

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

Time = 48.64 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.61

method result size
default \(\frac {2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{4} \sqrt {a^{2}-b^{2}}}-\frac {2 \left (\frac {\frac {b^{2} a \tanh \left (\frac {x}{2}\right )^{5}}{2}+\left (a^{2} b -2 b^{3}\right ) \tanh \left (\frac {x}{2}\right )^{4}+\left (2 a^{2} b -2 b^{3}\right ) \tanh \left (\frac {x}{2}\right )^{2}-\frac {b^{2} a \tanh \left (\frac {x}{2}\right )}{2}+a^{2} b -\frac {4 b^{3}}{3}}{\left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\right )}{b^{4}}\) \(164\)
risch \(-\frac {{\mathrm e}^{x} \left (6 a^{2} {\mathrm e}^{4 x}-3 \,{\mathrm e}^{4 x} a b -6 b^{2} {\mathrm e}^{4 x}+12 \,{\mathrm e}^{2 x} a^{2}-20 b^{2} {\mathrm e}^{2 x}+6 a^{2}+3 a b -6 b^{2}\right )}{3 b^{3} \left ({\mathrm e}^{2 x}+1\right )^{3}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}+\frac {i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{b^{4}}-\frac {3 i a \ln \left ({\mathrm e}^{x}-i\right )}{2 b^{2}}-\frac {i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{b^{4}}+\frac {3 i a \ln \left ({\mathrm e}^{x}+i\right )}{2 b^{2}}\) \(286\)

Input:

int(sech(x)^5/(a+b*tanh(x)),x,method=_RETURNVERBOSE)
 

Output:

2*(a^4-2*a^2*b^2+b^4)/b^4/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tanh(1/2*x)+2*b) 
/(a^2-b^2)^(1/2))-2/b^4*((1/2*b^2*a*tanh(1/2*x)^5+(a^2*b-2*b^3)*tanh(1/2*x 
)^4+(2*a^2*b-2*b^3)*tanh(1/2*x)^2-1/2*b^2*a*tanh(1/2*x)+a^2*b-4/3*b^3)/(ta 
nh(1/2*x)^2+1)^3+1/2*a*(2*a^2-3*b^2)*arctan(tanh(1/2*x)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 994 vs. \(2 (92) = 184\).

Time = 0.14 (sec) , antiderivative size = 2043, normalized size of antiderivative = 20.03 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\text {Too large to display} \] Input:

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

Output:

[-1/3*(3*(2*a^2*b - a*b^2 - 2*b^3)*cosh(x)^5 + 15*(2*a^2*b - a*b^2 - 2*b^3 
)*cosh(x)*sinh(x)^4 + 3*(2*a^2*b - a*b^2 - 2*b^3)*sinh(x)^5 + 4*(3*a^2*b - 
 5*b^3)*cosh(x)^3 + 2*(6*a^2*b - 10*b^3 + 15*(2*a^2*b - a*b^2 - 2*b^3)*cos 
h(x)^2)*sinh(x)^3 + 6*(5*(2*a^2*b - a*b^2 - 2*b^3)*cosh(x)^3 + 2*(3*a^2*b 
- 5*b^3)*cosh(x))*sinh(x)^2 + 3*((a^2 - b^2)*cosh(x)^6 + 6*(a^2 - b^2)*cos 
h(x)*sinh(x)^5 + (a^2 - b^2)*sinh(x)^6 + 3*(a^2 - b^2)*cosh(x)^4 + 3*(5*(a 
^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^4 + 4*(5*(a^2 - b^2)*cosh(x)^3 + 
3*(a^2 - b^2)*cosh(x))*sinh(x)^3 + 3*(a^2 - b^2)*cosh(x)^2 + 3*(5*(a^2 - b 
^2)*cosh(x)^4 + 6*(a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 - b^2 
 + 6*((a^2 - b^2)*cosh(x)^5 + 2*(a^2 - b^2)*cosh(x)^3 + (a^2 - b^2)*cosh(x 
))*sinh(x))*sqrt(-a^2 + b^2)*log(((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*si 
nh(x) + (a + b)*sinh(x)^2 - 2*sqrt(-a^2 + b^2)*(cosh(x) + sinh(x)) - a + b 
)/((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 + a - 
 b)) + 3*((2*a^3 - 3*a*b^2)*cosh(x)^6 + 6*(2*a^3 - 3*a*b^2)*cosh(x)*sinh(x 
)^5 + (2*a^3 - 3*a*b^2)*sinh(x)^6 + 3*(2*a^3 - 3*a*b^2)*cosh(x)^4 + 3*(2*a 
^3 - 3*a*b^2 + 5*(2*a^3 - 3*a*b^2)*cosh(x)^2)*sinh(x)^4 + 4*(5*(2*a^3 - 3* 
a*b^2)*cosh(x)^3 + 3*(2*a^3 - 3*a*b^2)*cosh(x))*sinh(x)^3 + 2*a^3 - 3*a*b^ 
2 + 3*(2*a^3 - 3*a*b^2)*cosh(x)^2 + 3*(5*(2*a^3 - 3*a*b^2)*cosh(x)^4 + 2*a 
^3 - 3*a*b^2 + 6*(2*a^3 - 3*a*b^2)*cosh(x)^2)*sinh(x)^2 + 6*((2*a^3 - 3*a* 
b^2)*cosh(x)^5 + 2*(2*a^3 - 3*a*b^2)*cosh(x)^3 + (2*a^3 - 3*a*b^2)*cosh...
 

Sympy [F]

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

integrate(sech(x)**5/(a+b*tanh(x)),x)
 

Output:

Integral(sech(x)**5/(a + b*tanh(x)), x)
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.49 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=-\frac {{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \arctan \left (e^{x}\right )}{b^{4}} + \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{4}} - \frac {6 \, a^{2} e^{\left (5 \, x\right )} - 3 \, a b e^{\left (5 \, x\right )} - 6 \, b^{2} e^{\left (5 \, x\right )} + 12 \, a^{2} e^{\left (3 \, x\right )} - 20 \, b^{2} e^{\left (3 \, x\right )} + 6 \, a^{2} e^{x} + 3 \, a b e^{x} - 6 \, b^{2} e^{x}}{3 \, b^{3} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 5.89 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.60 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}+a^3\,{\mathrm {e}}^x-b^3\,{\mathrm {e}}^x-a\,b^2\,{\mathrm {e}}^x+a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {8\,{\mathrm {e}}^x}{3\,b\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}-a^3\,{\mathrm {e}}^x+b^3\,{\mathrm {e}}^x+a\,b^2\,{\mathrm {e}}^x-a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {2\,{\mathrm {e}}^x\,\left (3\,a-4\,b\right )}{3\,b^2\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {{\mathrm {e}}^x\,\left (-2\,a^2+a\,b+2\,b^2\right )}{b^3\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4}-\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4} \] Input:

int(1/(cosh(x)^5*(a + b*tanh(x))),x)
                                                                                    
                                                                                    
 

Output:

(log((-(a + b)^3*(a - b)^3)^(1/2) + a^3*exp(x) - b^3*exp(x) - a*b^2*exp(x) 
 + a^2*b*exp(x))*(-(a + b)^3*(a - b)^3)^(1/2))/b^4 - (8*exp(x))/(3*b*(3*ex 
p(2*x) + 3*exp(4*x) + exp(6*x) + 1)) - (log((-(a + b)^3*(a - b)^3)^(1/2) - 
 a^3*exp(x) + b^3*exp(x) + a*b^2*exp(x) - a^2*b*exp(x))*(-(a + b)^3*(a - b 
)^3)^(1/2))/b^4 - (2*exp(x)*(3*a - 4*b))/(3*b^2*(2*exp(2*x) + exp(4*x) + 1 
)) + (exp(x)*(a*b - 2*a^2 + 2*b^2))/(b^3*(exp(2*x) + 1)) + (a*log(exp(x) - 
 1i)*(2*a^2 - 3*b^2)*1i)/(2*b^4) - (a*log(exp(x) + 1i)*(2*a^2 - 3*b^2)*1i) 
/(2*b^4)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 564, normalized size of antiderivative = 5.53 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\frac {-6 e^{6 x} \mathit {atan} \left (e^{x}\right ) a^{3}+9 e^{6 x} \mathit {atan} \left (e^{x}\right ) a \,b^{2}-18 e^{4 x} \mathit {atan} \left (e^{x}\right ) a^{3}+27 e^{4 x} \mathit {atan} \left (e^{x}\right ) a \,b^{2}-18 e^{2 x} \mathit {atan} \left (e^{x}\right ) a^{3}+27 e^{2 x} \mathit {atan} \left (e^{x}\right ) a \,b^{2}-6 \mathit {atan} \left (e^{x}\right ) a^{3}+9 \mathit {atan} \left (e^{x}\right ) a \,b^{2}+6 e^{6 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2}-6 e^{6 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) b^{2}+18 e^{4 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2}-18 e^{4 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) b^{2}+18 e^{2 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2}-18 e^{2 x} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) b^{2}+6 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2}-6 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {a^{2}-b^{2}}}\right ) b^{2}-6 e^{5 x} a^{2} b +3 e^{5 x} a \,b^{2}+6 e^{5 x} b^{3}-12 e^{3 x} a^{2} b +20 e^{3 x} b^{3}-6 e^{x} a^{2} b -3 e^{x} a \,b^{2}+6 e^{x} b^{3}}{3 b^{4} \left (e^{6 x}+3 e^{4 x}+3 e^{2 x}+1\right )} \] Input:

int(sech(x)^5/(a+b*tanh(x)),x)
 

Output:

( - 6*e**(6*x)*atan(e**x)*a**3 + 9*e**(6*x)*atan(e**x)*a*b**2 - 18*e**(4*x 
)*atan(e**x)*a**3 + 27*e**(4*x)*atan(e**x)*a*b**2 - 18*e**(2*x)*atan(e**x) 
*a**3 + 27*e**(2*x)*atan(e**x)*a*b**2 - 6*atan(e**x)*a**3 + 9*atan(e**x)*a 
*b**2 + 6*e**(6*x)*sqrt(a**2 - b**2)*atan((e**x*a + e**x*b)/sqrt(a**2 - b* 
*2))*a**2 - 6*e**(6*x)*sqrt(a**2 - b**2)*atan((e**x*a + e**x*b)/sqrt(a**2 
- b**2))*b**2 + 18*e**(4*x)*sqrt(a**2 - b**2)*atan((e**x*a + e**x*b)/sqrt( 
a**2 - b**2))*a**2 - 18*e**(4*x)*sqrt(a**2 - b**2)*atan((e**x*a + e**x*b)/ 
sqrt(a**2 - b**2))*b**2 + 18*e**(2*x)*sqrt(a**2 - b**2)*atan((e**x*a + e** 
x*b)/sqrt(a**2 - b**2))*a**2 - 18*e**(2*x)*sqrt(a**2 - b**2)*atan((e**x*a 
+ e**x*b)/sqrt(a**2 - b**2))*b**2 + 6*sqrt(a**2 - b**2)*atan((e**x*a + e** 
x*b)/sqrt(a**2 - b**2))*a**2 - 6*sqrt(a**2 - b**2)*atan((e**x*a + e**x*b)/ 
sqrt(a**2 - b**2))*b**2 - 6*e**(5*x)*a**2*b + 3*e**(5*x)*a*b**2 + 6*e**(5* 
x)*b**3 - 12*e**(3*x)*a**2*b + 20*e**(3*x)*b**3 - 6*e**x*a**2*b - 3*e**x*a 
*b**2 + 6*e**x*b**3)/(3*b**4*(e**(6*x) + 3*e**(4*x) + 3*e**(2*x) + 1))