For $f_n(x)=nx e^{-nx^2}$ can operations of integration and limit be interchanged?
$$ \lim_{n \to \infty} f_n(x)\, dx = 0 \Rightarrow \\ \int_0^1\lim_{n \to \infty} f_n(x)\, dx = 0 \\ \\ \int_0^1 f_n(x)\, dx = \left.-\frac{1}{2} e^{-nx^2} \right|_{0}^{1} = -\frac{1}{2}(e^{-n}-1) \Rightarrow \\ \lim_{n \to \infty} \int_0^1 f_n(x)\, dx = \frac{1}{2} \\ \lim_{n \to \infty} \int_0^1 f_n(x)\, dx \ne \int_0^1\lim_{n \to \infty} f_n(x)\, dx $$ So, from calculating each side can conclude that the operations of integration and limit can not be interchanged.
But the following can lead to a different conclusion: $$ \begin{align} \left| \int_0^1 f_n(x)\, dx - \int_0^1\lim_{n \to \infty} f_n(x)\, dx \right| &= \left| \int_0^1(f_n(x)- \lim_{n \to \infty} f_n(x))\,dx \right| \\ &<= \int_0^1 \left |f_n(x)- \lim_{n \to \infty} f_n(x) \right | \,dx \end{align} $$ For any $x\in (0,1)$ $f_n(x)$ converge as $n\to \infty$. $$ \lim_{n\to\infty} f_n(x) = f $$ So, for $\forall \epsilon>0\,$ $\exists N > 0$ for $n \ge N$
$$ \left |f_n(x)- f \right | < \epsilon \Rightarrow \\ \int_0^1 \left |f_n(x)- \lim_{n \to \infty} f_n(x) \right | \,dx < \epsilon $$ Can get that for $\forall \epsilon>0\,$ $\exists N > 0$ for $n \ge N$ $$ \left| \int_0^1 f_n(x)\, dx - \int_0^1\lim_{n \to \infty} f_n(x)\, dx \right| < \epsilon \Rightarrow \\ \lim_{n \to \infty} \int_0^1 f_n(x)\, dx = \int_0^1\lim_{n \to \infty} f_n(x)\, dx $$ which contradicts with the conclusion get before.
I cannot get why two leads to different conclusions, please help.
Let $f_n(x)=nxe^{-nx^2}$ and $f(x)=\lim_{n\to \infty }f_n(x)=0$.
So, it is true that for each $x\in [0,1]$, given any $\varepsilon>0$, there exists a number $N(x,\varepsilon)>0$ that can depend on both $x$ and $\varepsilon$, such that whenever $n>N(x,\varepsilon)$, $|f_n(x)-f(x)|<\varepsilon$. We call this pointwise convergence of $f_n(x)$.
But note that we cannot say that for each $\varepsilon>0$, there exists a number $N(\varepsilon)$ such that whenever $n>N(\varepsilon)$ and $x\in [0,1]$, $|f_n(x)-f(x)|<\varepsilon$. We call this type of convergence uniform convergence.
That $f_n(x)$ fails to converge uniformly can be seen by observing that
$$\sup_{x\in[0,1]}|f_n(x)|=\sup_{x\in[0,1]}|nxe^{-nx^2}|=\sqrt{\frac n2}e^{-1/2}$$
and $\lim_{n\to\infty}\sup_{x\in[0,1]}|f_n(x)|= \infty$.
Hence given any $\varepsilon>0$, we cannot find a number $N(\varepsilon)$ that is independent of $x$ such that $|f_n(x)-f(x)|<\varepsilon$. And we cannot write, therefore, that for all $\varepsilon>0$ there exists a number $N(\varepsilon)$ such that whenever $n>N$, $\int_0^1 |f_n(x)-f(x)|\,dx<\varepsilon$.