# Solving equations containing floor functions with rational terms

So, every question in here regarding these kinds of equations only involves natural numbers. Generally, I'm looking for a method to solve equations on the form: $$\lfloor ax+b\rfloor=c$$ for $$a,b\in\mathbb{Q},\,c\in\mathbb{Z}$$. If this proves too troublesome, a method for approximating a solution or an interval containing the solution would be adequate.

• if $\lfloor ax + b \rfloor = c$ then by definition $c \in \mathbb Z$. – fleablood Jun 14 at 14:52

Well that'd just be a mater of solving $$c \le ax + b < c + 1$$ so...

$$c-b \le ax < c + 1 - b$$ and if $$a > 0$$ then

$$\frac {c-b}{a}\le x < \frac {c+1-b}a$$ and if $$a < 0$$ then

$$\frac {c-b}{a}\ge x > \frac {c+1-b}a$$

That's all there is to it.

• As a follow-up question, given an equation, say $\lfloor \alpha\lfloor ax+b\rfloor+\beta\rfloor=c$ for $a,b,\alpha,\beta\in\mathbb{Q},\, c\in\mathbb{Z}$, would it still be possible to find an interval of solutions in general? – Kristian S. Jensen Jun 14 at 16:21

First of all, since $$\lfloor ax+b\rfloor=c$$, $$c$$ is not only $$\in \Bbb{Q}$$, but $$c \in \Bbb{Z}$$. Secondly, $$\lfloor ax+b\rfloor=c \leftrightarrow c \le ax+b < c+1$$ Which translates to two inequatlities: $$ax+b \ge c, \text{ and} \\ ax+b Any $$x \in \Bbb{R}$$ that satisfies the above two inequalities will be your solution to $$\lfloor ax+b\rfloor=c.$$