Let $f$ be a real continuous $2\pi$-periodic function, and $n$ a natural number such that for any natural number $k < n$, $$\int_0^{2\pi} f(x) \cos(kx)\,\mathrm dx = \int_0^{2\pi} f(x) \sin(kx)\,\mathrm dx \;.$$
How can we prove that $f$ has, at least, $2n$ roots in the interval $[0,2\pi[$?
I'm not sure if the periodicy assumption is really needed, as in that case it would just boil down to $f(0)=f(2\pi)$. Besides, the continuity assumption is not enough to make the Fourier series converge towards $f$.