If $f\in L^1[0, 1]$ and $\int_{0}^1 x^nf(x)=0$ for all $n = 0,1,2,...$then prove that $f$ is identically zero almost everywhere.
This would be very easier to prove if $f$ were continuous on $[0, 1]$ by applying Stone–Weierstrass' theorem. Isn't it? Even I know every $L^1$ function is appropriated by continuous function. What can I use this fact here to prove this problem. I really need help.
Using Weierstrass' approximation theorem, it follows that $$ \int_{0}^{1}g(x)f(x)dx = 0,\;\;\; g \in C[0,1]. $$ Define $g_{h}$ to be $0$ on $[0,y]$, to ramp linearly and continuously to $1$ on $[y,y+h]$, and to be $1$ on $[y+h,1]$. Then $$ \int_{0}^{y}f(x)dx =\lim_{h\downarrow 0}\int_{0}^{1}g_{h}(x)f(x)dx = 0. $$ The above holds for all $0 \le y < 1$. By the Lebesgue differentiation theorem, $\frac{d}{dy}\int_{0}^{y}f(x)dx=f(y)$ a.e., which means $f=0$ a.e..