Solution (source code)

= Solution

For <differencing>, the only nonzero filter coefficients are $a_0=1$ and $a_1=-1$. Therefore $a(\lambda)=1-e^{i\lambda}$ and
$$
\boxed{f_Y(\lambda)=4\sin^2(\lambda/2)f_X(\lambda),\qquad
G_a(\lambda)=2\sin(\lambda/2)\quad(0\leq\lambda\leq\pi).}
$$
The left sketch shows the <filter gain> increasing from zero at frequency zero to two at $\pi$. This <differencing> filter removes a constant component and attenuates slowly varying components while relatively emphasizing higher frequencies. It is a high-pass filter, rather than an averaging or smoothing filter.