# How to find values of x where $a_i x$ are nearly integers? $a_i \in \Bbb R$

I have a set $\{a_i \in \Bbb R | \ i <=7 \}$, and I'm looking for a way to find values of $x$ where given $\epsilon > 0$, $$\forall i \ \exists n_i \in \Bbb{Z} \ \ |a_i x - n_i| < \epsilon$$

Does anyone know a constructive algorithm to find values of $x$ where this would hold?

Edit: $x \neq 0$ and $\forall i \ n_i \neq 0$.

Edit 2: I realized that I haven't really showed my work. I'm not that familiar with this side of mathematics so my attempts are probably naive, but here it is. My attempt to approximate $$f(x) = \sum_{i=0}^7 | g(a_i x) - a_i x|$$ (where $g(y)$ rounds $y$ to the nearest integer) with a polynomial seemed dumb as $f$ has at least a million turning points in its domain.

I looked at the simultaneous version of Dirichlet's approximation theorem to get me at least to rational numbers, but I couldn't find a constructive proof that seems to work for 7 numbers.

From what I've looked at the LLL algorithm, it looks like it does something very close to what I want, but I don't understand how to apply it in this specific case, where I don't have a reasonable polynomial approximation, and I'm not looking for an integer relation.

• Do you mean to find all the intervals of $x$ where this holds? For instance, $x=0$ will always work, as will any value of $x$ sufficiently close to $0$ (depending on $|a_i|$). – Erick Wong Feb 18 '16 at 22:27
• Either intervals or values would be fine. I realize I forgot to exclude $x=0$ and $n_i \neq 0$. ideally, I'd be able to construct a solution where $x \in (0,1)$. For the purpose of the question, though, I'd be happy with finding any non-0 value or non-trivial interval for x. – user315740 Feb 18 '16 at 22:44
• Have you looked at the "continued fraction expansions" of the $a_i$ en.wikipedia.org/wiki/Continued_fraction (in particular corollary 1 of Theorem 5). – Jean Marie Feb 18 '16 at 23:28
• @JeanMarie I'm not sure that continued fraction convergents are effective for simultaneous Diophantine approximation, which is what this question is about. – Erick Wong Feb 19 '16 at 7:47
• @JeanMarie I tried it out, and theoretically, you could use continued fractions to get a fractional estimate for each number, find the least common multiple of those denominators, and that would work theoretically, but you very quickly run out of significant digits to actually use it in actual calculation. – user315740 Feb 19 '16 at 18:25