As an introduction to Lebesgue integration, our professor gave us some problems of Riemann integration. One of these problems is the following function:
$$f_{n}(x) = n^2 x e^{-nx}.$$
He said the problem with this function is that:
$\lim_{n \rightarrow \infty} f_{n}(x) = 0$ for $x \in [0,1]$ And so the integration from $0$ to $1$ is also $0.$ But $\int_{0}^{1} f_{n}(x)dx = 1.$
My questions are:
1- Does the limit and the integral sign can always be interchanged in the case of Riemann integration? I do not think so, I think this is only true in case of uniformly continuous functions. Am I correct?
2- What is the reason for taking $x \in [0,1],$ is it for integrating reasons or is there a reason regarding the process of taking the limit?
3- Why did not we integrate over $n$ and not $x$?
4- How are we comparing integration over $x$ to taking the limit over $n$? Is not those are 2 very different things?
Could anyone help me in answering these questions that irritates my mind please?
EDIT:
Also, I calculated $\int_{0}^{1} f_{n}(x)dx $ but it was not 1 (I got $\frac{-n}{e^n} - \frac{1}{e^n} + 1$). am I correct? it is 1 after taking the limit as $n \to \infty.$