# Riemann sums over dense countable sets

Let $$f$$ and $$g$$ be positive, smooth and integrable functions in $$\mathbb{R}$$, whose derivatives are also integrable. Assume as well that the expression $$\frac{\sum_{q\in \mathbb{Q}} f(q)}{\sum_{q\in \mathbb{Q}} g(q)} := \lim_{n \to \infty} \frac{\sum_{i =1}^n f(q_i)}{\sum_{i=1}^n g(q_i)}$$ is well defined, where $$\{q_i\}_i^\infty = \mathbb{Q}$$. I would like to evaluate $$\left| \frac{\sum_{q\in \mathbb{Q}} f(q)}{\sum_{q\in \mathbb{Q}} g(q)} - \frac{\int f(x) dx}{\int g(x) dx} \right|.$$

When the sum is over a discrete set, I can use the hypothesis to bound the error of Riemman sums by the diameter of the partition generated by the set. What about in such case where the "diameter" is zero?

• Related ... en.wikipedia.org/wiki/Equidistributed_sequence ... take functions on $[0,1]$ and $g(x) = 1$. Some enumerations of the rationals are equidistributed, others are not. – GEdgar Dec 6 '18 at 12:27
• That is perfect; I think this will be really useful. Do you know if there is an error bound for those approximations of the integral? – Kernel Dec 6 '18 at 15:02

If $$f$$ is not identically zero, there is some $$a\in\Bbb R$$ such that $$f(a)>0$$. Since $$f$$ is continuous, there exists $$\delta>0$$ such that $$|x-a|<\delta\implies f(x)>\frac{f(a)}{2}>0.$$ Since there are infinitely many rationals $$q$$ such that $$|q-a|<\delta$$, we see that $$\sum_{q\in\Bbb Q}f(q)=\infty$$.
• The sums are either $\infty$ or $0$; the possible quotients are $\infty/\infty$, $0/0$, $\infty/0$ and $07\infty$. I do not see any possible cancelation. – Julián Aguirre Dec 6 '18 at 9:34
• This is a different question. And in any case, the solution will depend on the enumeration of $\Bbb Q$. – Julián Aguirre Dec 6 '18 at 9:57