# Approximate solution of a diophantine equation

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 ?

• Do you have an example without integer solutions, but with $\epsilon$-solution for any given $\epsilon >0$ ? – Dietrich Burde Sep 13 '13 at 8:04
• I think $P(x)=4x^2+3$ can be seen to have $\epsilon$-solutions for any $\epsilon>0$, but clearly has no integer solutions. – Old John Sep 13 '13 at 8:12
• @Dietrich Burde : Take $k$ such that $x^3+k=y^2$ has no integer solutions. It is easy to construct $\varepsilon$-solutions by taking $x=t^2$ for some integer $t$. – Ewan Delanoy Sep 13 '13 at 8:16

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}$.
• This is a nice approach, but your polynomial $Q(x)$ usually does not have integer coefficients. For instance, if $P(x)=x^2+x$ then $Q(x)=x+1/2$. So you'll need to modify your argument. – Michael Zieve Dec 6 '13 at 15:09
• On the other hand, if $P(x)=a_0 x^2$ with $a_0$ being a positive nonsquare, then $\sqrt{a_0}$ is irrational, so its integer multiples form a dense subset of $\mathbf{R}/\mathbf{Z}$, which implies that there are $\epsilon$-solutions of $P(x)=y^2$ for all $\epsilon>0$. – Michael Zieve Dec 6 '13 at 15:12