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

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

Optimal result

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

a^3*tanh(d*x+c)/d+a^2*b*tanh(d*x+c)^3/d+3/5*a*b^2*tanh(d*x+c)^5/d+1/7*b^3* 
tanh(d*x+c)^7/d
 

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {a^3 \tanh (c+d x)}{d}+\frac {a^2 b \tanh ^3(c+d x)}{d}+\frac {3 a b^2 \tanh ^5(c+d x)}{5 d}+\frac {b^3 \tanh ^7(c+d x)}{7 d} \] Input:

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

Output:

(a^3*Tanh[c + d*x])/d + (a^2*b*Tanh[c + d*x]^3)/d + (3*a*b^2*Tanh[c + d*x] 
^5)/(5*d) + (b^3*Tanh[c + d*x]^7)/(7*d)
 

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.88, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 210, 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 \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sec (i c+i d x)^2 \left (a-b \tan (i c+i d x)^2\right )^3dx\)

\(\Big \downarrow \) 4158

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

\(\Big \downarrow \) 210

\(\displaystyle \frac {\int \left (b^3 \tanh ^6(c+d x)+3 a b^2 \tanh ^4(c+d x)+3 a^2 b \tanh ^2(c+d x)+a^3\right )d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 \tanh (c+d x)+a^2 b \tanh ^3(c+d x)+\frac {3}{5} a b^2 \tanh ^5(c+d x)+\frac {1}{7} b^3 \tanh ^7(c+d x)}{d}\)

Input:

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

Output:

(a^3*Tanh[c + d*x] + a^2*b*Tanh[c + d*x]^3 + (3*a*b^2*Tanh[c + d*x]^5)/5 + 
 (b^3*Tanh[c + d*x]^7)/7)/d
 

Defintions of rubi rules used

rule 210
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^2 
)^p, x], x] /; FreeQ[{a, b}, x] && IGtQ[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 4158
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ 
)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[ff/(c^(m - 1)*f)   Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ 
p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I 
ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] 
 || EqQ[n^2, 16])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(226\) vs. \(2(63)=126\).

Time = 42.46 (sec) , antiderivative size = 227, normalized size of antiderivative = 3.39

method result size
derivativedivides \(\frac {a^{3} \tanh \left (d x +c \right )+3 a^{2} b \left (-\frac {\sinh \left (d x +c \right )}{2 \cosh \left (d x +c \right )^{3}}+\frac {\left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )}{2}\right )+3 b^{2} a \left (-\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )^{5}}-\frac {3 \sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{5}}+\frac {3 \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{8}\right )+b^{3} \left (-\frac {\sinh \left (d x +c \right )^{5}}{2 \cosh \left (d x +c \right )^{7}}-\frac {5 \sinh \left (d x +c \right )^{3}}{8 \cosh \left (d x +c \right )^{7}}-\frac {5 \sinh \left (d x +c \right )}{16 \cosh \left (d x +c \right )^{7}}+\frac {5 \left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{16}\right )}{d}\) \(227\)
default \(\frac {a^{3} \tanh \left (d x +c \right )+3 a^{2} b \left (-\frac {\sinh \left (d x +c \right )}{2 \cosh \left (d x +c \right )^{3}}+\frac {\left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )}{2}\right )+3 b^{2} a \left (-\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )^{5}}-\frac {3 \sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{5}}+\frac {3 \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{8}\right )+b^{3} \left (-\frac {\sinh \left (d x +c \right )^{5}}{2 \cosh \left (d x +c \right )^{7}}-\frac {5 \sinh \left (d x +c \right )^{3}}{8 \cosh \left (d x +c \right )^{7}}-\frac {5 \sinh \left (d x +c \right )}{16 \cosh \left (d x +c \right )^{7}}+\frac {5 \left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{16}\right )}{d}\) \(227\)
risch \(-\frac {2 \left (175 b^{3} {\mathrm e}^{8 d x +8 c}+105 b^{3} {\mathrm e}^{4 d x +4 c}+210 \,{\mathrm e}^{2 d x +2 c} a^{3}+21 b^{2} a +35 a^{3}+35 a^{2} b +105 a^{2} b \,{\mathrm e}^{12 d x +12 c}+420 a^{2} b \,{\mathrm e}^{10 d x +10 c}+210 a \,b^{2} {\mathrm e}^{10 d x +10 c}+665 a^{2} b \,{\mathrm e}^{8 d x +8 c}+315 a \,b^{2} {\mathrm e}^{8 d x +8 c}+560 a^{2} b \,{\mathrm e}^{6 d x +6 c}+420 a \,b^{2} {\mathrm e}^{6 d x +6 c}+315 a^{2} b \,{\mathrm e}^{4 d x +4 c}+231 a \,b^{2} {\mathrm e}^{4 d x +4 c}+140 a^{2} b \,{\mathrm e}^{2 d x +2 c}+42 a \,b^{2} {\mathrm e}^{2 d x +2 c}+5 b^{3}+700 a^{3} {\mathrm e}^{6 d x +6 c}+525 a^{3} {\mathrm e}^{8 d x +8 c}+35 b^{3} {\mathrm e}^{12 d x +12 c}+105 a \,b^{2} {\mathrm e}^{12 d x +12 c}+35 a^{3} {\mathrm e}^{12 d x +12 c}+525 \,{\mathrm e}^{4 d x +4 c} a^{3}+210 \,{\mathrm e}^{10 d x +10 c} a^{3}\right )}{35 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{7}}\) \(348\)

