TITLE: Can we estimate the error $\left| \frac{1}{N^2} \sum f ( \{ \sqrt{2} m + \sqrt{3} n \} ) - \int_0^1 f(x) \, dx \right|$?
QUESTION [7 upvotes]: As a computer experiment I did a few Riemannian sums to see if I could quantify the density statement $\overline{\mathbb{Q}(\sqrt{2}, \sqrt{3})} = \mathbb{R}$ : 
$$ \Big| \frac{1}{N^2} \sum_{0 \leq m,n \leq N} \{ \sqrt{2} m + \sqrt{3} n \}^5 - \frac{1}{6} \Big| \stackrel{?}{<} \frac{1}{N^2} $$
A log-plot shows the correct exponent is a bit less than $2$.  Is it a Hausdorff dimension of some kind? 

The general quantitative statement looks like some error term to an average:
$$ \Big| \frac{1}{N^2} \sum_{0 \leq m,n \leq N} f \big( \{ \sqrt{2} m + \sqrt{3} n \}  \big) - \int_0^1 f(x) \, dx \Big| \stackrel{?}{\ll} \frac{1}{N^2} $$
This is certainly false... what might the a good exponent be?  The statement could be more general - I have some kind of totally real number field - but then we get a worse exponent.

REPLY [5 votes]: From Koksma-Hlawka inequality (see here), the following holds for functions with bounded variation in Hardy-Krause sense. 
If $f:[0,1]\rightarrow\mathbb{R}$ and $g:[0,1]\times [0,1]\rightarrow\mathbb{R}$ defined by $g(x,y)=f(\{x+y\})$ is bounded variation in Hardy-Krause sense, then $$
\left|\frac1{N^2} \sum_{0\leq m,n \leq N} f(\{\sqrt 2 m + \sqrt 3 n\})-\int_0^1 f(x)dx\right|\leq C V(g) D_{N^2}
$$
where $C>0$ is absolute, $V(g)$ is the Hardy-Krause variation of $g$, and $D_{N^2}$ is the discrepancy of the double sequence $\{(\{\sqrt 2 m\},\{\sqrt 3 n\} ) \  |  \ 0\leq m,n\leq N\}$. 
As @GH from MO suggested, Erdos-Turan-Koksma inequality gives an upper bound of $D_{N^2}$. The crucial estimate here is the bound of $||x||$ the distance between $x$ and its nearest integer, for certain numbers $x$. 
Let $1\leq H\leq N^2$, we have
$$\begin{align}
D_{N^2}&\ll \frac1H + \sum_{h_1<H, \ h_2<H} \frac1{h_1h_2} \frac1{N^2}\left|\sum_{m\leq N, \ n\leq N} e^{2\pi i (h_1 m\sqrt 2 +h_2 n \sqrt 3)}\right|\\
&\ll \frac1H+ \frac1{N^2}\sum_{h_1<H} \frac1{h_1 \| h_1 \sqrt 2 \|} \sum_{h_2<H} \frac1{h_2 \|h_2\sqrt 3\|}
\end{align}
$$
If $\alpha$ is an irrational number with bounded partial quotients in its continued fraction, then 
$$
\sum_{h<H} \frac1{h\| h\alpha\|} \ll \log^2 H.
$$
Since $\sqrt 2$ and $\sqrt 3$ both have bounded partial quotients in their continued fractions, we have
$$
D_{N^2} \ll \frac1H+ \frac1{N^2} \log^4 H. 
$$
Taking $H=N^2$, we obtain 
$$
D_{N^2} \ll \frac{\log^4 N}{N^2}. 
$$