### 3.203 $$\int \sqrt{-1+\tanh ^2(x)} \, dx$$

Optimal. Leaf size=16 $-\tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{-\text{sech}^2(x)}}\right )$

[Out]

-ArcTanh[Tanh[x]/Sqrt[-Sech[x]^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0205394, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.4, Rules used = {3657, 4122, 217, 206} $-\tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{-\text{sech}^2(x)}}\right )$

Antiderivative was successfully veriﬁed.

[In]

Int[Sqrt[-1 + Tanh[x]^2],x]

[Out]

-ArcTanh[Tanh[x]/Sqrt[-Sech[x]^2]]

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4122

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
]

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 \sqrt{-1+\tanh ^2(x)} \, dx &=\int \sqrt{-\text{sech}^2(x)} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{1}{\sqrt{-1+x^2}} \, dx,x,\tanh (x)\right )\\ &=-\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{\tanh (x)}{\sqrt{-\text{sech}^2(x)}}\right )\\ &=-\tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{-\text{sech}^2(x)}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0067079, size = 21, normalized size = 1.31 $2 \cosh (x) \sqrt{-\text{sech}^2(x)} \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sqrt[-1 + Tanh[x]^2],x]

[Out]

2*ArcTan[Tanh[x/2]]*Cosh[x]*Sqrt[-Sech[x]^2]

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 15, normalized size = 0.9 \begin{align*} -\ln \left ( \tanh \left ( x \right ) +\sqrt{-1+ \left ( \tanh \left ( x \right ) \right ) ^{2}} \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(tanh(x)+(-1+tanh(x)^2)^(1/2))

________________________________________________________________________________________

Maxima [C]  time = 1.67764, size = 7, normalized size = 0.44 \begin{align*} 2 i \, \arctan \left (e^{x}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*I*arctan(e^x)

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

0

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(tanh(x)**2 - 1), x)

________________________________________________________________________________________

Giac [C]  time = 1.20325, size = 23, normalized size = 1.44 \begin{align*} -\frac{1}{2} \, \log \left (e^{\left (2 \, x\right )} + 1\right ) + \log \left (i \, e^{x} + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*log(e^(2*x) + 1) + log(I*e^x + 1)