3.771 \(\int \frac{\tan ^2(\frac{1}{x})}{x^2} \, dx\)

Optimal. Leaf size=10 \[ \frac{1}{x}-\tan \left (\frac{1}{x}\right ) \]

[Out]

x^(-1) - Tan[x^(-1)]

________________________________________________________________________________________

Rubi [A]  time = 0.0178687, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3747, 3473, 8} \[ \frac{1}{x}-\tan \left (\frac{1}{x}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x^(-1) - Tan[x^(-1)]

Rule 3747

Int[(x_)^(m_.)*((a_.) + (b_.)*Tan[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Tan[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]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

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

Rubi steps

\begin{align*} \int \frac{\tan ^2\left (\frac{1}{x}\right )}{x^2} \, dx &=-\operatorname{Subst}\left (\int \tan ^2(x) \, dx,x,\frac{1}{x}\right )\\ &=-\tan \left (\frac{1}{x}\right )+\operatorname{Subst}\left (\int 1 \, dx,x,\frac{1}{x}\right )\\ &=\frac{1}{x}-\tan \left (\frac{1}{x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0233596, size = 12, normalized size = 1.2 \[ \tan ^{-1}\left (\tan \left (\frac{1}{x}\right )\right )-\tan \left (\frac{1}{x}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Tan[x^(-1)]] - Tan[x^(-1)]

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 11, normalized size = 1.1 \begin{align*}{x}^{-1}-\tan \left ({x}^{-1} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(1/x)^2/x^2,x)

[Out]

1/x-tan(1/x)

________________________________________________________________________________________

Maxima [B]  time = 0.961496, size = 90, normalized size = 9. \begin{align*} \frac{\cos \left (\frac{2}{x}\right )^{2} - 2 \, x \sin \left (\frac{2}{x}\right ) + \sin \left (\frac{2}{x}\right )^{2} + 2 \, \cos \left (\frac{2}{x}\right ) + 1}{{\left (\cos \left (\frac{2}{x}\right )^{2} + \sin \left (\frac{2}{x}\right )^{2} + 2 \, \cos \left (\frac{2}{x}\right ) + 1\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.03941, size = 28, normalized size = 2.8 \begin{align*} -\frac{x \tan \left (\frac{1}{x}\right ) - 1}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.382807, size = 7, normalized size = 0.7 \begin{align*} - \tan{\left (\frac{1}{x} \right )} + \frac{1}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-tan(1/x) + 1/x

________________________________________________________________________________________

Giac [A]  time = 1.09455, size = 14, normalized size = 1.4 \begin{align*} \frac{1}{x} - \tan \left (\frac{1}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/x - tan(1/x)