For any positive integer $N$ and real number $a > 0$. Define $f(k) = \frac{1}{N-k} (1+\frac{a}{k})$. The problem is to find a positive integer $k$ that minimizes $f(k)$.
It is quite easy to solve the problem by finding the minimum $k$ satisfying $f(k)\leq f(k+1)$, this will give a solution $k^* = \lceil \sqrt{aN+a^2 + 1/4} - a - 1/2 \rceil$, which is fine.
On the other hand, one can assume $k$ takes continuous values, minimizing $f(k)$ gives $\sqrt{aN+a^2} - a$, we then round this to the nearest integer and get $[\sqrt{aN+a^2} - a]$.
Since it is derived from continuous approximation, $[\sqrt{aN+a^2} - a]$ is not necessarily the correct. However, from numerical simulation, I found that $[\sqrt{aN+a^2} - a]$ is always the correct answer (meaning that it always equals $\lceil \sqrt{aN+a^2 + 1/4} - a - 1/2 \rceil$. )
So my problem is to prove (or disprove) $\lceil \sqrt{aN+a^2 + 1/4} - a - 1/2 \rceil = [\sqrt{aN+a^2} - a]$. I already proved that it is true when $a$ is also an integer, but not quite sure what is the case when $a$ is not an integer.
Any thoughts?
ps. sorry if you see this post twice. I posted this question before, but without detailed explaining.