Integral of $\tan(1/x)$ Using computational software (Mathematica) does not provide a closed form solution for the indefinite integral of $\tan(1/x)$. My question is: does an analytic solution to the integral exist, and is it possible to compute using tools from complex analysis or can any information be gained by exploiting the symmetry of the integrand with algebraic methods (for example group theory)?
 A: Since $\tan(z)=-\frac{d}{dz}\log\cos(z)$ we have
$$ \tan(z) = \sum_{m\geq 0}\frac{8z}{(2m+1)^2 \pi^2 - 4z^2}\tag{1} $$
uniformly over any compact subset of $\mathbb{C}\setminus\left(\frac{\pi}{2}+\pi\mathbb{Z}\right)$, and at least formally
$$ \int\tan\left(\frac{1}{x}\right)\,dx =C+\sum_{m\geq 0}\frac{4}{\pi^2(2m+1)^2}\log\left[(2m+1)^2\pi^2 x^2-4\right]\tag{2}$$
(so not a "well-known" or "elementary" series, but not a monstrosity either) which can be actually used for evaluating the LHS over an interval, if we manage the determination of the complex logarithm with care. The structure of the RHS resembles the structure of the series defining $\zeta'(2)$ and $\eta'(2)$, quantities related to the Glaisher-Kinkelin constant.
$(1)$ can be seen as a consequence of Herglotz' trick, encoding the peculiar geometry/symmetry of the roots/poles of the cosine and tangent functions, as suspected. $(1)$ is also equivalent to
$$\forall a:|\text{Re}(a)|<1,\qquad \int_{0}^{+\infty}\frac{\sinh(au)}{\sinh(u)}\,du = \frac{\pi}{2}\tan\left(\frac{\pi a}{2}\right). \tag{3}$$
