\(\int (b \text {sech}(c+d x))^n \, dx\) [23]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 10, antiderivative size = 75 \[ \int (b \text {sech}(c+d x))^n \, dx=-\frac {b \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cosh ^2(c+d x)\right ) (b \text {sech}(c+d x))^{-1+n} \sinh (c+d x)}{d (1-n) \sqrt {-\sinh ^2(c+d x)}} \]

[Out]

-b*hypergeom([1/2, 1/2-1/2*n],[3/2-1/2*n],cosh(d*x+c)^2)*(b*sech(d*x+c))^(-1+n)*sinh(d*x+c)/d/(1-n)/(-sinh(d*x
+c)^2)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3857, 2722} \[ \int (b \text {sech}(c+d x))^n \, dx=-\frac {b \sinh (c+d x) (b \text {sech}(c+d x))^{n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cosh ^2(c+d x)\right )}{d (1-n) \sqrt {-\sinh ^2(c+d x)}} \]

[In]

Int[(b*Sech[c + d*x])^n,x]

[Out]

-((b*Hypergeometric2F1[1/2, (1 - n)/2, (3 - n)/2, Cosh[c + d*x]^2]*(b*Sech[c + d*x])^(-1 + n)*Sinh[c + d*x])/(
d*(1 - n)*Sqrt[-Sinh[c + d*x]^2]))

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \left (\frac {\cosh (c+d x)}{b}\right )^n (b \text {sech}(c+d x))^n \int \left (\frac {\cosh (c+d x)}{b}\right )^{-n} \, dx \\ & = -\frac {\cosh (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cosh ^2(c+d x)\right ) (b \text {sech}(c+d x))^n \sinh (c+d x)}{d (1-n) \sqrt {-\sinh ^2(c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.80 \[ \int (b \text {sech}(c+d x))^n \, dx=-\frac {\coth (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {2+n}{2},\text {sech}^2(c+d x)\right ) (b \text {sech}(c+d x))^n \sqrt {\tanh ^2(c+d x)}}{d n} \]

[In]

Integrate[(b*Sech[c + d*x])^n,x]

[Out]

-((Coth[c + d*x]*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Sech[c + d*x]^2]*(b*Sech[c + d*x])^n*Sqrt[Tanh[c + d*x
]^2])/(d*n))

Maple [F]

\[\int \left (b \,\operatorname {sech}\left (d x +c \right )\right )^{n}d x\]

[In]

int((b*sech(d*x+c))^n,x)

[Out]

int((b*sech(d*x+c))^n,x)

Fricas [F]

\[ \int (b \text {sech}(c+d x))^n \, dx=\int { \left (b \operatorname {sech}\left (d x + c\right )\right )^{n} \,d x } \]

[In]

integrate((b*sech(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*sech(d*x + c))^n, x)

Sympy [F]

\[ \int (b \text {sech}(c+d x))^n \, dx=\int \left (b \operatorname {sech}{\left (c + d x \right )}\right )^{n}\, dx \]

[In]

integrate((b*sech(d*x+c))**n,x)

[Out]

Integral((b*sech(c + d*x))**n, x)

Maxima [F]

\[ \int (b \text {sech}(c+d x))^n \, dx=\int { \left (b \operatorname {sech}\left (d x + c\right )\right )^{n} \,d x } \]

[In]

integrate((b*sech(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*sech(d*x + c))^n, x)

Giac [F]

\[ \int (b \text {sech}(c+d x))^n \, dx=\int { \left (b \operatorname {sech}\left (d x + c\right )\right )^{n} \,d x } \]

[In]

integrate((b*sech(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*sech(d*x + c))^n, x)

Mupad [F(-1)]

Timed out. \[ \int (b \text {sech}(c+d x))^n \, dx=\int {\left (\frac {b}{\mathrm {cosh}\left (c+d\,x\right )}\right )}^n \,d x \]

[In]

int((b/cosh(c + d*x))^n,x)

[Out]

int((b/cosh(c + d*x))^n, x)