$$ \sum_{n=0}^{x-1} \csc \left(\frac{(2 n+1)}{2 x} \pi\right) $$
Where $x$ is a natural number.
This series emerged in trying to find a closed form expression for the following series: $$ \sum_{n=0}^{\infty}(-1)^n \sum_{i=0}^{x-1} \frac{1}{2 xn+2i+1} $$ Which is essentially the sum of reciprocals of odd numbers with $x$ consecutive pluses/minuses. For example, with $x=1$, we get $1-\frac{1}{3}+\frac{1}{5} \cdots=\frac{\pi}{4}$
With $x=2$, we get $1+\frac{1}{3}-\frac{1}{5}-\frac{1}{7}+\frac{1}{9}+\frac{1}{11}+…= \frac{\pi}{2 \sqrt{2}}$
I derived that for any $x$, the series is equivalent to $\frac{\pi}{4 x}$ times the aforementioned sum but was unable to find a simpler expression for the cosecant series. Any help would be much appreciated.
As I suggested in a comment, you need to start with $$\csc (t)=\frac 1{\sin(t)}=\frac {2i}{e^{it}-e^{-it}}=\frac {2i\,e^{it}}{1-e^{-2it}}$$
Now, you must consider the definition of the q-digamma function and its extension to the q-polygamma function (have a look here for example) and in particular to their relation to Lambert series.
This makes that, according to the given definitions and above notations, if $$S=\sum_{k=0}^m \csc(k\, t+a)$$ $$i \,\log \left(e^{-i t}\right)\, S=\left(\psi _{e^{-i t}}^{(0)}\left(m+1-\frac{\log \left(e^{i a}\right)}{\log \left(e^{-i t}\right)}\right)-\psi _{e^{-i t}}^{(0)}\left(-\frac{\log \left(e^{i a}\right)}{\log \left(e^{-i t}\right)}\right)\right)-$$ $$\left(\psi _{e^{-i t}}^{(0)}\left(m+1-\frac{\log \left(-e^{i a}\right)}{\log \left(e^{-i t}\right)}\right)-\psi _{e^{-i t}}^{(0)}\left(-\frac{\log \left(-e^{i a}\right)}{\log \left(e^{-i t}\right)}\right) \right)$$
Just change the notation to find the expression for your problem $$S_x=\sum_{n=0}^{x-1} \csc \left(n\,\frac{\pi }{x}+\frac{\pi }{2 x}\right)$$
For the first values of $x$, it is quite simple $$\left\{1,2 \sqrt{2},5,4 \sqrt{2+\sqrt{2}},1+4 \sqrt{5},2 \left(\sqrt{2}+2 \sqrt{6}\right)\right\}$$ but after $x=6$, problems because of the angles.
You must take care that the calculation of the q-polygamma function is quite expensive in term of resources.
Now, compare to the so simple continuous case $$T_x=\int_{0}^{x-1} \csc \left(n\,\frac{\pi }{x}+\frac{\pi }{2 x}\right)\,dn=\frac{2 x}{\pi }\,\log \left(\cot \left(\frac{\pi }{4 x}\right)\right)$$
$S_x$ is, as usual, very hightly coreelated to $T_x$ (if you perform a linear regression with no intercept, $R^2=0.999736$) and the simple $T_x$ really shows all the trends.