Example 4

% Consider the functions $g_n(x)$, with $n\in\mathbb{N}$, $n \ge 1$ and $x\in\mathbb{R}$, defined as follows: $$ g_n(x) = \left\{ \begin{array}{lll} 2.n^2.x & \mbox{if} & 0 \le x < 1/(2n) \\ 2n - 2.n^2.x & \mbox{if} & 1/(2n) \le x < 1/n \\ 0 & & \mbox{everywhere else.} \end{array} \right. $$ Standard argument:
These functions are triangular, and they all disappear outside of $[0,1]$, so I can compute $\int_0^1 g_n(x) \, dx = 1$ for every $n$. For every $x$, $\lim_{n \rightarrow \infty} g_n(x) = 0$. So again, the limit and the integration can't be interchanged.
Here is a picture of the functions:

We see that the function $g_n(x)$ becomes a sharp peak at $x=0$ for $n \rightarrow \infty$ and that, geometrically, it certainly does not disappear or becomes zero. The devil is again in the false doctrine that it would be possible to "fix" $x$ and let $n$ go to infinity. Again, we say that such a "fixed" real x is an undefined concept. A real is just a real and there's nothing "fixed" or "variable" with it. Such is even more obvious with the present function $g_n(x)$, where $x$ and $n$ are clearly intermixed, by definition. So we can have: $0 \le x < 1/(2n) , 1/(2n) \le x < 1/n , 1/n \le x$ and nothing prevents us from going to limits while this is the case. If we just do this, then what we get is what physicists know as a delta function. Informally: $$ \delta(x) = \left\{ \begin{array}{lll} 0 & \mbox{for} & x \ne 0 \\ \infty & \mbox{for} & x = 0 \end{array} \right. $$ Such that: $$ \int_{-\infty}^{+\infty} \delta(x) \, dx = 1 $$ Whatever definition might be the "rigorous" one, a delta function, roughly speaking, is just a very large peak near $x = 0$ with area normed to $1$. See:

The latter reference is relevant too. Because it is typical that the following function, triangular as well, is supposed to converge to the delta function - instead of zero - for $n \rightarrow \infty$ and nobody has any doubt about it. $$ D_n(x) = \left\{ \begin{array}{lll} n^2.x + n & \mbox{if} & -1/n \le x \le 0 \\ n - n^2.x & \mbox{if} & 0 \le x \le +1/n \\ 0 & & \mbox{everywhere else.} \end{array} \right. $$ The only thing that distinguishes $g_n(x)$ from $D_n(x)$ is that the maximum of the former is shifted an infinitesimal distance $\lim_{n \rightarrow \infty} 1/(2n)$ with respect to the maximum of the latter at $x=0$. So it's easy to see that these functions become one and the same for $n \rightarrow \infty$: $$ \lim_{n \rightarrow \infty} g_n(x) = \lim_{n \rightarrow \infty} D_n(x) = \delta(x) $$ Note that, in this case, it's not even the wrong question. It's just that professors expect a wrong answer from their students. The standard answer is wrong, namely, and this one is right: $$ \lim_{n \rightarrow \infty} \left[\, \int_0^1 g_n(x) \, dx \,\right] = 1 = \int_0^1 \left[\, \lim_{n \rightarrow \infty} g_n(x) \,\right] dx $$ So again, the limit and the integration can be interchanged, as always it seems.