\(\int \frac {\sec ^2(\frac {1}{x})}{x^2} \, dx\) [928]

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

Optimal result

Integrand size = 10, antiderivative size = 6 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\tan \left (\frac {1}{x}\right ) \]

[Out]

-tan(1/x)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {4289, 3852, 8} \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\tan \left (\frac {1}{x}\right ) \]

[In]

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

[Out]

-Tan[x^(-1)]

Rule 8

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

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4289

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[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 \sec ^2(x) \, dx,x,\frac {1}{x}\right ) \\ & = \text {Subst}\left (\int 1 \, dx,x,-\tan \left (\frac {1}{x}\right )\right ) \\ & = -\tan \left (\frac {1}{x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\tan \left (\frac {1}{x}\right ) \]

[In]

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

[Out]

-Tan[x^(-1)]

Maple [A] (verified)

Time = 0.94 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.17

method result size
derivativedivides \(-\tan \left (\frac {1}{x}\right )\) \(7\)
default \(-\tan \left (\frac {1}{x}\right )\) \(7\)
risch \(-\frac {2 i}{{\mathrm e}^{\frac {2 i}{x}}+1}\) \(15\)
norman \(\frac {2 \tan \left (\frac {1}{2 x}\right )}{\tan \left (\frac {1}{2 x}\right )^{2}-1}\) \(21\)
parallelrisch \(\frac {2 \tan \left (\frac {1}{2 x}\right )}{\tan \left (\frac {1}{2 x}\right )^{2}-1}\) \(21\)

[In]

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

[Out]

-tan(1/x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 12, normalized size of antiderivative = 2.00 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\frac {\sin \left (\frac {1}{x}\right )}{\cos \left (\frac {1}{x}\right )} \]

[In]

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

[Out]

-sin(1/x)/cos(1/x)

Sympy [F]

\[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=\int \frac {\sec ^{2}{\left (\frac {1}{x} \right )}}{x^{2}}\, dx \]

[In]

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

[Out]

Integral(sec(1/x)**2/x**2, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (6) = 12\).

Time = 0.20 (sec) , antiderivative size = 36, normalized size of antiderivative = 6.00 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\frac {2 \, \sin \left (\frac {2}{x}\right )}{\cos \left (\frac {2}{x}\right )^{2} + \sin \left (\frac {2}{x}\right )^{2} + 2 \, \cos \left (\frac {2}{x}\right ) + 1} \]

[In]

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

[Out]

-2*sin(2/x)/(cos(2/x)^2 + sin(2/x)^2 + 2*cos(2/x) + 1)

Giac [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 3.33 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=\frac {2 \, \tan \left (\frac {1}{2 \, x}\right )}{\tan \left (\frac {1}{2 \, x}\right )^{2} - 1} \]

[In]

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

[Out]

2*tan(1/2/x)/(tan(1/2/x)^2 - 1)

Mupad [B] (verification not implemented)

Time = 26.92 (sec) , antiderivative size = 14, normalized size of antiderivative = 2.33 \[ \int \frac {\sec ^2\left (\frac {1}{x}\right )}{x^2} \, dx=-\frac {2{}\mathrm {i}}{{\mathrm {e}}^{\frac {2{}\mathrm {i}}{x}}+1} \]

[In]

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

[Out]

-2i/(exp(2i/x) + 1)