I am stuck on the following problem from Pugh's book:
Does there exist a continuous function $$f: [0,1] \rightarrow \mathbb{R}$$ such that $$\int_0^1 xf(x)\,dx = 1$$ and $$\int_0^1 x^n f(x)\,dx = 0$$ for $$n = 0,2,3,\ldots$$
The progress I made so far is that, for any polynomial $p$, we must have $p'(0) = \int_0^1 p(x)f(x)\,dx$. Also from Cauchy-Schwarz we can deduce that $\int_0^1 f^2(x) \, dx \geq 3$. We also know that the polynomials are dense in the space of continuous functions, but I don't know how to use this fact to solve the problem.
Thank you