3.1.29 \(\int \sqrt {-\tanh ^2(c+d x)} \, dx\) [29]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, 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 = {3739, 3556} \begin {gather*} \frac {\sqrt {-\tanh ^2(c+d x)} \coth (c+d x) \log (\cosh (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3556

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

Rule 3739

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
]])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 31, normalized size = 1.00 \begin {gather*} \frac {\coth (c+d x) \log (\cosh (c+d x)) \sqrt {-\tanh ^2(c+d x)}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 1.45, size = 45, normalized size = 1.45

method result size
derivativedivides \(-\frac {\sqrt {-\left (\tanh ^{2}\left (d x +c \right )\right )}\, \left (\ln \left (\tanh \left (d x +c \right )-1\right )+\ln \left (\tanh \left (d x +c \right )+1\right )\right )}{2 d \tanh \left (d x +c \right )}\) \(45\)
default \(-\frac {\sqrt {-\left (\tanh ^{2}\left (d x +c \right )\right )}\, \left (\ln \left (\tanh \left (d x +c \right )-1\right )+\ln \left (\tanh \left (d x +c \right )+1\right )\right )}{2 d \tanh \left (d x +c \right )}\) \(45\)
risch \(\frac {\left (1+{\mathrm e}^{2 d x +2 c}\right ) \sqrt {-\frac {\left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}{\left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}}\, x}{{\mathrm e}^{2 d x +2 c}-1}-\frac {2 \left (1+{\mathrm e}^{2 d x +2 c}\right ) \sqrt {-\frac {\left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}{\left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}}\, \left (d x +c \right )}{\left ({\mathrm e}^{2 d x +2 c}-1\right ) d}+\frac {\left (1+{\mathrm e}^{2 d x +2 c}\right ) \sqrt {-\frac {\left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}{\left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}}\, \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{\left ({\mathrm e}^{2 d x +2 c}-1\right ) d}\) \(192\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.50, size = 28, normalized size = 0.90 \begin {gather*} -\frac {i \, {\left (d x + c\right )}}{d} - \frac {i \, \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [C] Result contains complex when optimal does not.
time = 0.36, size = 23, normalized size = 0.74 \begin {gather*} \frac {-i \, d x + i \, \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-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.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- \tanh ^{2}{\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [C] Result contains complex when optimal does not.
time = 0.42, size = 54, normalized size = 1.74 \begin {gather*} \frac {i \, {\left (d x + c\right )} \mathrm {sgn}\left (-e^{\left (4 \, d x + 4 \, c\right )} + 1\right ) - i \, \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) \mathrm {sgn}\left (-e^{\left (4 \, d x + 4 \, c\right )} + 1\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sqrt {-{\mathrm {tanh}\left (c+d\,x\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________