A conjectural trigonometric identity

Let $T_n$ be the $n$-th Chebyshev polynomial, so that $$T_n(x)-1=\prod_{j=1}^n(x-\cos 2\pi j/n).$$ Taking a logarithmic derivative we have $$\sum_{j=0}^{n-1}\frac{1}{x-\cos 2\pi j/n}=\frac{T_n'(x)}{T_n(x)-1}.$$ For $x=-\cos 2\pi k/n$, we easily find $T_n(x)=-1$. We therefore have $$\sum_{j=0}^{n-1}\frac{1}{\cos 2\pi k/n+\cos 2\pi j/n}=\frac{T_n'(-\cos 2\pi k/n)}{2}.$$ Now the derivative of $T_n$ is equal to $nU_{n-1}$, where $U_{n-1}$ is the Chebyshev polynomial of the second kind, satisfying $U_{n-1}(\cos t)=\frac{\sin nt}{\sin t}$.

For $k\neq 0$, at $t=2\pi k/n+\pi$, so that $\cos t=-\cos 2\pi k/n$, we get $U_{n-1}(-\cos 2\pi k/n)=\frac{\sin(2\pi k+n\pi)}{\sin(2\pi k/n+\pi)}=0$. For $k=0$, we have to take a limit at $t\to\pi$ and we find $U_{n-1}(1)=n$. Therefore we get $$\sum_{k=0}^{n-1}\sum_{j=0}^{n-1}\frac{1}{\cos 2\pi k/n+\cos 2\pi j/n}=\frac{T_n'(1)}{2}=\frac{n^2}{2}.$$


Denote $\omega=e^{2\pi i/n}$, then $\Omega=\{\omega^k:k=0,\ldots,n-1\}$ is the set of roots of the polynomial $f(t):=t^n-1$, $-\Omega=\{-\omega^k:k=0,\ldots,n-1\}$ the set of roots of $g(t):=t^n+1$. We start with the identity $$ \eta(t):=\sum_{k=0}^{n-1}\frac1{t+\omega^k}=\frac{g'(t)}{g(t)}=\frac{nt^{n-1}}{t^n+1}. \quad\quad\quad\quad\quad\quad\quad\quad(1) $$ Your initial sum is $$2\sum_{j,k=0}^{n-1}\frac1{\omega^k+\omega^{-k}+\omega^j+\omega^{-j}}=2\sum_{j,k=0}^{n-1}\frac1{(\omega^k+\omega^{j})(1+\omega^{-j-k})}.$$ Fix $j+k\equiv a\pmod n$, and change the order of summation from $(j,k)$ to $(a,k)$. We get $$ \sum_{a=0}^{n-1}\frac1{1+\omega^{-a}}\sum_{k=0}^{n-1}\frac2{\omega^k+\omega^{a-k}}. $$ Consider the inner sum. Denote $t_{\pm}(a)=\pm i\omega^{a/2}$ so that $$\frac2{\omega^k+\omega^{a-k}}=\frac1{\omega^k+t_+(a)}+\frac1{\omega^k+t_-(a)}$$ and by (1) we get $$ \sum_{k=0}^{n-1}\frac2{\omega^k+\omega^{a-k}}=n\left(\frac{t_+(a)^{n-1}}{t_+(a)^n+1}+\frac{t_-(a)^{n-1}}{t_-(a)^n+1}\right)=nt_+(a)^{n-1}=n(-1)^{\frac{n-1}2}\omega^{\frac{n-1}2 a}. $$ So it remains to calculate the sum $$ n(-1)^{\frac{n-1}2}\sum_{a=0}^{n-1} \frac{\omega^{\frac{n-1}2 a}}{1+\omega^{-a}}= n(-1)^{\frac{n-1}2}\sum_{z\in \Omega}\frac{z^{\frac{n+1}2}}{1+z}. $$ Denote $m=\frac{n+1}2$. We get $$ \sum_{z\in \Omega} \frac{z^m}{z+1}= \sum_{z\in \Omega} \frac{z^m-(-1)^m+(-1)^m}{z+1}= (-1)^m\cdot \frac{n}2+\sum_{z\in \Omega} (z^{m-1}-z^{m-2}+\ldots+(-1)^{m-1})=\\ (-1)^m\cdot \frac{n}2+(-1)^{m-1}\cdot n=(-1)^{m-1}\cdot \frac{n}2 $$ and your conjecture follows.


The following argument is very short, but bit tricky, so I remain it along with the previous answer.

Actually this sum quickly factorizes: using $\cos (x+y)+\cos (x-y)=2\cos x\cos y$ and denoting $(j+k)\cdot \frac{n+1}2=a,(j-k)\cdot \frac{n+1}2=b$ we get $$\cos 2\pi j/n+\cos 2\pi k/n=2\cos 2\pi a/n \cdot \cos 2\pi b/n.$$ Here $j, k, a, b$ may be considered as residues modulo $n$ ($\cos 2\pi a/n$ depends only on $a$ modulo $n$), and the map $(j,k)\mapsto (a,b)$ is bijective on $(\mathbb{Z}/n\mathbb{Z})^2$, thus $$ 2\sum_{j,k=0}^{n-1}\frac1{\cos 2\pi j/n+\cos 2\pi k/n}=\sum_{a,b=0}^{n-1}\frac1{\cos 2\pi a/n\cdot \cos 2\pi b/n}=\left(\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}\right)^2. $$ It remains to calculate the sum $\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}$. Denoting $\omega=e^{2\pi i/n}$ we get $$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{(2n-1)a})=(-1)^{(n-1)/2}n, $$ since the geometric progressions $\sum_{a=0}^{n-1} \omega^{ma}$ sums up to $$\sum_{a=0}^{n-1} \omega^{ma}=\begin{cases}0& \text{for}\, m\, \text{not divisible by}\, n\\ n& \text{for}\, m\, \text{divisible by}\, n. \end{cases}$$