Frequency Response of the 5-pt Averager Filter

graphics/freqResp_5ptAvg.png
Figure 1: Magnitude and phase of the frequency response of the 5-pt averager filter. Below is a derivation of the analytical expression for the frequency response:
\(\begin{array}{rcl} H(e^{j\hat\omega})&=&\sum\limits_{k=0}^{4}{b_k e^{-j\hat\omega}} \\&=&\frac15 \left(\frac{1-e^{-j5\hat\omega}}{1-e^{-j\hat\omega}}\right) \\&=&\frac15 \left(\frac{e^{-j\hat\omega5/2}(e^{j\hat\omega5/2}- e^{-j\hat\omega5/2})} {e^{-j\hat\omega/2}(e^{j\hat\omega/2}-e^{-j\hat\omega/2})}\right) \\&=&\left(\frac{\sin(\hat\omega5/2)}{5\sin(\hat\omega/2)}\right) e^{-j2\hat\omega} \end{array}\)