Solution (source code)

= Solution

Direct integration gives
$$
\frac1\pi\int_0^n\cos(kx)\,dk=\frac{\sin(nx)}{\pi x}.
$$
The <sinc approximate identity> converges distributionally to the <Dirac delta function>, using the supplied integral of $\sin y/y$. Thus the limit is \b[$\delta(x)$].