Compute $\sum_{i=1}^{2n} \frac{x^{2i}}{x^i-1}$ where $\{ x \in \mathbb{C}$ | $x^{2n+1} = 1, x \neq 1\}$ $\{ x \in \mathbb{C}$ | $x^{2n+1} = 1$ , $x \neq 1\}$ 
Compute $\displaystyle{\sum_{i=1}^{2n} \frac{x^{2i}}{x^i-1}}$
 A: Since 
$$(x^{\small{2n+1}}-1) = (x-1)(x^{\small{2n}}+x^{\small{2n-1}}+\cdots+x^{\small{2}}+x+1)=0$$
Therefore 
$$(x^{\small{2n}}+x^{\small{2n-1}}+\cdots+x^{\small{2}}+x+1)=0 \hspace{4pt} ({\text{since}} \hspace{4pt} x \neq 1) \tag{1}$$
$$ 
\begin{align*}
S = \sum_{i=1}^{\small{2n}} \frac{x^{\small{2i}}}{x^i-1} &= \sum_{i=1}^{\small{2n}} x^i + \sum_{i=1}^{\small{2n}} \frac{x^{\small{i}}}{x^i-1}\\
&= -1 + \sum_{i=1}^{\small{2n}} \frac{x^{\small{i}}}{x^i-1} \hspace{12pt} {\text{from}} \hspace{4pt} (1) \\
&= -1 + \sum_{i=1}^{n} \frac{x^{\small{i}}}{x^i-1} + \sum_{i={\small{n+1}}}^{\small{2n}} \frac{x^{\small{i}}}{x^i-1} \tag{2}
\end{align*}
$$
Since $x^{\small{2n+1}} = 1$
$$ \frac{x^{\small{n+i}}}{x^{\small{n+i}}-1} = \frac{-1}{x^{\small{n+1-i}}-1} $$
Therefore $(2)$ can be simplified to 
$$ 
\begin{align*}
& -1 + \sum_{i=1}^{n} \frac{x^{\small{i}}}{x^i-1} + \sum_{i={\small{n}}}^{\small{1}} \frac{-1}{x^{\small{n+1-i}}-1}\\
&= -1 + \sum_{i=1}^{n} \frac{x^{\small{i}}}{x^i-1} + \sum_{i={\small{1}}}^{\small{n}} \frac{-1}{x^{\small{i}}-1}\\ 
&= -1 + \sum_{i=1}^{n} \frac{x^{\small{i}}-1}{x^i-1} \\ 
&= n-1
\end{align*}
$$
