Solution (source code)

= Solution

With the stated sign convention, write $t=y-x$ to obtain
$$
\mathcal H(e^{i\omega x})(y)
=\frac{e^{i\omega y}}\pi\,\mathcal P\!\int_{-\infty}^{\infty}\frac{e^{-i\omega t}}t\,dt.
$$
The <Cauchy principal value> of the cosine part vanishes by <odd function>[oddness], while the <Dirichlet integral> gives
$$
\mathcal P\!\int_{-\infty}^{\infty}\frac{e^{-i\omega t}}t\,dt=-i\pi\operatorname{sgn}(\omega).
$$
Thus the <Hilbert transform> has <Fourier multiplier operator>[Fourier multiplier] $-i\operatorname{sgn}(\omega)$. Taking the real part yields
$$
\boxed{\mathcal H(\cos\omega x)(y)=\operatorname{sgn}(\omega)\sin(\omega y)}.
$$