\(\int \frac {\csc (\frac {1}{x})}{x^2} \, dx\) [826]

   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 = 8, antiderivative size = 5 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\text {arctanh}\left (\cos \left (\frac {1}{x}\right )\right ) \]

[Out]

arctanh(cos(1/x))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4290, 3855} \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\text {arctanh}\left (\cos \left (\frac {1}{x}\right )\right ) \]

[In]

Int[Csc[x^(-1)]/x^2,x]

[Out]

ArcTanh[Cos[x^(-1)]]

Rule 3855

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

Rule 4290

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \csc (x) \, dx,x,\frac {1}{x}\right ) \\ & = \text {arctanh}\left (\cos \left (\frac {1}{x}\right )\right ) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(21\) vs. \(2(5)=10\).

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 4.20 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\log \left (\cos \left (\frac {1}{2 x}\right )\right )-\log \left (\sin \left (\frac {1}{2 x}\right )\right ) \]

[In]

Integrate[Csc[x^(-1)]/x^2,x]

[Out]

Log[Cos[1/(2*x)]] - Log[Sin[1/(2*x)]]

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 10, normalized size of antiderivative = 2.00

method result size
norman \(-\ln \left (\tan \left (\frac {1}{2 x}\right )\right )\) \(10\)
parallelrisch \(-\ln \left (\tan \left (\frac {1}{2 x}\right )\right )\) \(10\)
derivativedivides \(\ln \left (\csc \left (\frac {1}{x}\right )+\cot \left (\frac {1}{x}\right )\right )\) \(11\)
default \(\ln \left (\csc \left (\frac {1}{x}\right )+\cot \left (\frac {1}{x}\right )\right )\) \(11\)
risch \(-\ln \left ({\mathrm e}^{\frac {i}{x}}-1\right )+\ln \left ({\mathrm e}^{\frac {i}{x}}+1\right )\) \(24\)

[In]

int(csc(1/x)/x^2,x,method=_RETURNVERBOSE)

[Out]

-ln(tan(1/2/x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (5) = 10\).

Time = 0.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 4.60 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \left (\frac {1}{x}\right ) + \frac {1}{2}\right ) - \frac {1}{2} \, \log \left (-\frac {1}{2} \, \cos \left (\frac {1}{x}\right ) + \frac {1}{2}\right ) \]

[In]

integrate(csc(1/x)/x^2,x, algorithm="fricas")

[Out]

1/2*log(1/2*cos(1/x) + 1/2) - 1/2*log(-1/2*cos(1/x) + 1/2)

Sympy [A] (verification not implemented)

Time = 0.53 (sec) , antiderivative size = 10, normalized size of antiderivative = 2.00 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\log {\left (\cot {\left (\frac {1}{x} \right )} + \csc {\left (\frac {1}{x} \right )} \right )} \]

[In]

integrate(csc(1/x)/x**2,x)

[Out]

log(cot(1/x) + csc(1/x))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 10, normalized size of antiderivative = 2.00 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\log \left (\cot \left (\frac {1}{x}\right ) + \csc \left (\frac {1}{x}\right )\right ) \]

[In]

integrate(csc(1/x)/x^2,x, algorithm="maxima")

[Out]

log(cot(1/x) + csc(1/x))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (5) = 10\).

Time = 0.27 (sec) , antiderivative size = 43, normalized size of antiderivative = 8.60 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=-\frac {1}{2} \, \log \left (\frac {4 \, \tan \left (\frac {1}{2 \, x}\right )^{2}}{\tan \left (\frac {1}{2 \, x}\right )^{2} + 1}\right ) + \frac {1}{2} \, \log \left (\frac {4}{\tan \left (\frac {1}{2 \, x}\right )^{2} + 1}\right ) \]

[In]

integrate(csc(1/x)/x^2,x, algorithm="giac")

[Out]

-1/2*log(4*tan(1/2/x)^2/(tan(1/2/x)^2 + 1)) + 1/2*log(4/(tan(1/2/x)^2 + 1))

Mupad [B] (verification not implemented)

Time = 27.84 (sec) , antiderivative size = 31, normalized size of antiderivative = 6.20 \[ \int \frac {\csc \left (\frac {1}{x}\right )}{x^2} \, dx=\ln \left (-{\mathrm {e}}^{1{}\mathrm {i}/x}\,2{}\mathrm {i}-2{}\mathrm {i}\right )-\ln \left (-{\mathrm {e}}^{1{}\mathrm {i}/x}\,2{}\mathrm {i}+2{}\mathrm {i}\right ) \]

[In]

int(1/(x^2*sin(1/x)),x)

[Out]

log(- exp(1i/x)*2i - 2i) - log(2i - exp(1i/x)*2i)