I am given the following task:
Suppose $f: \Bbb R \rightarrow \Bbb R$ is continuous. Let $a_n \lt c \lt b_n$ and $a_n,b_n \rightarrow c$ as $n \rightarrow \infty$. Show that $$\frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(x)dx \rightarrow f(c) \text{ as $n \rightarrow \infty$}$$
What I did:
I have used something similar to the proof of the Fundamental theorem of calculus in my textbook.
Since $f$ is continous at every $c \in \Bbb R$, for every $\epsilon \gt 0$ $\exists \delta \gt 0$ such that $f(c)-\epsilon \leq f(t) \leq f(c)+\epsilon$ for $|t-c| \lt \delta$. Then by the MVT for definite integrals:
$$(b_n-a_n)(f(c)-\epsilon)\leq \int^{b_n}_{a_n}f(t)dt \leq (b_n-a_n)(f(c)+\epsilon)$$
Consequently,
$$f(c)-\epsilon \leq \frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(t)dt \leq f(c) + \epsilon$$
$\Leftrightarrow$
$$-\epsilon \leq \frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(t)dt-f(c) \leq \epsilon\text{ $\forall |b_n-a_n| \lt \delta$}$$
This is precisely the meaning of $$\frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(x)dx \rightarrow f(c) \text{ as $n\rightarrow \infty$}$$
Is my proof correct?
Written a bit more compactly:
$$\lim_{n\to\infty}\left\lvert \frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(x)\,\mathrm dx-f(c)\right\rvert= \lim_{n\to\infty} \left\lvert\frac{1}{b_n-a_n}\int^{b_n}_{a_n}f(x)-f(c)\,\mathrm dx\right\rvert\le \lim_{n\to\infty} \frac{1}{b_n-a_n}\int^{b_n}_{a_n}|f(x)-f(c)|\,\mathrm dx\le \lim_{n\to\infty}\max_{x\in[a_n,b_n]} |f(x)-f(c)|=0,$$ where the last equality follows from continuity of $f$ and $a_n,b_n\to c$.