Let $f: [0,1] \rightarrow [0,1]$ be a continuous function with the property that,
$$\int_{0}^{1} f(x)x^n dx = \frac{1}{n+2}$$
for all $n = 0, 1, \dots$
Show that $f(x) = x$.
Well, I tried to use induction, but that didn't really work out because for the case $n=0$, you just get $\displaystyle\int_{0}^{1} f(x) dx = 1/2$.
I tried to use the Mean Value Theorem, and got that there is a $\xi \in [0,1]$ such that
$$\int_{0}^{1} f(x)x^n dx = f(\xi) \int_{0}^{1} x^n dx = f(\xi)\frac{1}{n+1} = \frac{1}{n+2}.$$
Therefore, there exists $\xi \in [0,1]$ such that $f(\xi) = \frac{n+1}{n+2}$ for all $n$.
I'm not really sure what to try next. This is also a question from an old qual exam and possibly uses techniques not covered in my course.