3.22 \(\int \tanh ^n(a+b x) \, dx\)

Optimal. Leaf size=43 \[ \frac {\tanh ^{n+1}(a+b x) \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};\tanh ^2(a+b x)\right )}{b (n+1)} \]

[Out]

hypergeom([1, 1/2+1/2*n],[3/2+1/2*n],tanh(b*x+a)^2)*tanh(b*x+a)^(1+n)/b/(1+n)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3476, 364} \[ \frac {\tanh ^{n+1}(a+b x) \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};\tanh ^2(a+b x)\right )}{b (n+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, Tanh[a + b*x]^2]*Tanh[a + b*x]^(1 + n))/(b*(1 + n))

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 3476

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 45, normalized size = 1.05 \[ \frac {\tanh ^{n+1}(a+b x) \, _2F_1\left (1,\frac {n+1}{2};\frac {n+1}{2}+1;\tanh ^2(a+b x)\right )}{b (n+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [F]  time = 0.52, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\tanh \left (b x + a\right )^{n}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral(tanh(b*x + a)^n, x)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 0.39, size = 0, normalized size = 0.00 \[ \int \tanh ^{n}\left (b x +a \right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh \left (b x + a\right )^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int {\mathrm {tanh}\left (a+b\,x\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh ^{n}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________