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

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

Optimal result

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

[Out]

arcsin(tanh(b*x+a))/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, 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, 222} \[ \int \sqrt {\text {sech}^2(a+b x)} \, dx=\frac {\arcsin (\tanh (a+b x))}{b} \]

[In]

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

[Out]

ArcSin[Tanh[a + b*x]]/b

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

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}{\sqrt {1-x^2}} \, dx,x,\tanh (a+b x)\right )}{b} \\ & = \frac {\arcsin (\tanh (a+b x))}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(29\) vs. \(2(11)=22\).

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.64 \[ \int \sqrt {\text {sech}^2(a+b x)} \, dx=\frac {\arctan (\sinh (a+b x)) \cosh (a+b x) \sqrt {\text {sech}^2(a+b x)}}{b} \]

[In]

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

[Out]

(ArcTan[Sinh[a + b*x]]*Cosh[a + b*x]*Sqrt[Sech[a + b*x]^2])/b

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.49 (sec) , antiderivative size = 130, normalized size of antiderivative = 11.82

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

[In]

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

[Out]

I*ln(exp(b*x)+I*exp(-a))/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(-b*x-a)-I*ln(e
xp(b*x)-I*exp(-a))/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(-b*x-a)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

2*arctan(cosh(b*x + a) + sinh(b*x + a))/b

Sympy [F]

\[ \int \sqrt {\text {sech}^2(a+b x)} \, dx=\int \sqrt {\operatorname {sech}^{2}{\left (a + b x \right )}}\, dx \]

[In]

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

[Out]

Integral(sqrt(sech(a + b*x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \sqrt {\text {sech}^2(a+b x)} \, dx=\frac {\arctan \left (\sinh \left (b x + a\right )\right )}{b} \]

[In]

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

[Out]

arctan(sinh(b*x + a))/b

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09 \[ \int \sqrt {\text {sech}^2(a+b x)} \, dx=\frac {2 \, \arctan \left (e^{\left (b x + a\right )}\right )}{b} \]

[In]

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

[Out]

2*arctan(e^(b*x + a))/b

Mupad [F(-1)]

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

[In]

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

[Out]

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