Does there exist a continuous function $f: [0,1]\to[0, \infty )$ such that $$\int_{0}^{1} x^n f(x)= 1$$ for all $n$.
Here is what I tried.
As $f$ is a continuous function on the compact set $[0,1]$ , there exists $m,M \in \mathbb{R}$, $m \leq f(x) \leq M$.
Now applying integration to both side we have $\frac{m}{n+1} \leq 1 \leq \frac{M}{n+1}$ i.e. $m \leq n+1 \leq M$ for all $n\geq 1$.
This contradicts the fact that the set $\mathbb{N}$ is unbounded. It would be great help if you would verify my solution. If the solution is wrong a hint will be greatly appreciated.