Suppose $f$ is an indefinitely differentiable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\, dx=0$ for $k=\{0,1,2,3,.. .\}$, prove $f=0$ .
My attempt :
To prove this assertion , it suffice to prove $$\int_0^1 f^2 (x) \,dx=0$$
Then by approximation theorem , we can find a polynomial such that for every $\epsilon \gt 0$ $$\int_0^1 f^2 (x) \,dx= \int_0^1 (f(x)-\sum_{n=0}^N a_n x^n)f(x) ,dx+\int_0^1 \sum_{n=0}^N f(x) a_n x^n\,dx \le \epsilon M$$ where $M=\sup_{x \in [0,1]}|f(x)|$ .
It seems that we do not need the condition that $f$ is indefinitely differentiable , if $f$ is continuous then the conclution may hold .
My question :
a) Suppose $f$ is a Lebesgue integrable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\ dx=0$ for $k=\{0,1,2,3,.. .\}$, can we prove $f=0$ except on a set of measure $0$ ?
b) If a) is not true , suppose $f$ is a Riemann integrable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\ dx=0$ for $k=\{0,1,2,3,.. .\}$, can we prove $f=0$ except on a set of measure $0$ ?
EDIT:
To prove $f=0 \text{ a.e.}$ , it suffice to prove all the fourier coefficient of $f$ equal to $0$ , then
$$\int_0^1 f(x) \cos(2 \pi nx) \,dx \le \int_0^1 |f(x)||\cos(2 \pi nx)-\sum_{n=0}^{N}a_n x^n| \le \epsilon||f||_{L^1}$$ and the proof is complete.