I need some help regarding this question.

Solve the following equation in natural number $x$, where $m,k$ are fixed naturals:

$m\left\lfloor \sqrt{\dfrac{x}{k}}\right\rfloor = x$.

I think the answer is $x = m\left\lfloor\dfrac{m}{k}\right\rfloor$. But I do not know how to prove this claim.

I would be happy if somebody would help me solve this problem.

Thank you,



1 Answer 1


Since $x$ must be a multiple of $m$, write $x=my$. Then the equation becomes $$y=\left\lfloor\sqrt{\frac {my}k}\right\rfloor$$ and equivalent to $$y\le \sqrt{\frac {my}k}<y+1,$$ i.e. $$y^2\le \frac {my}k <y^2+2y+1$$ or (using $y\ne 0$, though in fact $x=0$ is a trivial solution) $$y\le \frac {m}k <y+2+\frac1y\le y+3.$$ Therefore $y=\left\lfloor \frac mk\right\rfloor$, $y=\left\lfloor \frac mk\right\rfloor-1$, and in rare cases $y=\left\lfloor \frac mk\right\rfloor-2$ are the solutions - the latter only if $m\ge 3k$ and $\frac mk-\left\lfloor \frac mk\right\rfloor<\frac 1{\left\lfloor \frac mk\right\rfloor-2}$.

  • $\begingroup$ Thanks for the detailed answer -- it helped me on a similar problem dealing with a ceil function. Do you mind explaining the last steps in arriving at those solutions? I recognize that the floor function is y <= m/k < y +1, but haven't been able to reason through and prove the two other solutions, or solve for the additional constraints on the last solution. $\endgroup$ Dec 22, 2020 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .