Example For each natural number $n$, define $f_n$ on $[0,1]$ to have value $0$ if $x \geq 2/n$, have $f(1/n) = n$, $f(0) = 0$ and be linear on the intervals $[0,1/n]$ and $[1/n,2/n]$. Observe that $\int_0^1 f_n = 1$ for each $n$. Define $f \equiv 0$ on $[0,1]$. Then $$ \text{$\{f_n\} \to f$ pointwise on $[0,1]$, but $\lim_{n \to \infty} \int_0^1 f_n \neq \int_0^1 f$}. $$ Thus, pointwise convergence alone is not suffcient to justifty passage of the limit under the integral sign.
(Original image here.)
I am not sure that I understand this example correct. First, shouldn't $f(1/n)=n$ and $f(0) = 0$ be $f_n(1/n) = n $ and $f_n(0)$?
Also, when $n \to \infty$, $f_n \to \infty$ on $[1/n, 2/n]$, but the interval also goes to $0$. How can we deal with this situation? Should we say $f_n \to 0$ on $[1/n, 2/n]$ since the interval goes to $0$?
Any help is appreciated.
You are right. It should read $f_n(\frac 1 n)=n$ and $f_n(0)=0$. The precise deinition is $f_n(x)=n^{2}x$ for $0\leq x \leq \frac 1 n $, $f_n(x)=n^{2}(\frac 2 n - x)$ for $\frac 1 n \leq x \leq \frac 2 n $ and $0$ for $x \geq \frac 2 n$. To see that $f_n(x) \to 0$ for every $x$ note that if $x>0$ then $\frac 2 n <x$ for all $n$ sufficiently large, so $f_n(x)=0$ for such $n$. To show that $\int f_n$ does not converge to $\int 0 \, dx=0$ you can draw a picture of the graph; the integral of $f_n$ is the area of a triangle with base $\frac 2 n$ and height $n$ which is $1$.