If $f$ is a continuous real-valued function, show that $$ f(1)=\lim_{n\to \infty} \int_0^1 (n+1)\,x^n \,f(x) \; dx $$
I am looking for a general hint or steps to proceed but I want to fill them in. Looking at this I see the '$n+1$' along with the $\int x^n$ makes me very suspicious.
My first thought is that $(n+1)x^nf(x)$ converges to $f(1)$ uniformly on $[0,1]$ but I feel as though this is a fools thought. I then sat and tried the case $f(x)=x$ and $f(x)=x^{n_0}$. This was a bit illuminating. I then tried the case where $f(x)$ is a general polynomial and I can show that case. But of course $f(x)$ need not be a polynomial.
To try to make this method work, I considered using Stone-Weierstrass. I can find a sequence of polynomials $p_n(x)$ such that $p_n(x) \to f(x)$ uniformly. But I am unsure of how to make it fit in with the integral. I assume it is trivial to show $x^np_n(x) \to x^nf(x)$. I know that the above limit works with $x^np_n(x)$. However, does this imply that this -- under the limit -- must be the same as $x^nf(x)$? Or is this not at all how I should go about it? Is there a better or easier way? Or perhaps a more enlightening or 'quaint' way?