3.30 \(\int \frac{1}{\sqrt{-\tanh ^2(c+d x)}} \, dx\)

Optimal. Leaf size=31 \[ \frac{\tanh (c+d x) \log (\sinh (c+d x))}{d \sqrt{-\tanh ^2(c+d x)}} \]

[Out]

(Log[Sinh[c + d*x]]*Tanh[c + d*x])/(d*Sqrt[-Tanh[c + d*x]^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0174017, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3658, 3475} \[ \frac{\tanh (c+d x) \log (\sinh (c+d x))}{d \sqrt{-\tanh ^2(c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[-Tanh[c + d*x]^2],x]

[Out]

(Log[Sinh[c + d*x]]*Tanh[c + d*x])/(d*Sqrt[-Tanh[c + d*x]^2])

Rule 3658

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Tan[e + f*x]^n)^FracPart[p])/(Tan[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{-\tanh ^2(c+d x)}} \, dx &=\frac{\tanh (c+d x) \int \coth (c+d x) \, dx}{\sqrt{-\tanh ^2(c+d x)}}\\ &=\frac{\log (\sinh (c+d x)) \tanh (c+d x)}{d \sqrt{-\tanh ^2(c+d x)}}\\ \end{align*}

Mathematica [A]  time = 0.0792873, size = 39, normalized size = 1.26 \[ \frac{\tanh (c+d x) (\log (\tanh (c+d x))+\log (\cosh (c+d x)))}{d \sqrt{-\tanh ^2(c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[-Tanh[c + d*x]^2],x]

[Out]

((Log[Cosh[c + d*x]] + Log[Tanh[c + d*x]])*Tanh[c + d*x])/(d*Sqrt[-Tanh[c + d*x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 52, normalized size = 1.7 \begin{align*} -{\frac{\tanh \left ( dx+c \right ) \left ( \ln \left ( \tanh \left ( dx+c \right ) +1 \right ) -2\,\ln \left ( \tanh \left ( dx+c \right ) \right ) +\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) \right ) }{2\,d}{\frac{1}{\sqrt{- \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2/d*tanh(d*x+c)*(ln(tanh(d*x+c)+1)-2*ln(tanh(d*x+c))+ln(tanh(d*x+c)-1))/(-tanh(d*x+c)^2)^(1/2)

________________________________________________________________________________________

Maxima [C]  time = 1.57261, size = 61, normalized size = 1.97 \begin{align*} \frac{i \,{\left (d x + c\right )}}{d} + \frac{i \, \log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac{i \, \log \left (e^{\left (-d x - c\right )} - 1\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [C]  time = 2.32129, size = 54, normalized size = 1.74 \begin{align*} \frac{i \, d x - i \, \log \left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(1/sqrt(-tanh(c + d*x)**2), x)

________________________________________________________________________________________

Giac [C]  time = 1.22931, size = 85, normalized size = 2.74 \begin{align*} \frac{\frac{-2 i \, d x - 2 i \, c}{\mathrm{sgn}\left (-e^{\left (4 \, d x + 4 \, c\right )} + 1\right )} + \frac{2 i \, \log \left (-i \, e^{\left (2 \, d x + 2 \, c\right )} + i\right )}{\mathrm{sgn}\left (-e^{\left (4 \, d x + 4 \, c\right )} + 1\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((-2*I*d*x - 2*I*c)/sgn(-e^(4*d*x + 4*c) + 1) + 2*I*log(-I*e^(2*d*x + 2*c) + I)/sgn(-e^(4*d*x + 4*c) + 1))
/d