Proving for windowing function
I have come across my ways.

$$\begin{align} P(e^{j\omega})&amp;=1+2\cos(\omega) \\ &amp;=\sum_{k=-\infty}^\infty \sum_{k=-1}^1 \delta[n-k]e^{-j\omega n} \end{align}$$

Knowing that non-zero only when $n=k$,

$$P(e^{j\omega})=\sum_{k=-1}^1 e^{-j\omega n}$$

Let $M=n+1$,

$$\require{cancel} \begin{align} P(e^{j\omega}) &amp;=\sum_{k=0}^2 e^{-j\omega (M-1)} \\ &amp;=e^{-j\omega (-1)} \sum_{k=0}^2 e^{-j\omega M} \\ &amp;= e^{j\omega} \left(\frac {1-e^{-j\omega 3}} {1-e^{-j\omega}}\right )  \\&amp;=\cancel{e^{j\omega}} \left( \frac {e^{j\omega 3/2}} {e^{-j \omega 3/2}} \right) \left( \frac {e^{j\omega 3/2} - e^{-j\omega 3/2}} {\cancel{e^{j\omega}} e^{j\omega 1/2} - e^{-j\omega 1/2} } \right) \\&amp;= \frac{\sin(\frac{3\omega}{2})}{\sin(\frac{\omega}{2})} \end{align}  $$