Input:

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

Output:

1/d*(a^3*tanh(d*x+c)+3*a^2*b*(-1/2*sinh(d*x+c)/cosh(d*x+c)^3+1/2*(2/3+1/3* 
sech(d*x+c)^2)*tanh(d*x+c))+3*b^2*a*(-1/2*sinh(d*x+c)^3/cosh(d*x+c)^5-3/8* 
sinh(d*x+c)/cosh(d*x+c)^5+3/8*(8/15+1/5*sech(d*x+c)^4+4/15*sech(d*x+c)^2)* 
tanh(d*x+c))+b^3*(-1/2*sinh(d*x+c)^5/cosh(d*x+c)^7-5/8*sinh(d*x+c)^3/cosh( 
d*x+c)^7-5/16*sinh(d*x+c)/cosh(d*x+c)^7+5/16*(16/35+1/7*sech(d*x+c)^6+6/35 
*sech(d*x+c)^4+8/35*sech(d*x+c)^2)*tanh(d*x+c)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 786 vs. \(2 (63) = 126\).

Time = 0.08 (sec) , antiderivative size = 786, normalized size of antiderivative = 11.73 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx =\text {Too large to display} \] Input:

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

Output:

-4/35*((35*a^3 + 70*a^2*b + 63*a*b^2 + 20*b^3)*cosh(d*x + c)^6 + 6*(35*a^2 
*b + 42*a*b^2 + 15*b^3)*cosh(d*x + c)*sinh(d*x + c)^5 + (35*a^3 + 70*a^2*b 
 + 63*a*b^2 + 20*b^3)*sinh(d*x + c)^6 + 14*(15*a^3 + 20*a^2*b + 9*a*b^2)*c 
osh(d*x + c)^4 + (210*a^3 + 280*a^2*b + 126*a*b^2 + 15*(35*a^3 + 70*a^2*b 
+ 63*a*b^2 + 20*b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^4 + 4*(5*(35*a^2*b + 4 
2*a*b^2 + 15*b^3)*cosh(d*x + c)^3 + 28*(5*a^2*b + 3*a*b^2)*cosh(d*x + c))* 
sinh(d*x + c)^3 + 350*a^3 + 280*a^2*b + 210*a*b^2 + 7*(75*a^3 + 70*a^2*b + 
 39*a*b^2 + 20*b^3)*cosh(d*x + c)^2 + (15*(35*a^3 + 70*a^2*b + 63*a*b^2 + 
20*b^3)*cosh(d*x + c)^4 + 525*a^3 + 490*a^2*b + 273*a*b^2 + 140*b^3 + 84*( 
15*a^3 + 20*a^2*b + 9*a*b^2)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + 2*(3*(35*a 
^2*b + 42*a*b^2 + 15*b^3)*cosh(d*x + c)^5 + 56*(5*a^2*b + 3*a*b^2)*cosh(d* 
x + c)^3 + 7*(25*a^2*b + 6*a*b^2 + 5*b^3)*cosh(d*x + c))*sinh(d*x + c))/(d 
*cosh(d*x + c)^8 + 8*d*cosh(d*x + c)*sinh(d*x + c)^7 + d*sinh(d*x + c)^8 + 
 8*d*cosh(d*x + c)^6 + 4*(7*d*cosh(d*x + c)^2 + 2*d)*sinh(d*x + c)^6 + 4*( 
14*d*cosh(d*x + c)^3 + 9*d*cosh(d*x + c))*sinh(d*x + c)^5 + 28*d*cosh(d*x 
+ c)^4 + 2*(35*d*cosh(d*x + c)^4 + 60*d*cosh(d*x + c)^2 + 14*d)*sinh(d*x + 
 c)^4 + 8*(7*d*cosh(d*x + c)^5 + 15*d*cosh(d*x + c)^3 + 7*d*cosh(d*x + c)) 
*sinh(d*x + c)^3 + 56*d*cosh(d*x + c)^2 + 4*(7*d*cosh(d*x + c)^6 + 30*d*co 
sh(d*x + c)^4 + 42*d*cosh(d*x + c)^2 + 14*d)*sinh(d*x + c)^2 + 4*(2*d*cosh 
(d*x + c)^7 + 9*d*cosh(d*x + c)^5 + 14*d*cosh(d*x + c)^3 + 7*d*cosh(d*x...
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.06 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {b^{3} \tanh \left (d x + c\right )^{7}}{7 \, d} + \frac {3 \, a b^{2} \tanh \left (d x + c\right )^{5}}{5 \, d} + \frac {a^{2} b \tanh \left (d x + c\right )^{3}}{d} + \frac {2 \, a^{3}}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \] Input:

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

Output:

1/7*b^3*tanh(d*x + c)^7/d + 3/5*a*b^2*tanh(d*x + c)^5/d + a^2*b*tanh(d*x + 
 c)^3/d + 2*a^3/(d*(e^(-2*d*x - 2*c) + 1))
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (63) = 126\).

Time = 0.22 (sec) , antiderivative size = 347, normalized size of antiderivative = 5.18 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=-\frac {2 \, {\left (35 \, a^{3} e^{\left (12 \, d x + 12 \, c\right )} + 105 \, a^{2} b e^{\left (12 \, d x + 12 \, c\right )} + 105 \, a b^{2} e^{\left (12 \, d x + 12 \, c\right )} + 35 \, b^{3} e^{\left (12 \, d x + 12 \, c\right )} + 210 \, a^{3} e^{\left (10 \, d x + 10 \, c\right )} + 420 \, a^{2} b e^{\left (10 \, d x + 10 \, c\right )} + 210 \, a b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 525 \, a^{3} e^{\left (8 \, d x + 8 \, c\right )} + 665 \, a^{2} b e^{\left (8 \, d x + 8 \, c\right )} + 315 \, a b^{2} e^{\left (8 \, d x + 8 \, c\right )} + 175 \, b^{3} e^{\left (8 \, d x + 8 \, c\right )} + 700 \, a^{3} e^{\left (6 \, d x + 6 \, c\right )} + 560 \, a^{2} b e^{\left (6 \, d x + 6 \, c\right )} + 420 \, a b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 525 \, a^{3} e^{\left (4 \, d x + 4 \, c\right )} + 315 \, a^{2} b e^{\left (4 \, d x + 4 \, c\right )} + 231 \, a b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 105 \, b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 210 \, a^{3} e^{\left (2 \, d x + 2 \, c\right )} + 140 \, a^{2} b e^{\left (2 \, d x + 2 \, c\right )} + 42 \, a b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 35 \, a^{3} + 35 \, a^{2} b + 21 \, a b^{2} + 5 \, b^{3}\right )}}{35 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{7}} \] Input:

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

Output:

-2/35*(35*a^3*e^(12*d*x + 12*c) + 105*a^2*b*e^(12*d*x + 12*c) + 105*a*b^2* 
e^(12*d*x + 12*c) + 35*b^3*e^(12*d*x + 12*c) + 210*a^3*e^(10*d*x + 10*c) + 
 420*a^2*b*e^(10*d*x + 10*c) + 210*a*b^2*e^(10*d*x + 10*c) + 525*a^3*e^(8* 
d*x + 8*c) + 665*a^2*b*e^(8*d*x + 8*c) + 315*a*b^2*e^(8*d*x + 8*c) + 175*b 
^3*e^(8*d*x + 8*c) + 700*a^3*e^(6*d*x + 6*c) + 560*a^2*b*e^(6*d*x + 6*c) + 
 420*a*b^2*e^(6*d*x + 6*c) + 525*a^3*e^(4*d*x + 4*c) + 315*a^2*b*e^(4*d*x 
+ 4*c) + 231*a*b^2*e^(4*d*x + 4*c) + 105*b^3*e^(4*d*x + 4*c) + 210*a^3*e^( 
2*d*x + 2*c) + 140*a^2*b*e^(2*d*x + 2*c) + 42*a*b^2*e^(2*d*x + 2*c) + 35*a 
^3 + 35*a^2*b + 21*a*b^2 + 5*b^3)/(d*(e^(2*d*x + 2*c) + 1)^7)
 

Mupad [B] (verification not implemented)

Time = 2.52 (sec) , antiderivative size = 1050, normalized size of antiderivative = 15.67 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\text {Too large to display} \] Input:

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

Output:

- ((2*(3*a*b^2 - 3*a^2*b + 5*a^3 - 5*b^3))/(35*d) + (2*exp(6*c + 6*d*x)*(a 
 + b)^3)/(7*d) - (6*exp(2*c + 2*d*x)*(a*b^2 + a^2*b - 5*a^3 - 5*b^3))/(35* 
d) + (6*exp(4*c + 4*d*x)*(a + b)^2*(a - b))/(7*d))/(4*exp(2*c + 2*d*x) + 6 
*exp(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c + 8*d*x) + 1) - ((2*(a + 
b)^3)/(7*d) + (2*exp(12*c + 12*d*x)*(a + b)^3)/(7*d) - (6*exp(4*c + 4*d*x) 
*(a*b^2 + a^2*b - 5*a^3 - 5*b^3))/(7*d) - (6*exp(8*c + 8*d*x)*(a*b^2 + a^2 
*b - 5*a^3 - 5*b^3))/(7*d) + (8*exp(6*c + 6*d*x)*(3*a*b^2 - 3*a^2*b + 5*a^ 
3 - 5*b^3))/(7*d) + (12*exp(2*c + 2*d*x)*(a + b)^2*(a - b))/(7*d) + (12*ex 
p(10*c + 10*d*x)*(a + b)^2*(a - b))/(7*d))/(7*exp(2*c + 2*d*x) + 21*exp(4* 
c + 4*d*x) + 35*exp(6*c + 6*d*x) + 35*exp(8*c + 8*d*x) + 21*exp(10*c + 10* 
d*x) + 7*exp(12*c + 12*d*x) + exp(14*c + 14*d*x) + 1) - ((2*exp(4*c + 4*d* 
x)*(a + b)^3)/(7*d) - (2*(a*b^2 + a^2*b - 5*a^3 - 5*b^3))/(35*d) + (4*exp( 
2*c + 2*d*x)*(a + b)^2*(a - b))/(7*d))/(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4 
*d*x) + exp(6*c + 6*d*x) + 1) - ((2*(a + b)^2*(a - b))/(7*d) + (2*exp(2*c 
+ 2*d*x)*(a + b)^3)/(7*d))/(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1) - ( 
(2*exp(8*c + 8*d*x)*(a + b)^3)/(7*d) - (2*(a*b^2 + a^2*b - 5*a^3 - 5*b^3)) 
/(35*d) - (12*exp(4*c + 4*d*x)*(a*b^2 + a^2*b - 5*a^3 - 5*b^3))/(35*d) + ( 
8*exp(2*c + 2*d*x)*(3*a*b^2 - 3*a^2*b + 5*a^3 - 5*b^3))/(35*d) + (8*exp(6* 
c + 6*d*x)*(a + b)^2*(a - b))/(7*d))/(5*exp(2*c + 2*d*x) + 10*exp(4*c + 4* 
d*x) + 10*exp(6*c + 6*d*x) + 5*exp(8*c + 8*d*x) + exp(10*c + 10*d*x) + ...
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 435, normalized size of antiderivative = 6.49 \[ \int \text {sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {\frac {2 e^{14 d x +14 c} a^{3}}{7}+\frac {6 e^{14 d x +14 c} a^{2} b}{7}+\frac {6 e^{14 d x +14 c} a \,b^{2}}{7}+\frac {2 e^{14 d x +14 c} b^{3}}{7}-6 e^{10 d x +10 c} a^{3}-6 e^{10 d x +10 c} a^{2} b +6 e^{10 d x +10 c} a \,b^{2}+6 e^{10 d x +10 c} b^{3}-20 e^{8 d x +8 c} a^{3}-8 e^{8 d x +8 c} a^{2} b +12 e^{8 d x +8 c} a \,b^{2}-30 e^{6 d x +6 c} a^{3}-2 e^{6 d x +6 c} a^{2} b +6 e^{6 d x +6 c} a \,b^{2}+10 e^{6 d x +6 c} b^{3}-24 e^{4 d x +4 c} a^{3}+\frac {24 e^{4 d x +4 c} a \,b^{2}}{5}-10 e^{2 d x +2 c} a^{3}-2 e^{2 d x +2 c} a^{2} b +\frac {18 e^{2 d x +2 c} a \,b^{2}}{5}+2 e^{2 d x +2 c} b^{3}-\frac {12 a^{3}}{7}-\frac {8 a^{2} b}{7}-\frac {12 a \,b^{2}}{35}}{d \left (e^{14 d x +14 c}+7 e^{12 d x +12 c}+21 e^{10 d x +10 c}+35 e^{8 d x +8 c}+35 e^{6 d x +6 c}+21 e^{4 d x +4 c}+7 e^{2 d x +2 c}+1\right )} \] Input:

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

Output:

(2*(5*e**(14*c + 14*d*x)*a**3 + 15*e**(14*c + 14*d*x)*a**2*b + 15*e**(14*c 
 + 14*d*x)*a*b**2 + 5*e**(14*c + 14*d*x)*b**3 - 105*e**(10*c + 10*d*x)*a** 
3 - 105*e**(10*c + 10*d*x)*a**2*b + 105*e**(10*c + 10*d*x)*a*b**2 + 105*e* 
*(10*c + 10*d*x)*b**3 - 350*e**(8*c + 8*d*x)*a**3 - 140*e**(8*c + 8*d*x)*a 
**2*b + 210*e**(8*c + 8*d*x)*a*b**2 - 525*e**(6*c + 6*d*x)*a**3 - 35*e**(6 
*c + 6*d*x)*a**2*b + 105*e**(6*c + 6*d*x)*a*b**2 + 175*e**(6*c + 6*d*x)*b* 
*3 - 420*e**(4*c + 4*d*x)*a**3 + 84*e**(4*c + 4*d*x)*a*b**2 - 175*e**(2*c 
+ 2*d*x)*a**3 - 35*e**(2*c + 2*d*x)*a**2*b + 63*e**(2*c + 2*d*x)*a*b**2 + 
35*e**(2*c + 2*d*x)*b**3 - 30*a**3 - 20*a**2*b - 6*a*b**2))/(35*d*(e**(14* 
c + 14*d*x) + 7*e**(12*c + 12*d*x) + 21*e**(10*c + 10*d*x) + 35*e**(8*c + 
8*d*x) + 35*e**(6*c + 6*d*x) + 21*e**(4*c + 4*d*x) + 7*e**(2*c + 2*d*x) + 
1))