How can I solve for $x$ given $a=x \lfloor x \rfloor$

Where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$, and where $a$ is a rational number.

What I've done

\begin{align} \frac{a}{x} &= \lfloor x \rfloor \\ \implies \frac{a}{x} & \le x < \frac{a}{x}+1 \\ \end{align}

which yields two cases

\begin{align} \sqrt{a} &\le x \quad (1) \\\\ \left(x+\frac{1+\sqrt{1+4a}}{2}\right) \left(x+\frac{1-\sqrt{1+4a}}{2}\right) &< 0 \quad (2) \end{align}

  • $\begingroup$ What have you done so far? $\endgroup$
    – saulspatz
    Mar 30, 2018 at 3:44
  • $\begingroup$ Compare the graphs of $x\cdot \lfloor x\rfloor$ to $x^2$. You should be able to see that there are values of $a$ for which no such $x$ exists. You should also be able to see that by knowing the value of $a$, you should be able to figure out the value of $\lfloor x\rfloor$, and from there you will be able to calculate $x$ itself. $\endgroup$
    – JMoravitz
    Mar 30, 2018 at 3:53
  • $\begingroup$ I know that I could solve it like that, but I wanted to know if it could be solved analytically. $\endgroup$
    – Alex Hal
    Mar 30, 2018 at 3:55

1 Answer 1


If $\lfloor x \rfloor = n$, you want $x = a/n$ and $n \le a/n < n+1$. Thus (assuming $n > 0$) $n^2 \le a < n^2 + n$. Now $(n+1)^2 = n^2 + 2 n + 1 > n^2 + n$. So:

Given $a \ge 1$, take $n = \lfloor \sqrt{a} \rfloor$. If $a \ge n^2 + n$ there is no solution. Otherwise, $x = a/n$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.