$$\int^{+\infty}_{1}\left(\tan\left(\frac{1}{x}\right)\right)^2dx$$
I just have to show in a simple comparison with a known derivative if this function converges. My guess is to substitute $1/x$ for $u$ and then integrate $\tan(u)$.
If this converges then the above function also converges. What if the question is like
$$\sum_{n=17}^{\infty}\left(\tan\left(\frac{1}{n}\right)\right)^2 \ \ ?$$
Will the same argument work or do I have to use another one?
After substitution, $u=1/x$, you get $$ \int_0^1\Bigl(\frac{\tan u}{u}\Bigr)^2\,du. $$ Now, $\frac{\tan u}{u}\to 1$ as $u\to 0$, so the integrand is bounded (here we also use that $1<\pi/2$ which is the first positive singularity of the tangent function), and so the integral converges.
Thanks to the limit above there exists $C>0$ so that $$ \tan(1/x)\leq C/x, $$ for $x>1$. Therefore $$ \bigl(\tan(1/n)\bigr)^2\leq C^2/n^2. $$ I leave it to you to conclude.