Beyond Dirichlet's approximation theorem I haven't taken any number theory courses but out of curiosity I learned about Dirichlet's approximation theorem. Afterwards, it occurred to me to define the following function $f$ using 'optimal' diophantine approximants:
$\forall \alpha \in \mathbb{R}_+ \setminus \mathbb{Q}$, let $\{\alpha_q\}_{q=1}^\infty \subset \mathbb{Q}$ denote the
optimal diophantine approximants of $\alpha$:
\begin{equation}
\forall q \in \mathbb{N}, |\alpha_q -\alpha| = \min_{n \in \mathbb{N}}|\frac{n}{q}-\alpha|
\end{equation}
Using the language of functions rather than sequences we may define:
\begin{equation}
\begin{cases}
f: \mathbb{R}_+ \setminus \mathbb{Q} \rightarrow \mathbb{R}_+ \\
f(\alpha) = \sum_{q=1}^{\infty} |\alpha_q-\alpha|
\end{cases}
\end{equation}
My question is whether $\forall x \in \mathbb{R}_+ \setminus \mathbb{Q},f(x)< \infty $
If so, is there an elementary proof?
 A: Since $\alpha$ is irrational, the equidistribution theorem says that the fractional parts $\{q\alpha\}$ are uniformly distributed in $[0,1)$. In particular, a positive proportion of $q$ satisfy $\{q\alpha\} \in [\frac13,\frac12]$. For these $n$, we have $|\alpha_q-\alpha| = \frac{\{q\alpha\}}q \ge \frac1{3q}$, and so $f(\alpha)$ is at least as large as the sum of $\frac1{3q}$ over a positive proportion of $q$, which diverges. (Note that the sum also diverges when $\alpha$ is rational.)
A: A finite version of your sum can be written in the form $\sum_{q=1}^Q \frac{1}{q} h(q x)$, where $h(x)$ is the function $\min(x,1-x)$, extended with period 1. The average of this function is $1/4$, so you should expect the sum of the first $Q$ summands to be of size roughly $(\log Q)/4$. Thus your question is more interesting if your subtract the mean 1/4 from your function h, and probably normalize the sum by an appropriate factor (depending on $Q$). The solution will have something to do with the so-called discrepancy of the sequence $(q \alpha)_{q \geq 1}$, and the so-called Koksma inequality should be a helpful tool. For the whole theory around this (called uniform distribution theory and discrepancy theory), check the book of Kuipers-Niederreiter.
