The limit of $\frac{1}{X} \int_{1}^{X} f(x)dx$ as $X\to\infty$ I am trying to prove that if $f:[1,\infty) \to \mathbb{R}$ is a continuous function with $f(x) \to 0$ as $x \to \infty$, then $$\lim_{X \to \infty} \frac{1}{X}\int_1^Xf(x)dx = 0.$$
I am stuck. Here is what I have thought of so far:

*

*$f$ is continuous, and hence bounded on $[1,X]$.

*$f(x) \to 0$ as $x\to\infty$, so for any $\varepsilon > 0$ there is some $K(\varepsilon) \in \mathbb{R}$ such that $x>K(\varepsilon) \implies |f(x)|<\varepsilon$.

*Since $f$ is continuous on $[1,X]$, there is some $c_X \in [1,X]$ such that $\int_1^Xf(x)dx = (X-1)f(c_X)$. If somehow I can show that $f(c_X)\to 0$ as $X\to\infty$, then that is sufficient to prove the statement.

 A: Our first task is to break the integral into two parts, say $I_1$ and $I_2$, before we take the average.
$$
\begin{split}
I_\text{av} & = {1 \over X}\int\limits_1^{X}f(x)dx \\ 
&= {1 \over X} \left[\ \int\limits_1^{a}f(x)dx + \int\limits_a^{X}f(x)dx\right]\\
& = {1\over X }( I_1 + I_2)
\end{split}
$$
Pick $a$ so large that $|f(x)|< \varepsilon $ on $[ a, X]$. Since $f$ is continuous on $[1, a]$, there exists $M$ such that $|f(x)|< M$ for all $x$ in $[1, a]$. Therefore
$$
|I_1| < M(a-1)\text{ and }|I_2| < \varepsilon (X-a).
$$
It follows, by the triangle inequality, that there exists an $X_o$ such that
$$
|I_\text{av}| \leq \frac{|I_1| + |I_2|}{X} < \frac{M(a-1) + ε (X-a) } {X} < 2ε$$ whenever  $X > X_o.$ Therefore,
$$\lim_{X \to \infty} \frac{1}{X}\int_1^Xf(x)dx = 0.$$
A: Let $\varepsilon > 0$. Then since $f(x) \to 0$ as $x \to \infty$, there exists $K_\varepsilon > 1$ such that $x>K_\varepsilon \implies |f(x)| < \varepsilon$.
Let $C_\varepsilon := \sup\limits_{x\in[1,K_\varepsilon]}|f(x)|$. The supremum exists since $f$ is continuous, and hence bounded, on $[1,K_\varepsilon]$.
Let $M_\varepsilon := \max\left\{K_\varepsilon,\frac{(K_\varepsilon-1)C_\varepsilon}{\varepsilon}\right\}$. If $X > M_\varepsilon$, then
\begin{align}
\left|\frac{1}{X}\int_1^Xf(x)dx\right| &\leq \frac{1}{X}\int_1^X|f(x)|dx  \\
&= \frac{1}{X}\int_{1}^{K_\varepsilon}|f(x)|dx + \frac{1}{X}\int_{K_\varepsilon}^{X}|f(x)|dx \\  &\leq \frac{1}{X}(K_\varepsilon-1)C_\varepsilon + \frac{1}{X}(X-K_\varepsilon)\varepsilon \\
&< 2\varepsilon
\end{align}
So, we have shown that given any $\varepsilon > 0$, there exists $M_\varepsilon > 1$ such that $X > M_\varepsilon \implies \left|\frac{1}{X}\int_1^Xf(x)dx\right|<2\varepsilon$, which means that $$\lim_{X\to\infty}\frac{1}{X}\int_1^Xf(x)dx = 0$$ as required.

Alternative answer, using L'Hôpital's Rule:
Define $F:[1,\infty) \to \mathbb{R}$ by $F(X) := \int_1^Xf(x)dx$.
By the first fundamental theorem of calculus, since $f$ is continutous, $F$ is differentiable, and $F'(X) = f(X)$.
Let $G:[1,\infty) \to \mathbb{R}$ be defined by $G(X) := X$. Then $G'(X) = 1 \neq 0$ for all $X \in (1,\infty)$.
Also, $\lim\limits_{X\to\infty} G(X) = \infty$, so the conditions for L'Hôpital's Rule are satisfied. Therefore,
\begin{align}
\lim_{X\to\infty}\frac{1}{X}\int_1^Xf(x)dx &= \lim_{X\to\infty} \frac{F(X)}{G(X)} \\
&= \lim_{X\to\infty} \frac{F'(X)}{G'(X)} \\
&= \lim_{X\to\infty} f(X) \\
&= 0
\end{align}
as required.
