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

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

Optimal result

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

-1/2*(2*a+3*b)*arctan(sinh(d*x+c))/b^2/d+(a+b)^(3/2)*arctan((a+b)^(1/2)*si 
nh(d*x+c)/a^(1/2))/a^(1/2)/b^2/d-1/2*sech(d*x+c)*tanh(d*x+c)/b/d
 

Mathematica [A] (verified)

Time = 0.43 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.92 \[ \int \frac {\text {sech}^5(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\frac {2 (a+b)^{3/2} \arctan \left (\frac {\sqrt {a} \text {csch}(c+d x)}{\sqrt {a+b}}\right )}{\sqrt {a}}+2 (2 a+3 b) \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )+b \text {sech}(c+d x) \tanh (c+d x)}{2 b^2 d} \] Input:

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

Output:

-1/2*((2*(a + b)^(3/2)*ArcTan[(Sqrt[a]*Csch[c + d*x])/Sqrt[a + b]])/Sqrt[a 
] + 2*(2*a + 3*b)*ArcTan[Tanh[(c + d*x)/2]] + b*Sech[c + d*x]*Tanh[c + d*x 
])/(b^2*d)
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4159, 316, 397, 216, 218}

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(c+d x)}{a+b \tanh ^2(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4159

\(\displaystyle \frac {\int \frac {1}{\left (\sinh ^2(c+d x)+1\right )^2 \left ((a+b) \sinh ^2(c+d x)+a\right )}d\sinh (c+d x)}{d}\)

\(\Big \downarrow \) 316

\(\displaystyle \frac {\frac {\int \frac {-\left ((a+b) \sinh ^2(c+d x)\right )+a+2 b}{\left (\sinh ^2(c+d x)+1\right ) \left ((a+b) \sinh ^2(c+d x)+a\right )}d\sinh (c+d x)}{2 b}-\frac {\sinh (c+d x)}{2 b \left (\sinh ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\frac {2 (a+b)^2 \int \frac {1}{(a+b) \sinh ^2(c+d x)+a}d\sinh (c+d x)}{b}-\frac {(2 a+3 b) \int \frac {1}{\sinh ^2(c+d x)+1}d\sinh (c+d x)}{b}}{2 b}-\frac {\sinh (c+d x)}{2 b \left (\sinh ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\frac {2 (a+b)^2 \int \frac {1}{(a+b) \sinh ^2(c+d x)+a}d\sinh (c+d x)}{b}-\frac {(2 a+3 b) \arctan (\sinh (c+d x))}{b}}{2 b}-\frac {\sinh (c+d x)}{2 b \left (\sinh ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\frac {2 (a+b)^{3/2} \arctan \left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b}-\frac {(2 a+3 b) \arctan (\sinh (c+d x))}{b}}{2 b}-\frac {\sinh (c+d x)}{2 b \left (\sinh ^2(c+d x)+1\right )}}{d}\)

Input:

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

Output:

((-(((2*a + 3*b)*ArcTan[Sinh[c + d*x]])/b) + (2*(a + b)^(3/2)*ArcTan[(Sqrt 
[a + b]*Sinh[c + d*x])/Sqrt[a]])/(Sqrt[a]*b))/(2*b) - Sinh[c + d*x]/(2*b*( 
1 + Sinh[c + d*x]^2)))/d
 

Defintions of rubi rules used

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

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

rule 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, 
 p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

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

rule 4159
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ 
))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f 
  Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 
*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} 
, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(235\) vs. \(2(74)=148\).

Time = 86.95 (sec) , antiderivative size = 236, normalized size of antiderivative = 2.74

method result size
derivativedivides \(\frac {-\frac {2 \left (\frac {-\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2}+\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}}{\left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )^{2}}+\frac {\left (2 a +3 b \right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{b^{2}}+\frac {2 \left (a^{2}+2 a b +b^{2}\right ) a \left (\frac {\left (\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{b^{2}}}{d}\) \(236\)
default \(\frac {-\frac {2 \left (\frac {-\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2}+\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}}{\left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )^{2}}+\frac {\left (2 a +3 b \right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{b^{2}}+\frac {2 \left (a^{2}+2 a b +b^{2}\right ) a \left (\frac {\left (\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{b^{2}}}{d}\) \(236\)
risch \(-\frac {{\mathrm e}^{d x +c} \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d b \left ({\mathrm e}^{2 d x +2 c}+1\right )^{2}}+\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{d \,b^{2}}+\frac {3 i \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 d b}-\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a}{d \,b^{2}}-\frac {3 i \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 d b}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}-1\right )}{2 d \,b^{2}}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}-1\right )}{2 a d b}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}-1\right )}{2 d \,b^{2}}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}-1\right )}{2 a d b}\) \(320\)

