We know that continuous functions with compact support is dense in $L^2(\mathbb R)$, but what if we consider continuous functions with compact support which have the additional property that $\int_{\mathbb R}\exp(izx)f(x)dx=0$, where $z$ is a fixed nonreal complex number?
Are they dense in $L^2(\mathbb R)$? My book just mentions this fact and offers no explanation. I have tried to prove this, for example, via approximation by trigonometric polynomials on a finite interval, but that does not seem to work.