Suppose $f_n \stackrel{\text{unif}}{\longrightarrow} f$ (uniform convergence) on $[0,1]$ where $f_n \in \mathcal C[0,1]$. Do we have $\int_{0}^{1-1/n} f_n \to \int_0^1 f$? Here, $\mathcal C[0,1]$ is the space of all continuous functions on $[0,1]$.
I write this post for two reasons: (i) to verify my solution and (ii) to see other ways to approach this problem.
Define $F(x) = \int_0^x g(x) dx$ and $F_n(x) = \int_0^1 g_n(x)dx$. Since $f_n \stackrel{\text{unif}}{\longrightarrow} f$, we have $F_n(x)\to F(x)$. What can we say about $F_n(1-\frac1n)$? I feel since $1 - \frac1n \to 1$ as $n\to\infty$, and $F_n(x)\to F(x)$, we must have $F_n(1-\frac1n) \to F(1) = \int_0^1 f(x)dx$. However, I'm not able to properly justify this. Since $f_n$ (integrand) and $1-1/n$ (the upper limit) both depend on $n$, I feel we may need some extra bit of reasoning.
Minor follow-up question:
Since $f$ and $f_n$'s are bounded (continuous functions on compact sets), is there a way to use Dominated Convergence Theorem here? I understand the posted answer though!
Thank you!
$$\left|\int_0^{1-1/n}{f_n}-\int_0^1{f}\right| =\left|\int_0^{1-1/n}{(f_n-f)} -\int_{1-1/n}^1{f}\right| \leq \int_0^{1-1/n}{|f_n-f|}+\int_{1-1/n}^1{|f|} \leq \|f_n-f\|_{\infty}+\frac{1}{n}\|f\|_{\infty},$$ which concludes (since $f$ is bounded, by eg $\|f_{n_0}\|_{\infty}+1$, where $n_0>0$ is such that $\|f_{n_0}-f\|_{\infty}\leq 1$).