TITLE: What's the justification for defining the (definite) integral using a countably infinite sum?
QUESTION [6 upvotes]: To compute the area under a continuous function $f$ from $\Bbb{R\to R}$ in the interval $[a,b]$, Riemannian integration is often employed that could defined as
$$\lim_{N \to \infty} \sum_{i=0}^{N-1} \frac{(b-a)}{N} f\left(a+i\frac{b-a}{N}\right)$$
The intuition given behind this is to divide the interval into smaller and smaller pieces and 'sample' the function in each interval to compute the areas.
However, no matter how large N gets, we will still be making only a finite sum. In the limit as $N\to\infty$ then, we will be sampling a countable infinity of points from the function.
But the function's domain is $\Bbb R$, which is uncountably infinite. So, intuitively, how do we expect to sample it faithfully with only a countable infinity of samples? Since there is no bijection from $\Bbb N$ to $\Bbb R$, it seems that we will always 'miss' some points of f, which could contribute to the area.

REPLY [8 votes]: A function continuous on the interval $[a,b]$ is completely determined by its values on a dense subset of the interval. There are plenty of dense sets that are countable. 
So for continuous functions, a countably infinite sample must be enough. If the sample provides enough information to determine the function, it must provide enough information to determine the integral.  
And it turns out that a function is Riemann integrable on $[a,b]$ precisely if it is continuous almost everywhere, in the sense of Lebesgue measure.