Let $g:(0,\infty)\to\mathbb{R}$ and $f_n:(0,\infty)\to\mathbb{R}, n\ge 1$ be integrable functions over $[a,b]$ for any $0<a<b<\infty$. Also suppose that
(1) $|f_n(x)| < g(x)$ for all $x>0$ and $n\ge 1$;
(2) $f_n\to f$ uniformly over each compact interval contained in $(0,\infty)$;
(3) $\int_0^{\infty}g(x)dx < \infty$.
Show that $$ \lim_{n\to\infty}\int_0^{\infty}f_n(x)dx = \int_0^{\infty}f(x)dx. $$
From (1) and (3) we get that each $\int_0^{\infty}f_n(x)dx$ and $\int_0^{\infty}f(x)dx$ converges. And from (2) it follows that $$ \int_0^r f(x)dx = \lim_{n\to\infty}\int_0^rf_n(x)dx, $$ for all $r>0$. Taking $r\to\infty$, $$ \lim_{r\to\infty}\int_0^r f(x)dx = \lim_{r\to\infty}\lim_{n\to\infty}\int_0^rf_n(x)dx, $$ so the question is whether we can interchange the limits on the RHS of the last equation, but I don't know what to use here. Any hint is appreciated.
The big hint that allows you to interchange the limits, is that $$\int_0^\infty g<\infty,$$ and $|f_n(x)|<g(x)$ for all $x>0$ and $n\in\mathbb{N}$. This allows us to conclude that for all $r>0$ sufficiently large $$\left|\int_r^\infty f_n(x)\right|\leq\int_r^\infty|f_n(x)|\leq\int_r^\infty g.$$ So if $\epsilon>0$ we can choose $r$ so large that for all $n$ we have $$\left|\int_r^\infty f\right|,\left|\int_r^\infty f_n\right|<\epsilon.$$ Then $$\left|\int_0^\infty f-\int_0^\infty f_n\right|\leq \left|\int_0^rf-\int_0^rf_n\right|+2\epsilon.$$ So we can choose $n$ sufficiently large to get $$\left|\int_0^\infty f-\int_0^\infty f_n\right|\leq 3\epsilon.$$ Thus $$\lim_{r\to\infty}\int_0^rf=\lim_{r\to\infty}\lim_{n\to\infty}\int_0^rf_n.$$