Frequency Response with Delta Function? I am trying to find frequency response and magnitude of the frequency response of the following system impulse response:
$$h[n] = 2\delta [n] + 2\delta [n-1]$$

I understand, that through the DTFT:
$$H(\omega ) = 2(1 + e^{-j\omega})$$

However, I am unsure how to find the magnitude of the frequency response.  The solution is:
$$|H(\omega )| = 4 \left| \cos \left(\frac{\omega }{2} \right) \right|$$

What steps are needed in order to convert the above frequency response to the magnitude of the frequency response?
Hint: Expand $e^{j \omega}$ using Euler's formula. This will enable you to express $H(\omega) = R(\omega) + j I(\omega)$ where $R$ and $I$ are the real and imaginary parts and then the magnitude of the frequency response is just $\sqrt{ R(\omega)^2 + I(\omega)^2}$.