3.2.76 \(\int \frac {\tanh (d (a+b \log (c x^n)))}{x} \, dx\) [176]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {3556} \begin {gather*} \frac {\log \left (\cosh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3556

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 {\tanh \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx &=\frac {\text {Subst}\left (\int \tanh (d (a+b x)) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac {\log \left (\cosh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 24, normalized size = 0.96 \begin {gather*} \frac {\log \left (\cosh \left (d \left (a+b \log \left (c x^n\right )\right )\right )\right )}{b d n} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 2.11, size = 48, normalized size = 1.92

method result size
derivativedivides \(\frac {-\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )-1\right )}{2}-\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )+1\right )}{2}}{n b d}\) \(48\)
default \(\frac {-\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )-1\right )}{2}-\frac {\ln \left (\tanh \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )+1\right )}{2}}{n b d}\) \(48\)
risch \(\ln \left (x \right )-\frac {2 a}{n b}-\frac {2 \ln \left (c \right )}{n}-\frac {2 \ln \left (x^{n}\right )}{n}+\frac {i \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{n}-\frac {i \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{n}-\frac {i \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )}{n}+\frac {i \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )}{n}+\frac {\ln \left ({\mathrm e}^{d \left (-i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )+i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )-i b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )+2 b \ln \left (c \right )+2 b \ln \left (x^{n}\right )+2 a \right )}+1\right )}{b d n}\) \(233\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 24, normalized size = 0.96 \begin {gather*} \frac {\log \left (\cosh \left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right )\right )}{b d n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (25) = 50\).
time = 0.47, size = 76, normalized size = 3.04 \begin {gather*} -\frac {b d n \log \left (x\right ) - \log \left (\frac {2 \, \cosh \left (b d n \log \left (x\right ) + b d \log \left (c\right ) + a d\right )}{\cosh \left (b d n \log \left (x\right ) + b d \log \left (c\right ) + a d\right ) - \sinh \left (b d n \log \left (x\right ) + b d \log \left (c\right ) + a d\right )}\right )}{b d n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(b*d*n*log(x) - log(2*cosh(b*d*n*log(x) + b*d*log(c) + a*d)/(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)

________________________________________________________________________________________

Sympy [A]
time = 1.88, size = 36, normalized size = 1.44 \begin {gather*} - \frac {\log {\left (b d n \tanh ^{2}{\left (a d + b d \log {\left (c x^{n} \right )} \right )} - b d n \right )}}{2 b d n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (25) = 50\).
time = 0.50, size = 74, normalized size = 2.96 \begin {gather*} \frac {\log \left (\sqrt {2 \, x^{2 \, b d n} {\left | c \right |}^{2 \, b d} \cos \left (\pi b d \mathrm {sgn}\left (c\right ) - \pi b d\right ) e^{\left (2 \, a d\right )} + x^{4 \, b d n} {\left | c \right |}^{4 \, b d} e^{\left (4 \, a d\right )} + 1}\right )}{b d n} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sqrt(2*x^(2*b*d*n)*abs(c)^(2*b*d)*cos(pi*b*d*sgn(c) - pi*b*d)*e^(2*a*d) + x^(4*b*d*n)*abs(c)^(4*b*d)*e^(4*
a*d) + 1))/(b*d*n) - log(x)

________________________________________________________________________________________

Mupad [B]
time = 1.06, size = 34, normalized size = 1.36 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{2\,a\,d}\,{\left (c\,x^n\right )}^{2\,b\,d}+1\right )}{b\,d\,n}-\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________