Input:

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

Output:

1/d*(-2/b^2*((-1/2*b*tanh(1/2*d*x+1/2*c)^3+1/2*b*tanh(1/2*d*x+1/2*c))/(tan 
h(1/2*d*x+1/2*c)^2+1)^2+1/2*(2*a+3*b)*arctan(tanh(1/2*d*x+1/2*c)))+2/b^2*( 
a^2+2*a*b+b^2)*a*(1/2*(((a+b)*b)^(1/2)+b)/a/((a+b)*b)^(1/2)/((2*((a+b)*b)^ 
(1/2)+a+2*b)*a)^(1/2)*arctan(a*tanh(1/2*d*x+1/2*c)/((2*((a+b)*b)^(1/2)+a+2 
*b)*a)^(1/2))-1/2*(((a+b)*b)^(1/2)-b)/a/((a+b)*b)^(1/2)/((2*((a+b)*b)^(1/2 
)-a-2*b)*a)^(1/2)*arctanh(a*tanh(1/2*d*x+1/2*c)/((2*((a+b)*b)^(1/2)-a-2*b) 
*a)^(1/2))))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 750 vs. \(2 (74) = 148\).

Time = 0.15 (sec) , antiderivative size = 1584, normalized size of antiderivative = 18.42 \[ \int \frac {\text {sech}^5(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\text {Too large to display} \] Input:

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

Output:

[-1/2*(2*b*cosh(d*x + c)^3 + 6*b*cosh(d*x + c)*sinh(d*x + c)^2 + 2*b*sinh( 
d*x + c)^3 - ((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + 
 c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a + b)*cosh(d*x + c)^2 + 2*(3*(a + b) 
*cosh(d*x + c)^2 + a + b)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 + ( 
a + b)*cosh(d*x + c))*sinh(d*x + c) + a + b)*sqrt(-(a + b)/a)*log(((a + b) 
*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh( 
d*x + c)^4 - 2*(3*a + b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 - 
3*a - b)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 - (3*a + b)*cosh(d*x 
 + c))*sinh(d*x + c) + 4*(a*cosh(d*x + c)^3 + 3*a*cosh(d*x + c)*sinh(d*x + 
 c)^2 + a*sinh(d*x + c)^3 - a*cosh(d*x + c) + (3*a*cosh(d*x + c)^2 - a)*si 
nh(d*x + c))*sqrt(-(a + b)/a) + a + b)/((a + b)*cosh(d*x + c)^4 + 4*(a + b 
)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a - b)*cosh 
(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh(d*x + c)^2 + 4*(( 
a + b)*cosh(d*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)) + 
2*((2*a + 3*b)*cosh(d*x + c)^4 + 4*(2*a + 3*b)*cosh(d*x + c)*sinh(d*x + c) 
^3 + (2*a + 3*b)*sinh(d*x + c)^4 + 2*(2*a + 3*b)*cosh(d*x + c)^2 + 2*(3*(2 
*a + 3*b)*cosh(d*x + c)^2 + 2*a + 3*b)*sinh(d*x + c)^2 + 4*((2*a + 3*b)*co 
sh(d*x + c)^3 + (2*a + 3*b)*cosh(d*x + c))*sinh(d*x + c) + 2*a + 3*b)*arct 
an(cosh(d*x + c) + sinh(d*x + c)) - 2*b*cosh(d*x + c) + 2*(3*b*cosh(d*x + 
c)^2 - b)*sinh(d*x + c))/(b^2*d*cosh(d*x + c)^4 + 4*b^2*d*cosh(d*x + c)...
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-(e^(3*d*x + 3*c) - e^(d*x + c))/(b*d*e^(4*d*x + 4*c) + 2*b*d*e^(2*d*x + 2 
*c) + b*d) - (2*a*e^c + 3*b*e^c)*arctan(e^(d*x + c))*e^(-c)/(b^2*d) + 32*i 
ntegrate(1/16*((a^2*e^(3*c) + 2*a*b*e^(3*c) + b^2*e^(3*c))*e^(3*d*x) + (a^ 
2*e^c + 2*a*b*e^c + b^2*e^c)*e^(d*x))/(a*b^2 + b^3 + (a*b^2*e^(4*c) + b^3* 
e^(4*c))*e^(4*d*x) + 2*(a*b^2*e^(2*c) - b^3*e^(2*c))*e^(2*d*x)), x)
 

Giac [F(-2)]

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

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Limit: Max order reached or unable 
to make series expansion Error: Bad Argument Value
 

Mupad [B] (verification not implemented)

Time = 3.38 (sec) , antiderivative size = 1012, normalized size of antiderivative = 11.77 \[ \int \frac {\text {sech}^5(c+d x)}{a+b \tanh ^2(c+d x)} \, dx =\text {Too large to display} \] Input:

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

Output:

((2*atan(((exp(d*x)*exp(c)*((64*(12*a^2*b^4*d*(3*a*b^2 + 3*a^2*b + a^3 + b 
^3)^(1/2) - 2*a*b^5*d*(3*a*b^2 + 3*a^2*b + a^3 + b^3)^(1/2) + 18*a^3*b^3*d 
*(3*a*b^2 + 3*a^2*b + a^3 + b^3)^(1/2) + 6*a^4*b^2*d*(3*a*b^2 + 3*a^2*b + 
a^3 + b^3)^(1/2)))/(a^3*b^9*d^2*(a + b)^2*(2*a*b + a^2 + b^2)) - (32*(3*a^ 
5*(a*b^4*d^2)^(1/2) - b^5*(a*b^4*d^2)^(1/2) + 4*a*b^4*(a*b^4*d^2)^(1/2) + 
15*a^4*b*(a*b^4*d^2)^(1/2) + 20*a^2*b^3*(a*b^4*d^2)^(1/2) + 27*a^3*b^2*(a* 
b^4*d^2)^(1/2)))/(a^3*b^7*d*((a + b)^3)^(1/2)*(2*a*b + a^2 + b^2)*(a*b^4*d 
^2)^(1/2))) + (32*exp(3*c)*exp(3*d*x)*(3*a^5*(a*b^4*d^2)^(1/2) - b^5*(a*b^ 
4*d^2)^(1/2) + 4*a*b^4*(a*b^4*d^2)^(1/2) + 15*a^4*b*(a*b^4*d^2)^(1/2) + 20 
*a^2*b^3*(a*b^4*d^2)^(1/2) + 27*a^3*b^2*(a*b^4*d^2)^(1/2)))/(a^3*b^7*d*((a 
 + b)^3)^(1/2)*(2*a*b + a^2 + b^2)*(a*b^4*d^2)^(1/2)))*(a^2*b^7*(a*b^4*d^2 
)^(1/2) + 2*a^3*b^6*(a*b^4*d^2)^(1/2) + a^4*b^5*(a*b^4*d^2)^(1/2)))/(384*a 
*b^2 + 576*a^2*b + 192*a^3 - 64*b^3)) + 2*atan((exp(d*x)*exp(c)*(a + b)^2* 
(a*b^4*d^2)^(1/2))/(2*a*b^2*d*((a + b)^3)^(1/2))))*(3*a*b^2 + 3*a^2*b + a^ 
3 + b^3)^(1/2))/(2*(a*b^4*d^2)^(1/2)) - (atan((exp(d*x)*exp(c)*(18*a^7*(b^ 
4*d^2)^(1/2) + 3*b^7*(b^4*d^2)^(1/2) + 30*a^2*b^5*(b^4*d^2)^(1/2) + 342*a^ 
3*b^4*(b^4*d^2)^(1/2) + 555*a^4*b^3*(b^4*d^2)^(1/2) + 396*a^5*b^2*(b^4*d^2 
)^(1/2) - 34*a*b^6*(b^4*d^2)^(1/2) + 135*a^6*b*(b^4*d^2)^(1/2)))/(b^8*d*(1 
2*a*b + 4*a^2 + 9*b^2)^(1/2) - 12*a*b^7*d*(12*a*b + 4*a^2 + 9*b^2)^(1/2) + 
 18*a^2*b^6*d*(12*a*b + 4*a^2 + 9*b^2)^(1/2) + 102*a^3*b^5*d*(12*a*b + ...
 

Reduce [B] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 620, normalized size of antiderivative = 7.21 \[ \int \frac {\text {sech}^5(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {-2 e^{4 d x +4 c} \mathit {atan} \left (e^{d x +c}\right ) a^{2}-3 e^{4 d x +4 c} \mathit {atan} \left (e^{d x +c}\right ) a b -4 e^{2 d x +2 c} \mathit {atan} \left (e^{d x +c}\right ) a^{2}-6 e^{2 d x +2 c} \mathit {atan} \left (e^{d x +c}\right ) a b -2 \mathit {atan} \left (e^{d x +c}\right ) a^{2}-3 \mathit {atan} \left (e^{d x +c}\right ) a b +e^{4 d x +4 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) a +e^{4 d x +4 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) b +2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) a +2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) b +\sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) a +\sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) b +e^{4 d x +4 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) a +e^{4 d x +4 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) b +2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) a +2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) b +\sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) a +\sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) b -e^{3 d x +3 c} a b +e^{d x +c} a b}{a \,b^{2} d \left (e^{4 d x +4 c}+2 e^{2 d x +2 c}+1\right )} \] Input:

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

Output:

( - 2*e**(4*c + 4*d*x)*atan(e**(c + d*x))*a**2 - 3*e**(4*c + 4*d*x)*atan(e 
**(c + d*x))*a*b - 4*e**(2*c + 2*d*x)*atan(e**(c + d*x))*a**2 - 6*e**(2*c 
+ 2*d*x)*atan(e**(c + d*x))*a*b - 2*atan(e**(c + d*x))*a**2 - 3*atan(e**(c 
 + d*x))*a*b + e**(4*c + 4*d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqr 
t(a + b) - sqrt(b))/sqrt(a))*a + e**(4*c + 4*d*x)*sqrt(a)*sqrt(a + b)*atan 
((e**(c + d*x)*sqrt(a + b) - sqrt(b))/sqrt(a))*b + 2*e**(2*c + 2*d*x)*sqrt 
(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) - sqrt(b))/sqrt(a))*a + 2*e 
**(2*c + 2*d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) - sqrt( 
b))/sqrt(a))*b + sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) - sqrt 
(b))/sqrt(a))*a + sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) - sqr 
t(b))/sqrt(a))*b + e**(4*c + 4*d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x) 
*sqrt(a + b) + sqrt(b))/sqrt(a))*a + e**(4*c + 4*d*x)*sqrt(a)*sqrt(a + b)* 
atan((e**(c + d*x)*sqrt(a + b) + sqrt(b))/sqrt(a))*b + 2*e**(2*c + 2*d*x)* 
sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) + sqrt(b))/sqrt(a))*a + 
 2*e**(2*c + 2*d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) + s 
qrt(b))/sqrt(a))*b + sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) + 
sqrt(b))/sqrt(a))*a + sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) + 
 sqrt(b))/sqrt(a))*b - e**(3*c + 3*d*x)*a*b + e**(c + d*x)*a*b)/(a*b**2*d* 
(e**(4*c + 4*d*x) + 2*e**(2*c + 2*d*x) + 1))