Solution to the Question 4
a.
$ \begin{align} X(e^{j\omega}) &= \sum^{\infty}_{n=-\infty} x(n)e^{-j\omega n}=\sum^{N-1}_{n=0}e^{j\omega _0 n}e^{-j\omega n} \\ &= \sum^{N-1}_{n=0}e^{j(\omega _0 -\omega)n} \\ &= \left\{\begin{array}{ll} \frac{1-e^{j(\omega _0 -\omega)N}}{1-e^{j(\omega _0 -\omega)}} & \text{if } \omega _0 \text{ is not equal to } \omega , \\ N & \text{if } \omega _0 =\omega. \end{array} \right. \\ &= \left\{\begin{array}{ll} e^{j(\omega _0 -\omega)(N-1)/2}\frac{sin\frac{\omega _0 -\omega}{2}N}{sin\frac{\omega _0 -\omega}{2}} & \text{if } \omega _0 \text{ is not equal to } \omega , \\ N & \text{if } \omega _0 =\omega. \end{array} \right. \end{align} $
b.
c.