\(\int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx\) [28]

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

Optimal result

Integrand size = 12, antiderivative size = 22 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {\tanh (a+b x)}{b \sqrt {\text {sech}^2(a+b x)}} \]

[Out]

tanh(b*x+a)/b/(sech(b*x+a)^2)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, 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.167, Rules used = {4207, 197} \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {\tanh (a+b x)}{b \sqrt {\text {sech}^2(a+b x)}} \]

[In]

Int[1/Sqrt[Sech[a + b*x]^2],x]

[Out]

Tanh[a + b*x]/(b*Sqrt[Sech[a + b*x]^2])

Rule 197

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

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^{3/2}} \, dx,x,\tanh (a+b x)\right )}{b} \\ & = \frac {\tanh (a+b x)}{b \sqrt {\text {sech}^2(a+b x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {\tanh (a+b x)}{b \sqrt {\text {sech}^2(a+b x)}} \]

[In]

Integrate[1/Sqrt[Sech[a + b*x]^2],x]

[Out]

Tanh[a + b*x]/(b*Sqrt[Sech[a + b*x]^2])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(96\) vs. \(2(20)=40\).

Time = 0.46 (sec) , antiderivative size = 97, normalized size of antiderivative = 4.41

method result size
risch \(\frac {{\mathrm e}^{2 b x +2 a}}{2 b \left (1+{\mathrm e}^{2 b x +2 a}\right ) \sqrt {\frac {{\mathrm e}^{2 b x +2 a}}{\left (1+{\mathrm e}^{2 b x +2 a}\right )^{2}}}}-\frac {1}{2 b \left (1+{\mathrm e}^{2 b x +2 a}\right ) \sqrt {\frac {{\mathrm e}^{2 b x +2 a}}{\left (1+{\mathrm e}^{2 b x +2 a}\right )^{2}}}}\) \(97\)

[In]

int(1/(sech(b*x+a)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2/b/(1+exp(2*b*x+2*a))/(1/(1+exp(2*b*x+2*a))^2*exp(2*b*x+2*a))^(1/2)*exp(2*b*x+2*a)-1/2/b/(1+exp(2*b*x+2*a))
/(1/(1+exp(2*b*x+2*a))^2*exp(2*b*x+2*a))^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.45 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {\sinh \left (b x + a\right )}{b} \]

[In]

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

[Out]

sinh(b*x + a)/b

Sympy [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.32 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\begin {cases} \frac {\tanh {\left (a + b x \right )}}{b \sqrt {\operatorname {sech}^{2}{\left (a + b x \right )}}} & \text {for}\: b \neq 0 \\\frac {x}{\sqrt {\operatorname {sech}^{2}{\left (a \right )}}} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(sech(b*x+a)**2)**(1/2),x)

[Out]

Piecewise((tanh(a + b*x)/(b*sqrt(sech(a + b*x)**2)), Ne(b, 0)), (x/sqrt(sech(a)**2), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.18 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {e^{\left (b x + a\right )}}{2 \, b} - \frac {e^{\left (-b x - a\right )}}{2 \, b} \]

[In]

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

[Out]

1/2*e^(b*x + a)/b - 1/2*e^(-b*x - a)/b

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {e^{\left (b x + a\right )} - e^{\left (-b x - a\right )}}{2 \, b} \]

[In]

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

[Out]

1/2*(e^(b*x + a) - e^(-b*x - a))/b

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.41 \[ \int \frac {1}{\sqrt {\text {sech}^2(a+b x)}} \, dx=\frac {{\mathrm {e}}^{-2\,a-2\,b\,x}\,\left ({\mathrm {e}}^{4\,a+4\,b\,x}-1\right )\,\sqrt {\frac {4\,{\mathrm {e}}^{2\,a+2\,b\,x}}{{\left ({\mathrm {e}}^{2\,a+2\,b\,x}+1\right )}^2}}}{4\,b} \]

[In]

int(1/(1/cosh(a + b*x)^2)^(1/2),x)

[Out]

(exp(- 2*a - 2*b*x)*(exp(4*a + 4*b*x) - 1)*((4*exp(2*a + 2*b*x))/(exp(2*a + 2*b*x) + 1)^2)^(1/2))/(4*b)