Finite Series $\sum_{k=1}^{n-1}\frac1{1-\cos(\frac{2k\pi}{n})}$
I want to show that
$$\sum_{k=1}^{n-1}\frac1{1-\cos(\frac{2k\pi}{n})} = \frac{n^2-1}6$$ With induction I don't know how I could come back from $\frac{1}{1-\cos(\frac{2k\pi}{n+1})}$ to $\frac{1}{1-\cos(\frac{2k\pi}{n})}$.
I know that $\sum_{k=1}^{n-1}\cos(\frac{2k\pi}{n}) = -1$, but don't see any way how I could use that here.
Solution 1:
If $z=\mathrm e^{\mathrm it}$, $z\ne1$, then $\cos t=\frac12(z+z^{-1})$ hence $1/(1-\cos t)=-2z/(1-z)^2$. The sum $s_n$ to be computed is $$ s_n=\sum_z^*\frac{-2z}{(1-z)^2}, $$ where $\sum\limits^*_z$ means that the sum runs over every $n$th root $z$ of $1$ different from $1$. For every $|x|\lt1$, consider $$ t_n(x)=\sum_z\frac{zx}{(1-zx)^2}, $$ where $\sum\limits_z$ means that the sum runs over every $n$th root $z$ of $1$. Expanding each ratio $zx/(1-zx)^2$ as a power series in $(zx)$, one gets $$ t_n(x)=\sum_{k\geqslant1}ku_k^nx^k,\qquad u_k^n=\sum_zz^k. $$ Now, $u_k^n=0$ for every $k$ except when $k$ is a multiple of $n$, in which case $u_k^n=n$. Thus, $$ t_n(x)=n^2\sum_{k\geqslant1}kx^{nk}=\frac{n^2x^n}{(1-x^n)^2}. $$ This allows to compute $s_n$ since $$ s_n=2\cdot\lim_{x\to1}\left(\frac{x}{(1-x)^2}-t_n(x)\right). $$ Expanding both terms in the limit in powers of $1-x$ when $x\to1$ yields finally $$ s_n=2\cdot\frac{n^2-1}{12}=\frac{n^2-1}6. $$
Solution 2:
$\dfrac{1}{1-\cos{\dfrac{2k\pi}{n}}}=\dfrac{1}{2\sin^2{\dfrac{k\pi}{n}}}=\dfrac{\csc^2\dfrac{k\pi}{n}}{2}=\dfrac{1}{2}+\dfrac{\cot^2{\dfrac{k\pi}{n}}}{2}$
now the equation become :
$\dfrac{(n-1)}{2}+\sum\limits_{k=1}^{n-1}\dfrac{\cot^2{\dfrac{k\pi}{n}}}{2}=\dfrac{1}{6} \cdot (n^2-1) \implies \sum\limits_{k=1}^{n-1}\cot^2{\dfrac{k\pi}{n}}=\dfrac{(n-1)(n-2)}{6}$(edit:a mistake before)
now check this link to see how to prove this kind of equation.