We will tackle some Diophantine equations using the method of completing the square.
Consider the function . We are interested in knowing what values of make a perfect square. We know that can be written as .
For more information on how to transform into this form, go here.
What values of make a perfect square?
Solution 1: Let where is an integer and is a non-negative integer. Observe that this can be rewritten as
Then since both and are integers, there are only the following two possibilities for the left side of to be which is the right side:
That implies that the only integers such that is a perfect square are and .
Solution 2: In this particular case, we see that: . The only squares that differ by are and . So we look for those values of satisfying , which gives