3.183 \(\int \frac {\tanh ^2(d (a+b \log (c x^n)))}{x} \, dx\)

Optimal. Leaf size=28 \[ \log (x)-\frac {\tanh \left (a d+b d \log \left (c x^n\right )\right )}{b d n} \]

[Out]

ln(x)-tanh(a*d+b*d*ln(c*x^n))/b/d/n

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3473, 8} \[ \log (x)-\frac {\tanh \left (a d+b d \log \left (c x^n\right )\right )}{b d n} \]

Antiderivative was successfully verified.

[In]

Int[Tanh[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 51, normalized size = 1.82 \[ \frac {\tanh ^{-1}\left (\tanh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n}-\frac {\tanh \left (a d+b d \log \left (c x^n\right )\right )}{b d n} \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.55, size = 72, normalized size = 2.57 \[ \frac {{\left (b d n \log \relax (x) + 1\right )} \cosh \left (b d n \log \relax (x) + b d \log \relax (c) + a d\right ) - \sinh \left (b d n \log \relax (x) + b d \log \relax (c) + a d\right )}{b d n \cosh \left (b d n \log \relax (x) + b d \log \relax (c) + a d\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((b*d*n*log(x) + 1)*cosh(b*d*n*log(x) + b*d*log(c) + a*d) - sinh(b*d*n*log(x) + b*d*log(c) + a*d))/(b*d*n*cosh
(b*d*n*log(x) + b*d*log(c) + a*d))

________________________________________________________________________________________

giac [A]  time = 0.29, size = 37, normalized size = 1.32 \[ \frac {2}{{\left (c^{2 \, b d} x^{2 \, b d n} e^{\left (2 \, a d\right )} + 1\right )} b d n} + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/((c^(2*b*d)*x^(2*b*d*n)*e^(2*a*d) + 1)*b*d*n) + log(x)

________________________________________________________________________________________

maple [B]  time = 0.01, size = 80, normalized size = 2.86 \[ -\frac {\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{b d n}-\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )-1\right )}{2 b d n}+\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )+1\right )}{2 b d n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(d*(a+b*ln(c*x^n)))^2/x,x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 36, normalized size = 1.29 \[ \frac {2}{b c^{2 \, b d} d n e^{\left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )} + b d n} + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/(b*c^(2*b*d)*d*n*e^(2*b*d*log(x^n) + 2*a*d) + b*d*n) + log(x)

________________________________________________________________________________________

mupad [B]  time = 1.06, size = 34, normalized size = 1.21 \[ \ln \relax (x)+\frac {2}{b\,d\,n\,\left ({\mathrm {e}}^{2\,a\,d}\,{\left (c\,x^n\right )}^{2\,b\,d}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) + 2/(b*d*n*(exp(2*a*d)*(c*x^n)^(2*b*d) + 1))

________________________________________________________________________________________

sympy [B]  time = 6.72, size = 70, normalized size = 2.50 \[ - \frac {\log {\left (\tanh {\left (a d + b d \log {\left (c x^{n} \right )} \right )} - 1 \right )}}{2 b d n} + \frac {\log {\left (\tanh {\left (a d + b d \log {\left (c x^{n} \right )} \right )} + 1 \right )}}{2 b d n} - \frac {\tanh {\left (a d + b d \log {\left (c x^{n} \right )} \right )}}{b d n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(tanh(a*d + b*d*log(c*x**n)) - 1)/(2*b*d*n) + log(tanh(a*d + b*d*log(c*x**n)) + 1)/(2*b*d*n) - tanh(a*d +
b*d*log(c*x**n))/(b*d*n)

________________________________________________________________________________________