I am trying to determine whether or not the following statement is true:
If $f \in L^2(0,1)$ and $\int_0^1 x^nf(x) = 0$ for all positive integers $n$. Then $f(x) = 0$
I have already verified this when $L^2(0,1)$ is replaced with $C[0,1]$ and I believe that it continues to hold in this case.
My thought as far as $L^2(0,1)$ goes is to treat it as a Hilbert space. (Maybe this is the wrong approach?) We can rephrase in terms of inner products:
If $f \in L^2(0,1)$ and $<f,x^n> = 0$ for all positive integers $n$, then $f(x)=0$
Let $S = \{x^n\}_{n=1}^{\infty}$. Then we can rephrase the statement:
If $f \in L^2(0,1)$ and $f \in S^\perp$, then $f=0$
Equivalently $S^\perp = \{0\}$
Equivalently span($S$) is dense in $L^2(0,1)$
Now it seems very likely that this is in fact true since the span of $S$ is almost the set of all polynomials. The only polynomials not included in the span of $S$ would be the nonzero constant polynomials. So it would seem that we have the following sequence of dense sets (I have not verified all of these so let me know if I am wrong). Span of $S$ is dense in the polynomials on $(0,1)$ which are dense in $C(0,1)$ by Weierstrass's Theorem which is dense in $L^2(0,1)$. And thus if all of these inclusions are true then the span of $S$ is dense in $L^2(0,1)$.
So I would appreciate help in proving this sequence of dense subsets or if you can provide a counterexample that will be helpful also. Or a suggestion on another more direct way to approach the question would be nice.
Thanks in advance!
Hint: use the fact that uniform convergence implies $L^2$ convergence on $(0,1)$