I am attempting to prove the following, which is a variant of Baby Rudin problem 7.20:
Let $f:[0,1]\to\mathbb R$ be a Riemann-integrable function with $|f(x)|\le1$ for all $x\in[0,1]$. Suppose
$$\int_0^1 f(x)x^n dx=0$$
for each $n=0,1,2,\dots$. Assume $f$ is continuous at some $x_0\in[0,1]$. Show $f(x_0)=0$.
I am unsure where to start. Here are some of my ideas for the proof to get the ball rolling:
Assume to the contrary that $f(x_0)\ne0$.
Define Euclidean distance:
$$||f||_2=\left(\int_0^1 |f(x)|^2dx\right)^\frac12.$$
First, we need to show that $\int_0^1 |f(x)|^2dx=0$. Fix arbitrary $\epsilon>0$. According to Baby Rudin problem 6.12, there exists some continuous $g:[0,1]\to\mathbb R$ such that $||f-g||_2<\epsilon$. I believe it is true that $||f||_2\le||f-g||_2+||g||_2<\epsilon$. The problem is that I need to justify that $\int_0^1 g(x)x^ndx=0$ for any $n\ge0$ before applying the result from problem 7.20 to conclude that $||g||_2=0$. If this conjecture is true, then I will successfully prove $||f||_2=0$.
Finally, I can use the fact that $f$ is continuous at $x_0$ to show that $\int_0^1|f(x)|^2dx>0$, which contradicts with $||f||_2=0$.
Will it work?