I assume that the following equation is true:
$$\sum_{k=0}^n \sum_{\ell=-k}^k \exp(i \ell x) = \left( \frac{\sin\left( -\frac{n+1}{2}x \right)}{ \sin\left( -\frac{x}{2} \right)} \right)^2$$
This would be the missing piece for an exercise where I need to show a more complicated equation involving Fourier polynomials.
However, I have trouble showing the above equation. On the left side of the equation, I have trouble dealing with the sums of the exponential expression, for which there is no general law (as far as I know). On the right side of the equation, I have trouble dealing with the square and the fraction of the sine expressions.
Does anyone have an idea of how to deal with this equation?
One way is translating the index $\ell$ to make it start at zero and then use the (partial) geometric series twice, i.e. $$ \begin{array}{rcl} \displaystyle \sum_{k=0}^n \sum_{\ell=-k}^k e^{i\ell x} &=& \displaystyle \sum_{k=0}^n \sum_{\ell=0}^{2k} e^{i(\ell-k)x} \\ &=& \displaystyle \sum_{k=0}^n e^{-ikx} \frac{1-e^{i(2k+1)x}}{1-e^{ix}} \\ &=& \displaystyle \frac{1}{1-e^{ix}} \sum_{k=0}^n e^{-ikx} - \frac{e^{ix}}{1-e^{ix}} \sum_{k=0}^n e^{ikx} \\ &=& \displaystyle \frac{1}{1-e^{ix}} \frac{1-e^{-i(n+1)x}}{1-e^{-ix}} - \frac{e^{ix}}{1-e^{ix}} \frac{1-e^{i(n+1)x}}{1-e^{ix}} \\ \end{array} $$ and you will get the wanted result after some (annoying) algebraic cleaning. Alternatively, you can argue that $e^{ikx} + e^{-ikx} = 2\cos(kx)$, hence $$ \sum_{\ell=-k}^k e^{i\ell x} = 1 + 2\sum_{\ell=1}^k \cos(\ell x) = \frac{\sin((k+\frac{1}{2})x)}{\sin(\frac{x}{2})}, $$ and then make usage of $\sin(\alpha+\beta) = \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta)$ for $\alpha = \frac{nx}{2}$ and $\beta = \frac{x}{2}$, in order to get $$ \sum_{k=0}^n \frac{\sin((k+\frac{1}{2})x)}{\sin(\frac{x}{2})} = \cot\left(\frac{x}{2}\right) \sum_{k=0}^n \sin\left(\frac{kx}{2}\right) + \sum_{k=0}^n \cos\left(\frac{kx}{2}\right) $$ Those two last summations are known as Lagrange trigonometric identities. And I let you finish.