$f:[0,2\pi] \to \mathbb R$ is a continuous function. For every trigonometric function $T(x)=\sum_{k=0}^n a_k\cos(kx)+b_k\sin(bx)$, we have $\int_0^{2\pi}f(x)T(x)dx=0$. We need to prove $f=0$(and I wonder whether it is just $f=0$ a.e.)
Anyways, my consideration is that since $T(x)$ is dense in $C([0,2\pi],\mathbb R)$ which is equipped with sup norm, we have some $T(x)$ that is "almost" $f(x)$. So we can have something looks like $\int_{0}^{2\pi}f^2=0$, which gives $f=0$ a.e. But it is not precise and I got stuck here. Can anyone help out with this?
Let $\epsilon > 0$. Choose a trigonometric polynomial $T$ such that $\|f - T\| < \epsilon$. Then
$$\int_0^{2\pi} f^2(x)\, dx = \int_0^{2\pi} f^2(x)\, dx - \int_0^{2\pi} f(x)T(x)\, dx = \int_0^{2\pi} f(x)(f(x) - T(x))\, dx,$$
and
$$\int_0^{2\pi} f(x)(f(x) - T(x))\, dx \le \int_0^{2\pi} |f(x)| |f(x) - T(x)|\, dx <\epsilon \int_0^{2\pi} |f(x)|\, dx.$$
Thus
$$\int_0^{2\pi}f^2(x)\, dx < \epsilon \int_0^{2\pi} |f(x)|\, dx.$$
Since the latter inequality holds for all $\epsilon > 0$, $\int_0^{2\pi} f^2(x)\, dx = 0$. As $f^2$ is nonnegative and continuous on $[0,2\pi]$, $f^2 \equiv 0$. Hence $f \equiv 0$.