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]

1/x-tan(1/x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, 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 8

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

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 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]

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.02, size = 12, normalized size = 1.20 \[ \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)]

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 13, normalized size = 1.30 \[ -\frac {x \tan \left (\frac {1}{x}\right ) - 1}{x} \]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 10, normalized size = 1.00 \[ \frac {1}{x} - \tan \left (\frac {1}{x}\right ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 11, normalized size = 1.10 \[ \frac {1}{x}-\tan \left (\frac {1}{x}\right ) \]

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.33, size = 67, normalized size = 6.70 \[ \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} \]

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)

________________________________________________________________________________________

mupad [B]  time = 2.92, size = 10, normalized size = 1.00 \[ \frac {1}{x}-\mathrm {tan}\left (\frac {1}{x}\right ) \]

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)

________________________________________________________________________________________

sympy [A]  time = 0.22, size = 7, normalized size = 0.70 \[ - \tan {\left (\frac {1}{x} \right )} + \frac {1}{x} \]

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

________________________________________________________________________________________