Consider the Diophantine equation $P(x)=y^2$, where $P$ is a (nonconstant) polynomial with integer coefficients and $x$ and $y$ must be integers.
For $\varepsilon \gt 0$, I say that an integer $x$ is a $\varepsilon$-solution if $\sqrt{P(x)}$ is within a distance $\varepsilon$ of some integer.
For which $P$ is it true that given any $\varepsilon \gt 0$, there are always $\varepsilon$-solutions ?
Let $P(x)=a_0^2\,x^{2n}+\dots$ be a polynomial of degree $2\,n$ and leading coefficient a perfect square. Then $$ P(x)=(Q(x))^2+R(x) $$ where $Q(x)=a_0\,x^n+\dots\in\mathbb{Z}(x)$ is of degree $n$ and $R\in\mathbb{Z}(x)$ is of degree at most $n-1$. If $P(x)>0$, which holds for sufficiently large $x$, we have $$ \bigl|\sqrt{P(x)}-|Q(x)|\bigr|=\frac{|R(x)|}{\sqrt{P(x)}+|Q(x)|}\to0\text{ as }x\to\infty. $$ It follows that there are $\epsilon$-solutions of $P(x)=y^2$ for all $\epsilon>0$.
Now let $P(x)=a_0\,x^{2n+1}+\dots$ be a polynomial of odd degree. Then $$ P^*(x)=P(a_0\,x^2)=a_0^{2(n+1)}\,x^{2(2n+1)}+\dots $$ is a polynomial of even degree and leading coefficient a perfect square, and the previous argument can be applied.
The only case left is when $P$ has even degree and the leading coefficient is not a perfect square. If the leading coefficient is negative, then there are no $\epsilon$-solutions for sufficiently small $\epsilon$ since $P(x)<0$ for all $x$ large enough. For polynomials o he form $P(x)=a_0\,x^2$, $a_0$ not a perfect square, his leads to consideration of the fractional parts of $x\,\sqrt{a_0}$ for $x\in\mathbf{N}$.