### 3.86 $$\int \text{sech}^2(a+b x) \tanh ^n(a+b x) \, dx$$

Optimal. Leaf size=19 $\frac{\tanh ^{n+1}(a+b x)}{b (n+1)}$

[Out]

Tanh[a + b*x]^(1 + n)/(b*(1 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.0351163, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.118, Rules used = {2607, 32} $\frac{\tanh ^{n+1}(a+b x)}{b (n+1)}$

Antiderivative was successfully veriﬁed.

[In]

Int[Sech[a + b*x]^2*Tanh[a + b*x]^n,x]

[Out]

Tanh[a + b*x]^(1 + n)/(b*(1 + n))

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

\begin{align*} \int \text{sech}^2(a+b x) \tanh ^n(a+b x) \, dx &=-\frac{i \operatorname{Subst}\left (\int (-i x)^n \, dx,x,i \tanh (a+b x)\right )}{b}\\ &=\frac{\tanh ^{1+n}(a+b x)}{b (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.0191072, size = 19, normalized size = 1. $\frac{\tanh ^{n+1}(a+b x)}{b (n+1)}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sech[a + b*x]^2*Tanh[a + b*x]^n,x]

[Out]

Tanh[a + b*x]^(1 + n)/(b*(1 + n))

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 20, normalized size = 1.1 \begin{align*}{\frac{ \left ( \tanh \left ( bx+a \right ) \right ) ^{n+1}}{b \left ( n+1 \right ) }} \end{align*}

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

[In]

int(sech(b*x+a)^2*tanh(b*x+a)^n,x)

[Out]

tanh(b*x+a)^(n+1)/b/(n+1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.0714, size = 190, normalized size = 10. \begin{align*} \frac{\cosh \left (n \log \left (\frac{\sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right )\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right ) \sinh \left (n \log \left (\frac{\sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right )\right )}{{\left (b n + b\right )} \cosh \left (b x + a\right )} \end{align*}

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

[In]

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

[Out]

(cosh(n*log(sinh(b*x + a)/cosh(b*x + a)))*sinh(b*x + a) + sinh(b*x + a)*sinh(n*log(sinh(b*x + a)/cosh(b*x + a)
)))/((b*n + b)*cosh(b*x + a))

________________________________________________________________________________________

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

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

[In]

integrate(sech(b*x+a)**2*tanh(b*x+a)**n,x)

[Out]

Integral(tanh(a + b*x)**n*sech(a + b*x)**2, x)

________________________________________________________________________________________

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

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

[In]

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

[Out]

integrate(tanh(b*x + a)^n*sech(b*x + a)^2, x)