The sequence of indefinite integrals of a uniformly convergent sequence, converges uniformly

Question. Let $(g_n)$ be a sequence of Riemann-integrable functions, $$f_n(x)=\int_a^x {g_n(t)} \, \mathrm{d}t,$$ and $(g_n)$ uniformly convergent on $[a,b]$, then $(f_n)$ converges uniformly on $[a,b]$.

If I have continuity, then I can interchange the limit and integral. I tried to prove by definition but I am stuck at $\big|\int_a^x {g_m(t) - g_n(t)} \, \mathrm{d}t\,\big|$. I have that $\lvert g_m-g_n\rvert<\epsilon$ (Cauchy criterion), but I don't know how to use it.

• $|g_m-g_n|<\epsilon$ so that $$\bigg|\int_a^x ( g_m - g_n)(t)\ dt \bigg|< \epsilon |x-a|$$ Feb 3 '14 at 8:08

If $|g_m(x)-g_n(x)|<\frac{\varepsilon}{b-a}$, for all $x\in [a,b]$ and $n\ge n_0$, then
\begin{align} |f_m(x)-f_n(x)|&=\left|\int_a^x \big(g_m(t)-g_n(t)\big)\,dt\right|\le \int_a^x \big|g_m(t)-g_n(t)\big|\,dt \le \int_a^x \big|g_m(t)-g_n(t)\big|\,dt \\ &\le \int_0^x \frac{\varepsilon}{b-a}\,dx=\frac{\varepsilon}{b-a} (x-a) \le \varepsilon, \end{align} for all $x\in [a,b]$.
Thus $\{f_n\}$ is uniformly Cauchy, and hence uniformly convergent.