I can show that if $f$ is continuous for $x\ge0$ with $\lim\limits_{x \to \infty} f(x) = A$, then \begin{equation} \lim_{x \to \infty} \frac{1}{x} \int_0^x \! f(t) \, \mathrm{d}t = A \end{equation} using the definition of limits, etc. (a homework question). However, just for my understanding I'm trying to wrap my head around showing the same thing using a Riemann sum.
If I divide the interval of the integral in $n$ parts, each part will be $\frac{x}{n}$ wide. In each such subinterval, I pick the right endpoint: $c_i = \frac{x}{n} \cdot i$ for $i = 1,2,3,\dots,n$.
\begin{align} \lim_{x \to \infty} \frac{1}{x} \int_0^x \! f(t) \, \mathrm{d}t & = A \\ \lim_{x \to \infty} \frac{1}{x} \sum_{i=1}^n f(c_i) \frac{x}{n} &= A \\ \lim_{x \to \infty} \frac{1}{x} \sum_{i=1}^n \frac{f(c_i)}{n} x &= A \end{align}
The $x$ does not depend on $i$ so I can move that out of the summation.
\begin{align} \lim_{x \to \infty} \frac{1}{x} x \sum_{i=1}^n \frac{f(c_i)}{n} &= A \\ \lim_{x \to \infty} 1 \sum_{i=1}^n \frac{f(c_i)}{n} &= A \end{align}
I can see that each $i$ provides an $n$:th contribution to the sum and there's $n$ parts altogether. I can make calculations and see that the sum does converge using various functions for $f$ but I can't quite see why the sum of $f(c_i) = f(\frac{x}{n} \cdot i)$ behaves the way it does when $x\to\infty$ and $n\to\infty$.
I hope that was clear enough (first question here! :)