### 3.102 $$\int \text{sech}^2(c+d x) (a+b \tanh ^2(c+d x))^3 \, dx$$

Optimal. Leaf size=67 $\frac{a^2 b \tanh ^3(c+d x)}{d}+\frac{a^3 \tanh (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}$

[Out]

(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]  time = 0.0613605, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.087, Rules used = {3675, 194} $\frac{a^2 b \tanh ^3(c+d x)}{d}+\frac{a^3 \tanh (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}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(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)

Rule 3675

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]}, Dist[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] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \text{sech}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx &=\frac{\operatorname{Subst}\left (\int \left (a+b x^2\right )^3 \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^3+3 a^2 b x^2+3 a b^2 x^4+b^3 x^6\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\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}\\ \end{align*}

Mathematica [A]  time = 0.167314, size = 67, normalized size = 1. $\frac{a^2 b \tanh ^3(c+d x)}{d}+\frac{a^3 \tanh (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}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(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)

________________________________________________________________________________________

Maple [B]  time = 0.065, size = 227, normalized size = 3.4 \begin{align*}{\frac{1}{d} \left ({a}^{3}\tanh \left ( dx+c \right ) +3\,{a}^{2}b \left ( -1/2\,{\frac{\sinh \left ( dx+c \right ) }{ \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}+1/2\, \left ( 2/3+1/3\, \left ({\rm sech} \left (dx+c\right ) \right ) ^{2} \right ) \tanh \left ( dx+c \right ) \right ) +3\,a{b}^{2} \left ( -1/2\,{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{3}}{ \left ( \cosh \left ( dx+c \right ) \right ) ^{5}}}-3/8\,{\frac{\sinh \left ( dx+c \right ) }{ \left ( \cosh \left ( dx+c \right ) \right ) ^{5}}}+3/8\, \left ({\frac{8}{15}}+1/5\, \left ({\rm sech} \left (dx+c\right ) \right ) ^{4}+{\frac{4\, \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{15}} \right ) \tanh \left ( dx+c \right ) \right ) +{b}^{3} \left ( -{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{5}}{2\, \left ( \cosh \left ( dx+c \right ) \right ) ^{7}}}-{\frac{5\, \left ( \sinh \left ( dx+c \right ) \right ) ^{3}}{8\, \left ( \cosh \left ( dx+c \right ) \right ) ^{7}}}-{\frac{5\,\sinh \left ( dx+c \right ) }{16\, \left ( \cosh \left ( dx+c \right ) \right ) ^{7}}}+{\frac{5\,\tanh \left ( dx+c \right ) }{16} \left ({\frac{16}{35}}+{\frac{ \left ({\rm sech} \left (dx+c\right ) \right ) ^{6}}{7}}+{\frac{6\, \left ({\rm sech} \left (dx+c\right ) \right ) ^{4}}{35}}+{\frac{8\, \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{35}} \right ) } \right ) \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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*a*b^2*
(-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)))

________________________________________________________________________________________

Maxima [A]  time = 1.05402, size = 96, normalized size = 1.43 \begin{align*} \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 )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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))

________________________________________________________________________________________

Fricas [B]  time = 1.99027, size = 2034, normalized size = 30.36 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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)
*cosh(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 + 42*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*cosh(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 + c))*sinh(d*x + c) + 35*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{3} \operatorname{sech}^{2}{\left (c + d x \right )}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.70473, size = 468, normalized size = 6.99 \begin{align*} -\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}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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)