An inequality while proving a limit, $c- \epsilon <\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt < c +\epsilon$ In this answer: https://math.stackexchange.com/a/1521287/463358, the final part of the proof shows that: 
If $a$ is such that $x>a $ implies $|f(x)−c|<ε$, and $\xi_a \in (a, x)$, and we have that: $\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt = f (\xi_a)$, that since $\xi_a > a$, this implies $c - \varepsilon < f(\xi_a) < c + \varepsilon$ and so 'the limit must equal c'.
I am trying to understand how we can show that $\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt = c$, but can't seem to follow the logic of the answer. I have that: 
\begin{aligned}
c - \varepsilon < f(\xi_a) < c + \varepsilon \implies c - \varepsilon < \lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt < c + \varepsilon \implies  \\
 \left|\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt - c\right| < \varepsilon  \implies \lim_{x \to \infty}\left(\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt - c\right) = 0 \implies \\
\lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt = c \\
\end{aligned}
where the last implication is since the outer $\lim_{x \to \infty}$ is being applied to constants with respect to $x$.
Is this what was implied by the answer? I have doubts since it doesn't seem very 'elegant'. I think I am using all the provided information and tried to go directly from $c - \varepsilon < \lim_{x \to \infty} \frac{1}{x} \int_0^x f(t) \, dt < c + \varepsilon $ to an equality but couldn't figure out how to. Thanks!
 A: 
In the answer you posted,the author uses the Mean Value theorem of Riemman integration in the second line that's why he finds $f(\xi_a)$
Then he proved that the limit is $f(\xi_a)$ and uses the hypothesis and proves that $|f(\xi_a)-c|<\epsilon ,\forall \epsilon>0$
But $|f(\xi_a)-c|$ is a constant smaller than an positive $\epsilon$, so it must be zero. So we have $f(\xi_a)=c$

Maybe this answer serves you better:
$g(x):=|\frac{\int_0^xf(t)dt}{x}-a| \leq \frac{\int_0^x|f(x)-a|dx}{x}$
Let $\epsilon>0$
Exists $M_1>0$ such that $|f(x)-a| < \frac{\epsilon}{4}, \forall x \in (M_1,+\infty)$
Note that for $x>M_1$
$$ \frac{\int_0^x|f(x)-a|dx}{x}=\frac{\int_0^{M_1} |f(x)-a|dx}{x}+\frac{\int_{M_1}^x |f(x)-a|dx}{x}$$ $$\leq \frac{\int_0^{M_1} |f(x)-a|dx}{x}+ \frac{\epsilon}{4} (\frac{x-M_1}{x})$$
The function $|f(x)-a|$ is continuous on $[0,M_1]$ thus bounded
so $\frac{\int_0^{M_1} |f(x)-a|dx}{x} \leq \frac{M_1(C+|a|)}{x}$
Exists $M_2>0$ such that $\frac{x-M_1}{x}<2 ,\forall x \in (M_2,+\infty)$
Also $\exists M_3>0$ such that $\frac{M_1(C+|a|)}{x}<\frac{\epsilon}{2} ,\forall x \in (M_3,+\infty)$
Take $M=\max\{M_1,M_2,M_3\}$ and $\forall x>M$ we have that $g(x)<\epsilon$
So you have the inequality and the conclusion you want.
