Suppose that the function $f$ is:
1) Riemann integrable (not necessarily continuous) function on $\big[a,b \big]$;
2) $\forall n \geq 0$ $\int_{a}^{b}{f(x) x^n} = 0$ (in particular, it means that the function is orthogonal to all polynomials).
Prove that $f(x) = 0$ in all points of continuity $f$.
To keep the notation simple, suppose $f$ is Riemann integrable on $[-1,1],$ $f$ is continuous at $0,$ and $ \int_{-1}^1 p(x)f(x)\, dx =0$ for all polynomials $p.$ We want to show $f(0)=0.$
Suppose, to reach a contradiction, that this fails. Then WLOG $f(0)>0.$ By the continuity of $f$ at $0,$ there exists $0<\delta < 1$ such that $f>f(0)/2$ in $[-\delta,\delta].$
Define $p_n(x) = \sqrt n(1-x^2)^n.$ Then
$$|\int_{\delta}^1 fp_n|\le M\sqrt n(1-\delta^2)^n.$$
The right hand side $\to 0$ as $n\to \infty.$ Same thing for the integral over $[-1,-\delta].$
On the other hand, for large $n$ we have
$$\int_{-\delta}^{\delta} fp_n \ge (f(0)/2)\int_{-\delta}^{\delta} \sqrt n(1-x^2)^n\, dx \ge (f(0)/2)\sqrt n\int_{0}^{1/\sqrt n} (1-x^2)^n\, dx$$ $$ = \int_0^1 (1-y^2/n)^n\,dy \to \int_0^1 e^{-y^2}\,dy >0.$$
This proves that $\int_{-1}^1 p_n(x)f(x)\, dx >0 $ for large $n,$ and we have our contradiction.