Infinite sum of reciprocals of squares of lengths of tangents from origin to the curve $y=\sin x$

The points of contact are where the tangent to $y=\sin(x)$, which has a slope of $\cos(x)$, has the same slope as the line from the origin, $\frac{\sin(x)}x$. Thus, we are looking at the points where $x_k=\tan(x_k)$.

The square of the length of the line from the origin is $x_k^2+\sin^2(x_k)=\frac{x_k^4+2x_k^2}{x_k^2+1}$. Therefore, the sum we are looking for is $$ \sum_{k=1}^\infty\frac{x_k^2+1}{x_k^4+2x_k^2}\tag1 $$


The residue of $f(z)=\frac1{\tan(z)-z}-\frac1{(z^2+2)(\tan(z)-z)}$ where $z\ne0$ and $\tan(z)=z$ is $$ \frac1{z^2}-\frac1{z^4+2z^2}=\frac{z^2+1}{z^4+2z^2}\tag2 $$

Thus, the sum of all the residues of $f(z)$ is $2$ times the sum we are seeking plus the residue of $f(z)$ at $z=0$, which is $\frac3{20}$, and the sum of the residues of $f(z)$ at $z=\pm i\sqrt2$, which is $-\frac1{2-\sqrt2\tanh(\sqrt2)}$


Note that the limit $$ \lim_{k\to\infty}\int_{\gamma_{k,\lambda}}f(z)\,\mathrm{d}z=\int_{\gamma_\lambda}f(z)\,\mathrm{d}z\tag3 $$ where $k\in\mathbb{Z}$ and the paths are $$ \scriptsize\gamma_{k,\lambda}=[k\pi+i\lambda,-k\pi+i\lambda]\cup\underbrace{[-k\pi+i\lambda,-k\pi-i\lambda]}_{\le\frac{2\lambda}{k\pi}}\cup[-k\pi-i\lambda,k\pi-i\lambda]\cup\underbrace{[k\pi-i\lambda,k\pi+i\lambda]}_{\le\frac{2\lambda}{k\pi}}\tag4 $$ and $$ \gamma_\lambda=(\infty+i\lambda,-\infty+i\lambda)\cup(-\infty-i\lambda,\infty-i\lambda)\tag5 $$ and $2\pi i$ times the sum of all the residues of $f(z)$ is $$ \lim_{\lambda\to\infty}\int_{\gamma_\lambda}f(z)\,\mathrm{d}z=-2\pi i\tag6 $$

$(6)$ means the sum of the residues of $f(z)$ over all singularities is $-1$. This is $2$ times the sum we are looking for plus $\frac3{20}-\frac1{2-\sqrt2\tanh(\sqrt2)}$


Therefore, $$ \bbox[5px,border:2px solid #C0A000]{ \begin{align} \sum_{k=1}^\infty\frac{x_k^2+1}{x_k^4+2x_k^2} &=-\frac{23}{40}+\frac1{4-2\sqrt2\tanh\left(\sqrt2\right)}\\ &=0.097374597898595746715 \end{align} }\tag5 $$


Numerical Check

Note that each of the roots is a little less than an odd multiple of $\frac\pi2$:

$x_1=4.4934094579090641753\approx\frac{3\pi}2$
$x_2=7.7252518369377071642\approx\frac{5\pi}2$
$x_3=10.904121659428899827\approx\frac{7\pi}2$
$x_4=14.066193912831473480\approx\frac{9\pi}2$

Thus, we can under-approximate the sum using $$ \begin{align} \sum_{k=1}^\infty\frac{x_k^2+1}{x_k^4+2x_k^2} &\approx\sum_{k=1}^\infty\frac{(2k+1)^2\pi^2/4+1}{(2k+1)^4\pi^4/16+(2k+1)^2\pi^2/2}\\ &=0.092481600740508343614 \end{align} $$