Showing that the result of an equation may be a perfect square Consider an equation that, for a few select integers $x$, yields a value that is a perfect square. In the case of perfect square quadratics it is easy. For example $(x-2)^2$ will always yield a perfect square value. But what about for an equation like $(x-2)(x-3)$? Or $x^4 -x^3 + x^2 + 2x + 1$? Perhaps it yields a perfect square for a few inputs, but is there a way to determine all such inputs? 

We first show that $\gcd(x-2,x-3)=1$, which is to say that $x-2$ and $x-3$ have no common prime factor. Assume to the contrary that $x-2=pa$ and $x-3=pb$ for some prime $p \ge 2$ and integers $a$ and $b$. Now $$1 = (x-2)-(x-3) = pa-pb = p(a-b).$$ This implies $p \mid 1$, contradicting the hypothesis that $p$ is a prime.
Now, by the Fundamental Theorem of Arithmetic, $$(x-2)(x-3)=k^2$$
implies $x-2=k_1^2$ and $x-3=k_2^2$ for coprime integers $k_1$ and $k_2$, such that $k=k_1k_2$. But the only two consecutive square integers are $0$ and $1$. Hence $x-2=1$ and $x-3=0$ is the only solution where $x-2$ is positive. The second solution comes through the power of zero to absorb everything: $x-2=0$ and $x-3=-1$ means $(x-2)(x-3)=0\cdot(-1)=0$, and since $0=0^2$ is a square, it counts.
