3.2.96 \(\int \frac {\sqrt {\tanh (a+b \log (c x^n))}}{x} \, dx\) [196]

Optimal. Leaf size=48 \[ -\frac {\text {ArcTan}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}+\frac {\tanh ^{-1}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n} \]

[Out]

-arctan(tanh(a+b*ln(c*x^n))^(1/2))/b/n+arctanh(tanh(a+b*ln(c*x^n))^(1/2))/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3557, 335, 304, 209, 212} \begin {gather*} \frac {\tanh ^{-1}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}-\frac {\text {ArcTan}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[Tanh[a + b*Log[c*x^n]]]/x,x]

[Out]

-(ArcTan[Sqrt[Tanh[a + b*Log[c*x^n]]]]/(b*n)) + ArcTanh[Sqrt[Tanh[a + b*Log[c*x^n]]]]/(b*n)

Rule 209

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

Rule 212

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

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 3557

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \frac {\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}}{x} \, dx &=\frac {\text {Subst}\left (\int \sqrt {\tanh (a+b x)} \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac {\text {Subst}\left (\int \frac {\sqrt {x}}{-1+x^2} \, dx,x,\tanh \left (a+b \log \left (c x^n\right )\right )\right )}{b n}\\ &=-\frac {2 \text {Subst}\left (\int \frac {x^2}{-1+x^4} \, dx,x,\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}\\ &=\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}-\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}\\ &=-\frac {\tan ^{-1}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}+\frac {\tanh ^{-1}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 48, normalized size = 1.00 \begin {gather*} -\frac {\text {ArcTan}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n}+\frac {\tanh ^{-1}\left (\sqrt {\tanh \left (a+b \log \left (c x^n\right )\right )}\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Tanh[a + b*Log[c*x^n]]]/x,x]

[Out]

-(ArcTan[Sqrt[Tanh[a + b*Log[c*x^n]]]]/(b*n)) + ArcTanh[Sqrt[Tanh[a + b*Log[c*x^n]]]]/(b*n)

________________________________________________________________________________________

Maple [A]
time = 4.15, size = 61, normalized size = 1.27

method result size
derivativedivides \(\frac {-\frac {\ln \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )-1\right )}{2}+\frac {\ln \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )+1\right )}{2}-\arctan \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{n b}\) \(61\)
default \(\frac {-\frac {\ln \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )-1\right )}{2}+\frac {\ln \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )+1\right )}{2}-\arctan \left (\sqrt {\tanh }\left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{n b}\) \(61\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(a+b*ln(c*x^n))^(1/2)/x,x,method=_RETURNVERBOSE)

[Out]

1/n/b*(-1/2*ln(tanh(a+b*ln(c*x^n))^(1/2)-1)+1/2*ln(tanh(a+b*ln(c*x^n))^(1/2)+1)-arctan(tanh(a+b*ln(c*x^n))^(1/
2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(a+b*log(c*x^n))^(1/2)/x,x, algorithm="maxima")

[Out]

integrate(sqrt(tanh(b*log(c*x^n) + a))/x, x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 303 vs. \(2 (44) = 88\).
time = 0.36, size = 303, normalized size = 6.31 \begin {gather*} -\frac {2 \, \arctan \left (-\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} - 2 \, \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + {\left (\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 2 \, \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 1\right )} \sqrt {\frac {\sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}}\right ) + \log \left (-\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} - 2 \, \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + {\left (\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 2 \, \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 1\right )} \sqrt {\frac {\sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}}\right )}{2 \, b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(a+b*log(c*x^n))^(1/2)/x,x, algorithm="fricas")

[Out]

-1/2*(2*arctan(-cosh(b*n*log(x) + b*log(c) + a)^2 - 2*cosh(b*n*log(x) + b*log(c) + a)*sinh(b*n*log(x) + b*log(
c) + a) - sinh(b*n*log(x) + b*log(c) + a)^2 + (cosh(b*n*log(x) + b*log(c) + a)^2 + 2*cosh(b*n*log(x) + b*log(c
) + a)*sinh(b*n*log(x) + b*log(c) + a) + sinh(b*n*log(x) + b*log(c) + a)^2 + 1)*sqrt(sinh(b*n*log(x) + b*log(c
) + a)/cosh(b*n*log(x) + b*log(c) + a))) + log(-cosh(b*n*log(x) + b*log(c) + a)^2 - 2*cosh(b*n*log(x) + b*log(
c) + a)*sinh(b*n*log(x) + b*log(c) + a) - sinh(b*n*log(x) + b*log(c) + a)^2 + (cosh(b*n*log(x) + b*log(c) + a)
^2 + 2*cosh(b*n*log(x) + b*log(c) + a)*sinh(b*n*log(x) + b*log(c) + a) + sinh(b*n*log(x) + b*log(c) + a)^2 + 1
)*sqrt(sinh(b*n*log(x) + b*log(c) + a)/cosh(b*n*log(x) + b*log(c) + a))))/(b*n)

________________________________________________________________________________________

Sympy [A]
time = 1.56, size = 66, normalized size = 1.38 \begin {gather*} - \frac {\log {\left (\sqrt {\tanh {\left (a + b \log {\left (c x^{n} \right )} \right )}} - 1 \right )}}{2 b n} + \frac {\log {\left (\sqrt {\tanh {\left (a + b \log {\left (c x^{n} \right )} \right )}} + 1 \right )}}{2 b n} - \frac {\operatorname {atan}{\left (\sqrt {\tanh {\left (a + b \log {\left (c x^{n} \right )} \right )}} \right )}}{b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(a+b*ln(c*x**n))**(1/2)/x,x)

[Out]

-log(sqrt(tanh(a + b*log(c*x**n))) - 1)/(2*b*n) + log(sqrt(tanh(a + b*log(c*x**n))) + 1)/(2*b*n) - atan(sqrt(t
anh(a + b*log(c*x**n))))/(b*n)

________________________________________________________________________________________

Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(a+b*log(c*x^n))^(1/2)/x,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

Mupad [B]
time = 1.45, size = 39, normalized size = 0.81 \begin {gather*} -\frac {\mathrm {atan}\left (\sqrt {\mathrm {tanh}\left (a+b\,\ln \left (c\,x^n\right )\right )}\right )-\mathrm {atanh}\left (\sqrt {\mathrm {tanh}\left (a+b\,\ln \left (c\,x^n\right )\right )}\right )}{b\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(a + b*log(c*x^n))^(1/2)/x,x)

[Out]

-(atan(tanh(a + b*log(c*x^n))^(1/2)) - atanh(tanh(a + b*log(c*x^n))^(1/2)))/(b*n)

________________________________________________________________________________________