Question: Determine all integrable functions $f$ defined on $[0,1]$ so that $\int_0^1 f(t) t^n\, dt = 0$ for all $n =0,1,2,\dots$.
My attempt: Using Stone-Weierstrass theorem, if $g \colon [0,1] \to \mathbb{R}$ satisfy $$ \int_0^1 g(x) x^n \, dx =0$$ for all $ n= 0,1,2,\dots$ then $g\equiv 0$ in $[0,1]$. Let $f$ be such an integrable function and $\epsilon > 0$ be given then there exists continuous $g\colon [0,1] \to \mathbb{R}$ so that $$\int_0^1 |f(x) - g(x)| \, dx < \epsilon.$$ If $f$ is nonnegative for a.e. $x \in [0,1]$ then by triangle inequality we have $$\int_0^1 |g(x)| x^n \, dx \leq \epsilon$$ for all $n = 0,1,2,\dots$ and $\epsilon >0$ can be made arbitrary small then $$\int_0^1 |g(x)| x^n \, dx = 0$$ for all $n =0,1,2,\dots$ so $g\equiv 0$ in $[0,1]$ and $f \equiv 0$ in $[0,1]$. Is there any way to tackle the problem for $f$ be any arbitrary Lebesgue integrable function? Any hints/solutions are appreciated.