<s>[INST] Proving $\sum\limits_{r=1}^n \cot \frac{r\pi}{n+1}=0$ using complex numbers Let $x_1,x_2,...,x_n$ be the roots of the equation $x^n+x^{n-1}+...+x+1=0$.

The question is to compute the expression $$\frac{1}{x_1-1} + \frac{1}{x_2-1}+...+\frac{1}{x_n-1}$$
  Hence to prove that $$\sum_{r=1}^n \cot \frac{r\pi}{n+1}=0$$ 

I tried rewriting the expression as $$\sum_{i=1}^n \frac{\bar{x_i}-1}{|x_i-1|^2}$$
I then used the fact that $$x^{n+1}-1=(x-1)(x^n+x^{n-1}+...+x+1=0$$ so $x_i$ are the complex nth roots of unity.Using cosine formula I found that $$|x_i-1|^2=2-2\cos(\frac{2i\pi}{n+1})=4(\sin \frac{\pi}{n+1})^2$$
After substituting this I couldn't simplify the resulting expression.Any ideas?Thanks.
 [/INST] @Jaideep Khare already gave a nice answer to first question, namely he proved that,
$$\frac{1}{x_1-1} + \frac{1}{x_2-1}+...+\frac{1}{x_n-1}=- \frac{n}{2}$$
where $x_i$'s satisfy 
$$\color{red}{\frac{x^{n+1}-1}{x-1}= }x^n+x^{n-1}+...+x+1=0$$
It is easy to check that,  $\color{blue}{x_k = e^{\frac{2r\pi}{n+1}}}$ with $0\le k\le n $
is easy to see that, $x_k$'s are the roots of the equation 
$$\color{red}{\frac{x^{n+1}-1}{x-1} } =x^n+x^{n-1}+...+x+1=0$$
Now using: $\sin x =\frac{e^{ix}-e^{-ix}}{2i}$ and $\cos x =\frac{e^{ix}+e^{-ix}}{2} $ one can check that, 
$$\cot x =i\frac{e^{ix}+e^{-ix}}{e^{ix}-e^{-ix}}=  i +i \frac{2}{e^{2ix}-1}$$
thus, 
$$\color{blue}{\sum_{r=1}^n \cot \frac{r\pi}{n+1} = ni+ 2i\sum_{r=1}^n \frac{1}{\displaystyle{e^{\frac{2r\pi}{n+1}}}-1} = ni+ 2i\sum_{r=1}^n \frac{1}{x_r-1}  =0}$$
</s>