Possible Duplicates:
Nonzero $f \in C([0, 1])$ for which $\int_0^1 f(x)x^n dx = 0$ for all $n$Slight generalization of an exercise in (blue) Rudin
What can we say about $f$ if $\int_0^1 f(x)p(x)dx=0$ for all polynomials $p$?
I found a nice problem I would like to share.
Problem: If $f$ is continuous on $[0,1]$, and if
$$\int_0^1 f(x)x^n \ dx =0$$
for every non-negative integer $n$, prove that $f(x)=0$ on $[0,1]$.
Source: W. Rudin, Principles of Mathematical Analysis, Chapter 7, Exercise 20.
I have posted a proposed solution in the answers.