The above image is Ex.12 in Rudin's "Principles of Mathematical Analysis", P167. I don't know how to prove it, can you help me? Thanks!
I found a proof here. For possible future reference, I copy it here along with several key words: improper integral, uniform convergence, compact, Rudin, P167, 12.
Note that the domain here is $\displaystyle (0,\infty)$, so $\displaystyle (0,u_0]$ is not a compact subspace, so we have to split the domain into two parts: (0,1] and $\displaystyle [1,+\infty)$. We first focus on the latter.
Since $\displaystyle \int_1^u|f_n|dx\leq\int_1^u gdx\leq\int_1^{+\infty}gdx$ which is a fixed number independent of $\displaystyle u$, $\displaystyle f_n$ is improper Riemann integrable on $\displaystyle [1,\infty)$ for all $\displaystyle n$. Since $\displaystyle \lim_{n \to \infty } {f_n}(x) = f(x)$ for all $\displaystyle x\in[1,\infty), \lim_{n \to \infty } |f_n(x)| = |f(x)|$, so $\displaystyle |f(x)|\leq g(x)$ for all $\displaystyle x$, so $\displaystyle \int_1^{+\infty}fdx$ exists too.
Now we want to prove $\displaystyle h_n(u)=\int_1^u f_n dx$ converges uniformly to $\displaystyle h(u)=\int_1^u fdx$ on $\displaystyle [1,+\infty)$. From the hypothesis We know that $\displaystyle f_n$ converges in the topology of compact convergence, which is unfortunately coarser than uniform topolgy, so we cannot deduce from general topology the desired conclusion and have to prove it from scratch: Given any $\displaystyle \epsilon>0$, since $\displaystyle \int_1^{+\infty}gdx<\infty$, there is a $\displaystyle u_0>1$ such that $\displaystyle \int_{u_0}^{+\infty}gdx<\epsilon/4$ by Cauchy criterion. Because $\displaystyle [1,u_0]$ is now compact, we can choose an $\displaystyle N$ such that $\displaystyle |f_n(x)-f(x)|<\frac{\epsilon}{2(u_0 - 1)}$ for all $\displaystyle x\in[1,u_0]$ and $\displaystyle n\geq N$. We show this $\displaystyle N$ will do the job. For any $\displaystyle u\in[1,+\infty)$ and $\displaystyle n\geq N$ we can write $\displaystyle |h_n(u)-h(u)|=|\int_1^u[f_n(x)-f(x)]dx|\leq|\int_1^{\min(u_0,u)}(f_n-f)dx|$$\displaystyle +\chi_{\{u_0<u\}}|\int_{u_0}^u(f_n-f)dx|$, where $\displaystyle \chi_{\{u_0<u\}}=\left\{\begin{array}{cc}1,&\mbox{ if }u_0<u\\0,&\mbox{if }u_0\ge u\end{array}\right.$. Since $\displaystyle \min(u_0,u)\leq u_0$, the first term $\displaystyle \leq \frac{\epsilon}{2(u_0 - 1)}(\min(u_0,u)-1)\leq\epsilon/2$. The second term exists only if $\displaystyle u_0<u$, in which case, in view of $\displaystyle 0\leq |f|,|f_n|\leq g$ for all $\displaystyle x\in[1,+\infty)$, $\displaystyle |\int_{u_0}^u(f_n-f)dx|\leq\int_{u_0}^u(|f_n|+|f|)dx\leq2\int_{u_0}^ ugdx\leq2\int_{u_0}^{+\infty}gdx<\epsilon/2$. Then we get $\displaystyle |\int_1^u(f_n-f)dx|<\epsilon$ for all $\displaystyle u\in[1,+\infty)$ whenever $\displaystyle n\geq N$ which is independent of $\displaystyle u$. Therefore for any $\displaystyle n\geq$this $\displaystyle N$, $\displaystyle |\int_1^{+\infty}f_n dx-\int_1^{+\infty}fdx|=|\lim_{u \to +\infty}\int_1^u(f_n-f)dx|=\lim_{u \to +\infty}|\int_1^u(f_n-f)dx|\leq\lim_{u \to +\infty}\epsilon$ $\displaystyle =\epsilon$, as desired.
Now we have proved $\displaystyle \lim_{n\to\infty}\int_1^{+\infty}f_n dx=\int_1^{+\infty}fdx$, applying the same argument above shows $\displaystyle \lim_{n\to\infty}\int_0^1f_ndx=\int_0^1fdx$. Summing up these two equalities and noting that all improper integrals involved are valid, we have $\displaystyle \lim_{n\to\infty}\int_0^{+\infty}f_n dx=\lim_{n\to\infty}\int_0^1 f_n dx+\lim_{n\to\infty}\int_1^{+\infty}f_n dx=\int_0^1 f dx+\int_1^{+\infty}f dx=\int_0^{+\infty}f dx$, i.e., $\displaystyle \lim_{n\to\infty}\lim_{\substack{u_1\to +\infty\\u_2\to 0^+}}\int_{u_2}^{u_1}f_n dx=\lim_{\substack{u_1\to +\infty\\u_2\to 0^+}}\lim_{n\to\infty}\int_{u_2}^{u_1}f_n dx$, which completes the whole proof.
The same idea applies if we want to prove convergence of an uncountable sequence of improper integrals, which is used at the end of the proof of Stirling's formula in page 195 of this book.
Thank Pere Callahan for this brilliant proof, also thank myself for the hard search.
First, if function $\displaystyle f$ and $\displaystyle g$ are defined on $\displaystyle [1,+\infty)$, $\displaystyle f(x)\leq g(x)$ for all $\displaystyle x\in [1,+\infty)$, and both $\displaystyle \lim_{x\to+\infty}f(x)$ and $\displaystyle \lim_{x\to+\infty}g(x)$ exists, then it can be proved that $\displaystyle \lim_{x\to+\infty}f(x)\leq\lim_{x\to+\infty}g(x)$, by Th 4.2 and Th 3.19, as well as Examples 3.18 of this book.
As for your question, we know that $\displaystyle \int_{1}^{+\infty} g(x)dx=\lim_{v\to+\infty}\int_1^v g(x)dx$. Since $\displaystyle v$ is approching infinity, we may assume it is sufficiently large so that $\displaystyle v>u$, so the right side of the above eqution $\displaystyle =\lim_{v\to+\infty}[\int_1^u g(x)dx+\int_u^v g(x)dx]$ (Th6.12(c)). $\displaystyle \int_1^u g(x)dx$ is a constant relative to $\displaystyle v$, so $\displaystyle \lim_{v\to+\infty}\int_1^u g(x)dx=\int_1^u g(x)dx$, as a result the second limit exists and the above limit=$\displaystyle \int_1^u g(x)dx+\lim_{v\to+\infty}\int_u^v g(x)dx$ (Th3.3(a)). By hypothesis, $\displaystyle g(x)\geq|f_n(x)|\geq 0$ for any $\displaystyle x\in[u,v]$, so $\displaystyle \int_u^v g(x)dx\geq 0$ according to Th 6.12(b). Then by the conclusion of the first paragraph, $\displaystyle \lim_{v\to+\infty}\int_u^v g(x)dx\geq\lim_{v\to+\infty}0=0$, which implies $\displaystyle \int_{1}^{+\infty} g(x)dx\geq\int_1^u g(x)dx$.