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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 25 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\frac {\log \left (\sinh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {3556} \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\frac {\log \left (\sinh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

[In]

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

[Out]

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

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.60 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\frac {\log \left (\cosh \left (d \left (a+b \log \left (c x^n\right )\right )\right )\right )+\log \left (\tanh \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00

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

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 76, normalized size of antiderivative = 3.04 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=-\frac {b d n \log \left (x\right ) - \log \left (\frac {2 \, \sinh \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} \]

[In]

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

[Out]

-(b*d*n*log(x) - log(2*sinh(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 [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (20) = 40\).

Time = 4.79 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.84 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \coth {\left (a d \right )} & \text {for}\: b = 0 \\\tilde {\infty } \log {\left (x \right )} & \text {for}\: d = 0 \\\log {\left (x \right )} \coth {\left (a d + b d \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\\frac {\log {\left (\sinh {\left (a d + b d \log {\left (c x^{n} \right )} \right )} \right )}}{b d n} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((log(x)*coth(a*d), Eq(b, 0)), (zoo*log(x), Eq(d, 0)), (log(x)*coth(a*d + b*d*log(c)), Eq(n, 0)), (lo
g(sinh(a*d + b*d*log(c*x**n)))/(b*d*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.17 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.96 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\frac {\log \left (\sinh \left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right )\right )}{b d n} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (25) = 50\).

Time = 0.36 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.96 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\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 ) \]

[In]

integrate(coth(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] (verification not implemented)

Time = 1.86 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.36 \[ \int \frac {\coth \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\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 ) \]

[In]

int(coth(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)