# Proving $\lim_n \sup_x |f_n(x) - g_n(x) | = 0$ implies $\lim_n \int_{\mathbb{R}} |f_n(x) - g_n(x)| = 0$

I'm trying to show the following.

For the sequence of functions $$f_n, g_n$$, all $$\mathbb{R} \to \mathbb{R}$$, $$\lim_n \sup_x |f_n(x) - g_n(x) | = 0$$ then $$\lim_n \int_{\mathbb{R}} |f_n(x) - g_n(x)| = 0$$

My attempt

\begin{aligned} \lim_n \int_{\mathbb{R}} |f_n(x) - g_n(x)| &= \lim_n \left[ \lim_{a \to -\infty} \int_a^0 |f_n(x) - g_n(x)| + \lim_{b \to \infty}\int_0^b |f_n(x) - g_n(x)| \right] \\ &\le \lim_n \left[ \lim_{a \to -\infty} \sum_{i=1}^n M_i (x_i - x_{i-1}) + \lim_{b \to \infty} \sum_{i=1}^n M'_i (y_i - y_{i-1}) \right] \end{aligned}

for some partition $$\{x_0, x_1, \cdots, x_n\}$$ of $$[a,0]$$, and $$\{y_0, y_1, \cdots, y_n\}$$ of $$[0,b]$$, and $$M_i, M_i'$$ denotes supremum of each interval.

But I'm having trouble switching the position of $$\lim$$. Any help?

This false.Take $$f_n(x)=\frac 1 n$$ for $$0, $$0$$ for other values of $$x$$ and $$g_n(x)=0$$ for all $$x$$.