Show that $\lim_{x\rightarrow \infty}\frac{1}{n}\sum_{i=1}^{n}f(x_{i})$ exists for every $f\in C[0,1]$. Let $(x_{i})$ be a sequence of numbers in $(0,1)$ such that $\lim_{x\rightarrow \infty}\frac{1}{n}\sum_{i=1}^{n}x_{i}^{k}$ exists for each $k=0,1,2,...$. Show that $\lim_{x\rightarrow \infty}\frac{1}{n}\sum_{i=1}^{n}f(x_{i})$ exists for every $f\in C[0,1]$.
My question is can I use Stone - Weierstrass theorem to solve the above problem. Thanks.
 A: Of course you can use Stone-Weierstrass theorem.

For each $j \geq 1$, choose a polynomial $p_j$ such that $\|f-p_j\|_{C([0,1])} < \frac{1}{j}$, where $\|\cdot\|_{C([0,1])}$ is the supremum norm over $[0, 1]$. (This is the point where the Stone-Weierstrass theorem is required. Of course, any theorem that guarantees the existence of $p_j$'s will suffice.)
Next, let $\mathcal{M}$ be the operator defined by $\mathcal{M}f(n) = \frac{1}{n} \sum_{k=1}^{n} f(x_k)$. Then
$$ |\mathcal{M}f(n) - \mathcal{M}p_j(n)| \leq \tfrac{1}{j}. $$
By the assumption and the linearity of $\mathcal{M}$, we know that $\alpha_j = \lim_{n\to\infty} \mathcal{M} p_j(n)$ converges for any $j$. Then
$$ \alpha_j - \tfrac{1}{j}
\leq \liminf_{n\to\infty} \mathcal{M}f(n)
\leq \limsup_{n\to\infty} \mathcal{M}f(n)
\leq \alpha_j + \tfrac{1}{j}. $$
On the other hand, similar argument shows that $|\alpha_i - \alpha_j| \leq \frac{1}{i}+\frac{1}{j}$. From this it follows that $(\alpha_j)$ is a Cauchy sequence and hence convergent. Denoting by $\ell$ the limit of $(\alpha_j)$ and taking limit as $j\to\infty$, we have
$$ \lim_{n\to\infty} \mathcal{M}f(n) = \ell. $$

If you are acquainted with a bit of functional analysis, here is a more systematic approach:
Notice that $\mathcal{M}f(n) = \frac{1}{n} \sum_{k=1}^{n} f(x_k)$ satisfies $\|\mathcal{M}f\|_{\ell^{\infty}(\Bbb{N})} \leq \|f\|_{C([0,1])}$ and hence is a bounded linear operator from $C([0,1])$ to $\ell^{\infty}(\Bbb{N})$.
Now let us consider $c(\Bbb{N}) = \{(a_n) \in \ell^{\infty}(\Bbb{N}) : \lim_n a_n \text{ exists} \}$. This is a closed subspace of $\ell^{\infty}(\Bbb{N})$. Since $\mathcal{M}$ maps the dense subset $\Bbb{R}[x]$ of $C([0,1])$ to $c(\Bbb{N})$, it follows that the image of $\mathcal{M}$ also lies in $c(\Bbb{N})$.
