$\frac{1}{1-e^{\frac{ik\pi}{n+1}}}+\frac{1}{1-e^{-\frac{ik\pi}{n+1}}}=1$? I'm working on an assignment where part of it is showing that $S_k=0$ for even $k$ and $S_k=1$ for odd $k$, where

$$S_k:=\sum_{j=0}^{n}\cos(k\pi x_j)= \frac{1}{2}\sum_{j=0}^{n}(e^{ik\pi x_{j}}+e^{-ik\pi x_{j}}) $$
Here $x_j=j/(n+1)$.

So, working through the algebra:

$$\frac{1}{2}\sum_{j=0}^{n}(e^{ik\pi x_{j}} +e^{-ik\pi x_{j}}) =\dots
  =\frac{1}{2}\cdot\frac{1-e^{ik\pi}}{1-e^{\frac{ik\pi}{n+1}}}+\frac{1}{2}\cdot\frac{1-e^{-ik\pi}}{1-e^{-\frac{ik\pi}{n+1}}}
 $$

Obviously $S_k=0$ for even $k$'s, since $e^{i\pi\cdot\text{even integer}}=1$. But when $k$ is odd we get $$\frac{1}{1-e^{\frac{ik\pi}{n+1}}}+\frac{1}{1-e^{-\frac{ik\pi}{n+1}}}$$
which isn't obviously one to me, at least. Wolfram alpha confirms it equals 1.
My question: How does one see that it equals 1?
 A: $$
\frac{1}{1-e^{-a}} = \frac{1}{1-e^{-a}}\cdot\frac{e^a}{e^a} = \frac{e^a}{e^a-1} = \frac{-e^a}{1-e^a}.
$$
Hence
$$
\frac{1}{1-e^a} + \frac{1}{1-e^{-a}}  = 1.
$$
A: Reminders first:
$$\forall w,z \in \mathbb C, \overline{\left(\frac{w}{z}\right)}=\frac{\overline w}{\overline z}$$
$$\forall w,z \in \mathbb C, \overline{w+z}=\overline w +\overline z$$
$$\forall a\in \mathbb R, \overline{e^{ia}}=e^{-ia},$$
$$\forall z \in \mathbb C, z+ \overline z=2 \Re( z)$$
Apply these rules to $$\frac{1}{1-e^{\frac{ik\pi}{n+1}}}$$
$$\overline {\left(\frac{1}{1-e^{\frac{ik\pi}{n+1}}}\right)}=\frac{\overline1}{\overline1- \overline {e^{\frac{ik\pi}{n+1}}}}=\frac{1}{1-e^{-\frac{ik\pi}{n+1}}}$$
Then let $\alpha:=\Re\left(\frac{1}{1-e^{\frac{ik\pi}{n+1}}} \right)$
The following identity holds: $$\frac{1}{1-e^{\frac{ik\pi}{n+1}}}+\frac{1}{1-e^{-\frac{ik\pi}{n+1}}}=2 \alpha$$
Now if we let $a:=e^{\frac{k\pi}{n+1}}$,
$$\alpha=\Re(\frac{1}{1-\cos(a)-i\sin(a)})= \frac{1-\cos(a)}{(1-\cos(a))^2+\sin^2(a)} = 1/2 $$
Hence $$\frac{1}{1-e^{\frac{ik\pi}{n+1}}}+\frac{1}{1-e^{-\frac{ik\pi}{n+1}}}=1$$
A: To see that the given expression is equal to $1$, set
$\omega = e^{\frac{ik\pi}{n + 1}}, \tag{1}$
then the expression becomes 
$\dfrac{1}{1 - \omega} + \dfrac{1}{1 - \bar{\omega}} =  \dfrac{1 - \bar{\omega} + 1 - \omega}{(1 - \omega)(1 - \omega)} =  \dfrac{2 - (\omega + \bar{\omega})}{(1 - \omega)(1  - \bar{\omega})}$
$= \dfrac{2 - (\omega + \bar{\omega})}{(1 + \omega \bar{\omega}) - (\omega + \bar{\omega})} = \dfrac{2 - (\omega + \bar{\omega})}{2 - (\omega + \bar{\omega})} = 1, \tag{2}$
since $\omega \bar{\omega} = 1$.
Hope this helps.  Cheerio,
and as always,
Fiat Lux!!!
A: Using trigonometric identities
\begin{align}
\cos (k \pi x_j) &= \frac{\sin (k \pi x_{j+1}) - \sin (k \pi x_{j-1})}{2 \sin (\frac{k \pi}{n+1})} \\
\sum_{j=0}^{n} \cos (k \pi x_j) &= 1+ \frac{1}{2 \sin (\frac{k \pi}{n+1})} \sum_{j=1}^{n} {\sin (k \pi x_{j+1}) - \sin (k \pi x_{j-1})} \\
\end{align}
In the summation on the RHS, the terms that remain are 
$-\sin (\frac{k \pi}{n+1}) + \sin (\frac{k \pi n}{n+1}) + \sin (k \pi)$ which clearly equals $0$ when $k$ is even, and $-2 \sin(\frac{k \pi}{n+1})$ when $k$ is odd.
