The generalised Hamming Window is defined as:
$$ w(n) = \begin{cases} \alpha - (1 - \alpha)\cos(2 \pi n /N), & \text{if $ 0 \leq n \leq N$} \\ 0, & \text{otherwise} \end{cases} $$ with $ 0 \leq \alpha \leq 1$.
By using the formula for DFT: $X[k] = \sum_{k = 0}^{N-1} x[n] e^{-2 \pi i n k / N}$ I tried to obtain the DFT of $w(n)$. The problem is that if I plug $w(n)$ into the DFT, rearrange and sum the geometric series, I get the result:
$$ X[k] = \begin{cases} \alpha N, & \text{if $ k = 0 $} \\ 0, & \text{otherwise} \end{cases} + \frac{\alpha-1}{2} \left[ \frac{1 - e^{-2 \pi i (k-1)}}{1 - e^{-2 \pi i (k-1) / N}} + \frac{1 - e^{-2 \pi i (k+1)}}{1 - e^{-2 \pi i (k+1) / N}} \right] $$
However, I keep getting the result $$ X[k] = \begin{cases} \alpha N , & \text{if $ k = 0 $} \\ 0, & \text{otherwise} \end{cases} $$ as the bracket on the right has both numerators equal to zero for all $k$s.
Question: This is definitely not the right result. What is the correct result? Optional: Where did I make a mistake? Thanks!