- 3,353
- 1,898
I was going to append this to @chwala's thread here, but thought it deserved a new thread.
For ##n \geq 1##, define $$f_n : [0,1] \to \mathbb{R} : x \mapsto \begin{cases} 1 & x = 0, \\ n(1 - nx) & x \in (0, \tfrac 1n], \\ 0 & x \in (\tfrac 1n, 1]. \end{cases}$$ (Note that ##f_n## is discontinuous at 0 for ##n \geq 2##.)
This sequence has the pointwise limit $$ f: [0,1] \to \mathbb{R} : x \mapsto \begin{cases} 1 & x = 0, \\ 0 & x \in (0,1] \end{cases}$$ since if ##x > 0## then there exists ##N \in \mathbb{N}## such that ##x > \frac 1N## and thus ##f_n(x) = 0## for all ##n > N##.
The convergence is non-uniform since ##\sup |f_n - f| = n##.
This example is constructed so that$$\lim_{n \to \infty} \int_0^1 f_n(x)\,dx = \frac12 \neq 0 = \int_0^1 \lim_{n \to \infty} f_n(x)\,dx.$$
For ##n \geq 1##, define $$f_n : [0,1] \to \mathbb{R} : x \mapsto \begin{cases} 1 & x = 0, \\ n(1 - nx) & x \in (0, \tfrac 1n], \\ 0 & x \in (\tfrac 1n, 1]. \end{cases}$$ (Note that ##f_n## is discontinuous at 0 for ##n \geq 2##.)
This sequence has the pointwise limit $$ f: [0,1] \to \mathbb{R} : x \mapsto \begin{cases} 1 & x = 0, \\ 0 & x \in (0,1] \end{cases}$$ since if ##x > 0## then there exists ##N \in \mathbb{N}## such that ##x > \frac 1N## and thus ##f_n(x) = 0## for all ##n > N##.
The convergence is non-uniform since ##\sup |f_n - f| = n##.
This example is constructed so that$$\lim_{n \to \infty} \int_0^1 f_n(x)\,dx = \frac12 \neq 0 = \int_0^1 \lim_{n \to \infty} f_n(x)\,dx.$$