# How to solve $\lfloor x \rfloor + \lfloor \frac{1}{x} \rfloor = 1$?

I am stuck with this equation. All I could do is this: $$\lfloor x \rfloor$$ = $$\lfloor n + m \rfloor$$ such that $$n \in N$$ and $$m<1$$. We get:

$$\lfloor x \rfloor + \lfloor \frac{1}{x} \rfloor = 1$$

$$\lfloor n + m \rfloor + \lfloor \frac{1}{n+m} \rfloor = 1$$

$$n + \lfloor m \rfloor + \lfloor \frac{1}{n+m} \rfloor = 1$$

$$n + 0 + \lfloor \frac{1}{n+m} \rfloor = 1$$

$$n + \lfloor \frac{1}{n+m} \rfloor = 1$$

From here on I have no idea what to do!

Edit: It is easy to see that any value $$1 satisfies the equation, but can I find all the solutions?

• Well, have you found some solutions at least?
– lulu
Jan 4, 2022 at 14:32
• Split the problem. For ex., on $[0,1]$, $\lfloor x \rfloor = 0$ so you are left with the second term only. Also, for which values of $y$, $\lfloor y \rfloor = 1$ holds ? Jan 4, 2022 at 14:34
• For a start : What is $\lfloor \frac{1}{x} \rfloor$ for $x>1$ ? Next consider that $0<x<1$ can be transformed into the case $x>1$. The negative case is a bit more complicated. Jan 4, 2022 at 14:35
• Yes, values such as 3/2 do satisfy the equation. It is quite obvious that any value $1<x<2$ satisfies the equation, but how can I find all the solutions? Jan 4, 2022 at 14:37
• Yes, 1 itself does not. Thanks for pointing that out. Jan 4, 2022 at 14:45

In general, to solve $$\lfloor a \rfloor + \lfloor b \rfloor =c$$ you can consider the pairs of values that $$a$$ and $$b$$ can take.

In this case your possibilities are very small: $$a=0, b=1$$ or $$a=1, b=0$$.

Can you proceed from there?

Hints:

1. For $$x>0$$ and $$x\neq 1$$, one of the two values, $$x$$ or $$\frac1x$$, is between $$0$$ and $$1$$, so the floor of that value will be $$0$$.
2. If $$x$$ is a solution, then so is $$\frac1x$$. This means you can first only focus on $$x>1$$, to get half of the solutions, then know that this is just half of the solutions.

First, we can notice that for $$x>1,$$ $$\lfloor \frac{1}{x} \rfloor=0$$

Then x solution and $$x>1$$ if and only if $$x$$ strictly between 1 and 2

for $$0 , then $$x$$ solution if and only if $$\lfloor\frac{1}{x} \rfloor=1$$ which can easily be solved using the definition of the floor function , then $$x$$ solution if and only if $$x$$ strictly between $$0.5$$ and $$1$$

Clearly if $$x$$ negative x is not a solution .

We can rule out $$x<0$$. If $$x\geqslant 2$$, then $$1-\lfloor x \rfloor \leqslant -1$$, which is problematic. If $$x\leqslant 1/2$$, then $$\lfloor \frac{1}{x} \rfloor = 1-\lfloor x \rfloor$$ is again impossible. For any $$x\in (1/2, 2)\setminus \{1\}$$ we have $$\left\lfloor x \right\rfloor + \left\lfloor\frac{1}{x} \right\rfloor =1.$$