I have asked this question before, but didn't really understand the answer given. I found this proof elsewhere.
$a^2 \le x < (a + 1)^2$ is true for some (unique) positive integer $a$.
We have to show there is some $y > 0$ such that $ y + x = m^2$ is a perfect square for some $m\in\Bbb N$. Since there are no $y > 0$ such that $y + x=$ perfect square for $x = 1, 2, 3, 4$, we claim that the proposal is true for $x \ge 5$.
If $x = 5, 6, 7, 8$, then $a$ is not an integer, so the inequality above won't hold since we know $a$ is a positive integer. So, we'll check these cases separately.
Suppose $y > 0$.
Then $5 + 4$ is a perfect square. So are $6 + 3$, $7 + 2$ and $8 + 1$.
So it's sufficient to prove our claim for $x > 9 $.
If $x > 9$, then $a \ge 3$.
So $a^2 \le x < (a + 1)^2$ holds.
$a^2 -x \le 0 < (a + 1)^2 -x$ follows from $a^2 \le x < (a + 1)^2$.
Since $(a + 1)^2 -x > 0$, we let $y = (a + 1)^2 -x$.
To justify our choice of $y$ and to prove our claim, we also have to show that $x + y$ is a perfect square and that $x > y$:
$x + y = x + (a + 1)^2 -x = (a + 1)^2$.
$ y = (a + 1)^2 - x$
$ < (a + 1)^2 - a^2$
$= 2a + 1$
How can $a = 3$ if $x > 9$? It's obvious that $y$ is derived from $a^2 \le x < (a + 1)^2$, so does that mean that if we prove any statement for $x$ using this particular $y$, then the statement will hold for all $x > 9$? I am just trying to see the relevance of the bolded line in the proof to everything that follows it. At $x = 10$, $a$ is not an integer, so how can we say that our statement is true for all $x > 9$? Very confused here.