Let $f: [0, 1] \rightarrow \mathbb{R}$ a continuous function. Proove that : $$n\cdot \displaystyle \int_{0}^{1} x^n \cdot f(x) \, \mathrm{d}x\underset{n\to+\infty}{\longrightarrow}f(1) $$
I would like to know if what I've done is correct, because my book's solution isn't the same at all and seems more complicated.
Using Riemann sum we know that :
$\displaystyle \lim_{n \rightarrow \infty}\int_{0}^{1} x^n \cdot f(x) \mathrm{d}x = \lim_{n \rightarrow \infty}\frac{1}{n}\cdot\sum_{i = 0}^{n} g(\frac{i}{n})$ where $g(x) = x^n \cdot f(x)$. Hence : $\displaystyle \lim_{n \rightarrow \infty} n\cdot\int_{0}^{1} f(x) \cdot x^n \mathrm{d}x = \lim_{n \rightarrow \infty}\sum_{i = 0}^{n}g(\frac{i}{n})$ Yet note that for all $x \in [0, 1[$ $\displaystyle \lim_{n \rightarrow \infty} x^n\cdot f(x) = 0$ and for $x = 1$ we have $g(1) = f(1)$.
Thus : $\displaystyle \lim_{n \rightarrow \infty} n\cdot\int_{0}^{1} f(x) \cdot x^n \mathrm{d}x = f(1)$
"Using Riemann sum we know that :" Why do we know that, exactly? Riemann sums allow us to say that for every fixed $n_0$, $$\int_0^1 x^{n_0} f(x)dx = \lim_{n\to\infty}\frac{1}{n}\sum_{i=0}^n g\left(\frac{i}{n}\right)$$ with $g(x) = x^{n_0}f(x)$. This is not quite what you wrote... Note the absence of limits on the left hand side.
In particular, you are confusing the $n$ (which I wrote $n_0$ to avoid this ambiguity) on the left and the $n$ which goes to infinity in the Riemann sum. Correcting this, what you want to consider is actually $$ \lim_{n_0\to\infty}\int_0^1 x^{n_0} f(x)dx = \lim_{n_0\to\infty}\lim_{n\to\infty}\frac{1}{n}\sum_{i=0}^n g_{n_0}\left(\frac{i}{n}\right) $$ (writing explicitly the dependence of $g$ on $n_0$). And now, essentially what you want to do in your approach is to swap the two limits in the RHS, writing $$\lim_{n_0\to\infty}\lim_{n\to\infty} = \lim_{n\to\infty}\lim_{n_0\to\infty}$$ But you cannot do that in general. You need assumptions for this swap to be correct, and that's the crux of the proof.