# Floor function of sum of square roots

$$f(x)=\sqrt{x^{2}-10x+314}+\sqrt{x^{2}+20x+325}$$. Find the minimum of $$\lfloor{f(x)}\rfloor$$.

So this becomes $$f(x)=\sqrt{(x-5)^{2}+17^{2}}+\sqrt{(x+10)^{2}+15^{2}}$$, and simply by putting in $$x=0$$, to try and minimise the first term without making the second term too large (because $$289+35=324=18^{2}$$), the first term is still $$17$$ and then the second term becomes 18, which gives me the correct answer $$35$$.

But this seems a little bit crude and it isn't very conclusive to me actually, so is there like a proper working to actually prove that the minimum is 35, especially since the floor function applies to the sum of the two square roots and not each individual one. Could anyone present the working more clearly? Thanks.

• No, that is a proof. The interesting thing would be an example, let us call it $\sqrt{(x-A)^2 + B^2} + \sqrt {(x-C)^2 + D^2}$ where the actual real minimum is $\geq 1+B+D,$ so we could not immediately trust numerical experiments. May or may not be possible. – Will Jagy Mar 7 at 1:28
• @WillJagy That comment doesn't quite seem to make sense to me... did you mean to say "No, that is not a proof"? – David Mar 7 at 1:34
• @David he seems uncertain, so I indicated that his disbelief is wrong, he really did prove 35. – Will Jagy Mar 7 at 1:37
• @WillJagy OK.$\,\!$ – David Mar 7 at 1:39

Write $$A=(5,17)$$ and $$B=(-10,15)$$ and $$X=(x,0)$$. Then $$f(x)$$ is the distance $$AX+BX$$. So we want to minimise the length of the path from $$A$$ to $$B$$ via the $$x$$-axis.
As is well known (draw a diagram!), this is done by making $$AX$$ and $$BX$$ have equal angles with the $$x$$-axis, and the minimal length will be the same as the length of the straight line from $$(5,17)$$ to $$(-10,-15)$$, which is $$\sqrt{15^2+32^2}=\sqrt{1249}\ ,$$ which is between $$35$$ and $$36$$.
Floor function preserves order (is increasing), so if you want to minimize the floor of $$f(x)$$, minimize $$f$$ directly and look at the floor of the value. To minimize the function, compute the derivative and compare to 0.