Prove that this function is zero for all real number Let be $f$ a continuous function on $[0,2\pi]$. If $\int_0^{2\pi}f(x)e^{-inx}dx=0$ for all $n\in\mathbb{N}$, then $f(x)=0$ for all $x\in [0,2\pi]$.
I was thinking this problem a lot but I don't know what I'm not seeing. I think, by the Stone-Weierstrass theorem I have that exists a sequence of polynomials that approaches uniformly to $f$, and the function $e^{-inx}$ maybe is a way to write points of the plane, and if with this I can write every point of $\mathbb{R}^2$ I got it..., isn't?
I feel a little lost with this. Thanks you to help me.
 A: This entails that $\int_0^{2\pi}f(x)u(x)=0$ where $u(x)$ is
any "trigonometric polynomial", that is a linear combination of the $e^{inx}$. Suppose without loss of generality, that $f(c)=1$
for some $c$ in $(0,2\pi)$. Then on some interval $I$ with centre $c$,
Re$f(c)>1/2$. Take $u(x)=v(x)^N$ where
$$v(x)=s(1+\cos (x-c))$$
for a suitable positive real number $s$. We need to choose $s$ such  that $v(c)>1$
but $v(x)<1$ for $x$ outside the interval $I$. As $N$ increases, the
integral of $f(x)u(x)$ outside $I$ tends to zero, but the real
part of $\int_I f(x)u(x)$ tends to infinity. This gives a contradiction.
I believe this trick is due to Lebesgue.
A: The example $f(x)=e^{-ix}$ shows that the question is not correct as stated. Instead, we must require that $\int_0^{2\pi}f(x)e^{-inx}\;dx=0$ for all $n\in\mathbb{Z}$.
If we make this assumption, then it follows that
$$ \int_0^{2\pi}f(x)\overline{p(x)}\;dx=0 $$
for any trigonometric polynomial
$$ p(x)=\sum_{n=-N}^Nc_ne^{inx} $$
The trigonometric polynomials are dense in $C([0,2\pi])$ with the uniform norm by Stone-Weierstrass, so there is a sequence of trigonometric polynomials $p_n(x)$ such that $||f-p_n||_{\infty}\to 0$, hence $||f-p_n||_2\to 0$.
Therefore
$$ \int_0^{2\pi}|f(x)|^2\;dx=\lim_{n\to\infty}\int_0^{2\pi}f(x)\overline{p_n(x)}\;dx=0 $$
and since $f$ is continuous this implies that $f=0$.
