How to prove the interchangeability of limit and integration when the limit of integration is a sequence? Let $\{f_n\}$ be a sequence of continuous real-valued functions defined on $[a,b]$ and let $a_n$ and $b_n$ be two sequences of $[a,b]$ such that $\lim_{n\to \infty} a_n=a$ and $\lim_{n\to \infty} b_n=b$. If $\{f_n\}$ converges uniformly to $f$ on $[a,b]$, then prove that 
$$\lim_{n\to \infty} \int_{a_n}^{b_n} f_n(x)dx=\int_{a}^{b}f(x)dx$$ 
 A: HINT: $f$ is continuous (uniform convergence of continuous functions leads to continuous functions), so if $a_n$ is very close to $a$, and $b_n$ is very close to $b$, then the integrals
$$\int_a^{a_n} f(x) dx \ \ , \ \  \int_{b_n}^b f(x) dx$$ are very close to $0$.
Now, split $$\int_a^b f = \int_a^{a_n}f + \int_{a_n}^{b_n} f + \int_{b_n}^b f$$
so that
$$\left| \int_a^b f - \int_{a_n}^{b_n} f_n \right| \le \left| \int_a^{a_n}f \right| + \left| \int_{a_n}^{b_n} (f - f_n ) \right| +\left| \int_{b_n}^b f\right| $$
gets arbitrarily small for large values of $n$.
A: $f$ is continuous on $[a,b]$ and so $\vert f(x)\vert\leq M<\infty$ there.
You can use the dominated convergence theorem on $g_n=f_n\chi _{[a_n,b_n]}$ since if $n$ is large enough $g_n\leq M+1$.
From scratch, the proof goes this way:
If $\epsilon >0$, choose $N\in \mathbb N$ such that $n>N\Rightarrow \vert f_n-f\vert <\epsilon;\ $such that $\vert a_n-a\vert <\epsilon;\ $ such that $\vert b_n-b\vert <\epsilon$ and such that $\vert f_n\vert <M+1$. Then 
$\left | \int_{a_n}^{b_n}f_ndx-\int_{a}^{b}fdx \right |=\left | \int_{a}^{b}fdx-\int_{a}^{b}f_ndx-\int_{a}^{a_n}f_ndx-\int_{b_n}^{b}f_ndx \right |\leq \left | \int_{a}^{b}(f_n-f)dx \right |+\left | \int_{a}^{a_n}f_ndx \right |+\left | \int_{b_n}^{b}f_ndx \right |.$
Now, we have
$\left | \int_{a}^{b}(f_n-f)dx  \right |\leq \epsilon (b-a)$.
$\left | \int_{a}^{a_n}f_ndx \right |\leq (M+1)\epsilon$
$\left | \int_{b_n}^{b}f_ndx \right |\leq (M+1)\epsilon$
which gives us what we want.
