3.1000 \(\int \frac{\text{sech}^2(x)}{\sqrt{-4+\tanh ^2(x)}} \, dx\)

Optimal. Leaf size=14 \[ \tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{\tanh ^2(x)-4}}\right ) \]

[Out]

ArcTanh[Tanh[x]/Sqrt[-4 + Tanh[x]^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.051154, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3675, 217, 206} \[ \tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{\tanh ^2(x)-4}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sech[x]^2/Sqrt[-4 + Tanh[x]^2],x]

[Out]

ArcTanh[Tanh[x]/Sqrt[-4 + Tanh[x]^2]]

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 217

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

Rule 206

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

Rubi steps

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

Mathematica [B]  time = 0.0448098, size = 46, normalized size = 3.29 \[ \frac{\sqrt{3 \cosh (2 x)+5} \text{sech}(x) \tan ^{-1}\left (\frac{\sinh (x)}{\sqrt{3 \sinh ^2(x)+4}}\right )}{\sqrt{2} \sqrt{\tanh ^2(x)-4}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[x]^2/Sqrt[-4 + Tanh[x]^2],x]

[Out]

(ArcTan[Sinh[x]/Sqrt[4 + 3*Sinh[x]^2]]*Sqrt[5 + 3*Cosh[2*x]]*Sech[x])/(Sqrt[2]*Sqrt[-4 + Tanh[x]^2])

________________________________________________________________________________________

Maple [F]  time = 0.165, size = 0, normalized size = 0. \begin{align*} \int{ \left ({\rm sech} \left (x\right ) \right ) ^{2}{\frac{1}{\sqrt{-4+ \left ( \tanh \left ( x \right ) \right ) ^{2}}}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)^2/(-4+tanh(x)^2)^(1/2),x)

[Out]

int(sech(x)^2/(-4+tanh(x)^2)^(1/2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}\left (x\right )^{2}}{\sqrt{\tanh \left (x\right )^{2} - 4}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(-4+tanh(x)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(sech(x)^2/sqrt(tanh(x)^2 - 4), x)

________________________________________________________________________________________

Fricas [A]  time = 2.21427, size = 4, normalized size = 0.29 \begin{align*} 0 \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(-4+tanh(x)^2)^(1/2),x, algorithm="fricas")

[Out]

0

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**2/(-4+tanh(x)**2)**(1/2),x)

[Out]

Integral(sech(x)**2/sqrt((tanh(x) - 2)*(tanh(x) + 2)), x)

________________________________________________________________________________________

Giac [B]  time = 1.18857, size = 132, normalized size = 9.43 \begin{align*} \log \left (\frac{\sqrt{{\left (\sqrt{3} + \frac{4}{3 \, e^{\left (2 \, x\right )} + 5} - 2\right )}^{2} + \frac{3 \,{\left (3 \, e^{\left (4 \, x\right )} + 10 \, e^{\left (2 \, x\right )} + 3\right )}}{{\left (3 \, e^{\left (2 \, x\right )} + 5\right )}^{2}}}}{\sqrt{{\left (\sqrt{3} - \frac{4}{3 \, e^{\left (2 \, x\right )} + 5} + 2\right )}^{2} + \frac{3 \,{\left (3 \, e^{\left (4 \, x\right )} + 10 \, e^{\left (2 \, x\right )} + 3\right )}}{{\left (3 \, e^{\left (2 \, x\right )} + 5\right )}^{2}}}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(-4+tanh(x)^2)^(1/2),x, algorithm="giac")

[Out]

log(sqrt((sqrt(3) + 4/(3*e^(2*x) + 5) - 2)^2 + 3*(3*e^(4*x) + 10*e^(2*x) + 3)/(3*e^(2*x) + 5)^2)/sqrt((sqrt(3)
 - 4/(3*e^(2*x) + 5) + 2)^2 + 3*(3*e^(4*x) + 10*e^(2*x) + 3)/(3*e^(2*x) + 5)^2))