Computing the limit of a series involving trigonometric identities Let $x_n\in(n\pi,(n+1)\pi)$ with $\tan(x_n)=x_n$. Can
$$s:=\sum_{n=1}^\infty \frac{1}{x_n^2}$$
be determined explicitly?
My ideas so far: First, I wrote $x_n$ as
$$x_n= \pi (n+z_n)$$
with $z_n\in(0,\frac{1}{2})$.
Using $\zeta(2)=\frac{\pi^2}{6}$ gives with replacing $z_n=\frac{1}{2}$ and $z_n=0$ lower and upper bound on $s$:
$$\frac{1}{2}-\frac{4}{\pi^2} <s< \frac{1}{6}.$$
Maybe it's useful to use the (not absolutely converging) identity
$$\pi\cot(\pi z) = \sum_{k\in\mathbb Z} \frac{1}{z+k}$$
since we have
$$s = \sum_{n=1}^\infty \cot(\pi z_n)^2.$$
 A: At each $x_n$, the function $f(z) = \tan z - z$ has a simple zero. Therefore
$$g(z) = \frac{f'(z)}{z^2\cdot f(z)}$$
has a simple pole with residue $\frac{1}{x_n^2}$ there. Also, the negative solutions to $\tan z = z$ are the points $-x_n, \, n \in \mathbb{N}\setminus \{0\}$. The equation $\tan z = z$ has no non-real solutions. To see that, use the addition theorems of $\sin$ and $\cos$ to obtain
$$\tan (x+iy) = \frac{\sin x \cos x + i \sinh y\cosh y}{\cos^2 x + \sinh^2 y}.$$
For $x = 0$, we have $\tan (iy) = i\tanh y$, so $\tan (iy) = iy \iff y = 0$ since $\lvert\tanh y\rvert < \lvert y\rvert$ for $y\in \mathbb{R}\setminus \{0\}$, and for $x,y \in \mathbb{R}\setminus \{0\}$ we have
$$\biggl\lvert \frac{\sin x\cos x}{x}\biggr\rvert < 1 < \frac{\sinh y\cosh y}{y},$$
but $\tan z = z$ would imply
$$\frac{\sin x\cos x}{x} = \cos^2 x + \sinh^2 y = \frac{\sinh y\cosh y}{y},$$
which is incompatible with the above chain of inequalities. At the points $\bigl(k+\frac{1}{2}\bigr)\pi$ for $k\in \mathbb{Z}$, $f$ has a simple pole, hence $g(z)$ has a simple pole with residue $-\frac{1}{\bigl(k+\frac{1}{2}\bigr)^2\pi^2}$ there.
For $N \in \mathbb{N}$, let $C_N$ be the rectangular path with vertices $(\pm 1\pm i)(N+1)\pi$ in the plane, traversed in positive orientation. Then we have
$$\frac{1}{2\pi i} \int_{C_N} g(z)\,dz = \operatorname{Res}\bigl(g(z);0\bigr) + 2\sum_{n = 1}^N \frac{1}{x_n^2} - \frac{8}{\pi^2}\sum_{n = 0}^N \frac{1}{(2n+1)^2}.$$
By the standard estimate, we have
$$\lim_{N\to \infty} \int_{C_N} g(z)\,dz = 0$$
since $\frac{f'(z)}{f(z)} = \frac{\tan^2 z}{\tan z - z}$ is bounded on $C_N$ independently of $N$: $\lvert\tan z\rvert \to 1$ uniformly in $\operatorname{Re} z$ for $\lvert \operatorname{Im} z\rvert \to +\infty$, and for $\operatorname{Re} z = k\pi$, we have $\tan z = \tanh (\operatorname{Im} z)$ hence $\lvert \tan z\rvert < 1$. Thus we find
$$\sum_{n = 1}^\infty \frac{1}{x_n^2} = \frac{4}{\pi^2}\sum_{n = 0}^\infty \frac{1}{(2n+1)^2} -\frac{1}{2} \operatorname{Res}\bigl(g(z);0\bigr) = \frac{1}{2} -\frac{1}{2} \operatorname{Res}\bigl(g(z);0\bigr).$$
The MacLaurin expansion of $\tan$ yields
\begin{align}
\frac{\tan^2 z}{z^2(\tan z - z)} &= \frac{\bigl(1 + \frac{z^2}{3} + O(z^4)\bigr)^2}{\frac{z^3}{3}\bigl(1 + \frac{2z^2}{5} + O(z^4)\bigr)}\\
&= \frac{3}{z^3}\biggl( 1 + \frac{2z^2}{3} + O(z^4)\biggr)\biggl(1 - \frac{2z^2}{5} + O(z^4)\biggr)\\
&= \frac{3}{z^3}\biggl(1 +\frac{4z^2}{15} + O(z^4)\biggr),
\end{align}
so we have
$$\operatorname{Res}\bigl(g(z);0\bigr) = \frac{4}{5}$$
and therefore
$$\sum_{n = 1}^\infty \frac{1}{x_n^2} = \frac{1}{10}.$$
A: This is a great problem, and has a solution that's similar to Euler's proof of the Basel problem. Write $f(x):=\tan(x)-x$, so that $x_n$ is the ordered sequence of zeros of $f(x)$. Since $\tan(-x)=-\tan(x)$ we get that zeros come in pairs. Notice that $F(z):=z\cos(z)-\sin(z)$ has the same set of zeros (after writing out $\tan(x)$). We can write via Weierstrass factorization:
$$F(z)=e^{g(z)}z^m\prod_{k=1}^\infty \left(1-\frac{z^2}{x_k^2}\right)e^{g_k}.$$
You can prove that $F(z)$ is genus 1, from the fact that $|x_k|>|\pi k|$ and that $\sum_{k\geq 1} \frac{1}{x_k^2}<\infty$. This means there are no extra product terms: $e^{g_k}=1$
Now taylor expand:
$$F(z)=z\cos(z)-\sin(z)=z-\frac{z^3}{2!}+\frac{z^5}{5!}+O(z^7)-z+\frac{z^{3}}{3!}-\frac{z^5}{5!}+O(z^7)=-\frac{1}{3}z^3+\frac{1}{30}z^5+O(z^7).$$
Notice that $z=0$ is a zero of order 3, giving $m=3$. With a bit more work, it's possible to show $e^{g(z)}$ is constant by differentiating $F(z)$ (this is similar to proving $\sin(z),\cos(z)$ lack such a term  in their factorizations).  To get the actual value of $e^{g(z)}$, notice that it must be exactly equal to the coefficient of $z^3$: $-1/3$. Then your series follows:
$$\sum_{k\geq 1} \frac{1}{x_k^2}=3([z^5]F(z))=1/10$$
