\(\int \frac {\text {csch}(a+b \log (c x^n))}{x} \, dx\) [165]

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

Optimal result

Integrand size = 15, antiderivative size = 20 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\text {arctanh}\left (\cosh \left (a+b \log \left (c x^n\right )\right )\right )}{b n} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, 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.067, Rules used = {3855} \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\text {arctanh}\left (\cosh \left (a+b \log \left (c x^n\right )\right )\right )}{b n} \]

[In]

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

[Out]

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

Rule 3855

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

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \text {csch}(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n} \\ & = -\frac {\text {arctanh}\left (\cosh \left (a+b \log \left (c x^n\right )\right )\right )}{b n} \\ \end{align*}

Mathematica [B] (verified)

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

Time = 0.04 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.70 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\log \left (\cosh \left (\frac {a}{2}+\frac {1}{2} b \log \left (c x^n\right )\right )\right )}{b n}+\frac {\log \left (\sinh \left (\frac {a}{2}+\frac {1}{2} b \log \left (c x^n\right )\right )\right )}{b n} \]

[In]

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

[Out]

-(Log[Cosh[a/2 + (b*Log[c*x^n])/2]]/(b*n)) + Log[Sinh[a/2 + (b*Log[c*x^n])/2]]/(b*n)

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {\ln \left (\tanh \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )\right )}{n b}\) \(23\)
default \(\frac {\ln \left (\tanh \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )\right )}{n b}\) \(23\)
parallelrisch \(\frac {\ln \left (\tanh \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )\right )}{n b}\) \(24\)
risch \(\frac {\ln \left (c^{b} \left (x^{n}\right )^{b} {\mathrm e}^{a} {\mathrm e}^{\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}} {\mathrm e}^{-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}}-1\right )}{b n}-\frac {\ln \left (c^{b} \left (x^{n}\right )^{b} {\mathrm e}^{a} {\mathrm e}^{\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}} {\mathrm e}^{-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}}+1\right )}{b n}\) \(217\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 65, normalized size of antiderivative = 3.25 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\log \left (\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 ) + 1\right ) - \log \left (\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 ) - 1\right )}{b n} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 42, normalized size of antiderivative = 2.10 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=- \begin {cases} - \log {\left (x \right )} \operatorname {csch}{\left (a \right )} & \text {for}\: b = 0 \\- \log {\left (x \right )} \operatorname {csch}{\left (a + b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (\tanh {\left (\frac {a}{2} + \frac {b \log {\left (c x^{n} \right )}}{2} \right )} \right )}}{b n} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

-Piecewise((-log(x)*csch(a), Eq(b, 0)), (-log(x)*csch(a + b*log(c)), Eq(n, 0)), (-log(tanh(a/2 + b*log(c*x**n)
/2))/(b*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\log \left (\tanh \left (\frac {1}{2} \, b \log \left (c x^{n}\right ) + \frac {1}{2} \, a\right )\right )}{b n} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.31 (sec) , antiderivative size = 145, normalized size of antiderivative = 7.25 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-c^{b} {\left (\frac {c^{b} e^{\left (-a\right )} \log \left (\sqrt {2 \, x^{b n} {\left | c \right |}^{b} \cos \left (-\frac {1}{2} \, \pi b \mathrm {sgn}\left (c\right ) + \frac {1}{2} \, \pi b\right ) e^{a} + x^{2 \, b n} {\left | c \right |}^{2 \, b} e^{\left (2 \, a\right )} + 1}\right )}{b c^{2 \, b} n} - \frac {c^{b} e^{\left (-a\right )} \log \left (\sqrt {-2 \, x^{b n} {\left | c \right |}^{b} \cos \left (-\frac {1}{2} \, \pi b \mathrm {sgn}\left (c\right ) + \frac {1}{2} \, \pi b\right ) e^{a} + x^{2 \, b n} {\left | c \right |}^{2 \, b} e^{\left (2 \, a\right )} + 1}\right )}{b c^{2 \, b} n}\right )} e^{a} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 2.41 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.15 \[ \int \frac {\text {csch}\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{-a}\,\sqrt {-b^2\,n^2}}{b\,n\,{\left (c\,x^n\right )}^b}\right )}{\sqrt {-b^2\,n^2}} \]

[In]

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

[Out]

-(2*atan((exp(-a)*(-b^2*n^2)^(1/2))/(b*n*(c*x^n)^b)))/(-b^2*n^2)^(1/2)