Find the number of ordered pairs of integers $(x,y)$ satisfying the equation $x^2+6x+y^2=4.$
My attempt:
$x^2+6x+y^2=4$
$x^2+6x+9-9+y^2-4=0$
$(x+3)^2+y^2-13=0$
$(x+3)^2=13-y^2$
$x$ is required to be an integer. Therefore, let us consider $x$ as an integer. Therefore $(x+3)$ is also an integer. Similarly $y$ is an integer. Now, the square of any integer is a non-negative integer and more specifically a perfect square.
Therefore, $(x+3)^2$ and is a perfect square
$\implies 13-y^2$ is a perfect square
$\implies y=-3,+3,-2,+2$ (By trial and error method)
For $y=-3, +3$, there are two values of $x$ which are $x=-1,-5$
For $y=-2,+2$, there are two values of $x$ which are $x=0,-6$
Hence there are eight ordered pairs in total: $(-1,-3),(-5,-3),(-1,+3),(-5,+3),(0,-2),(-6,-2),(0,+2),(-6,+2)$.
Therefore the number of ordered pairs of integers satifying the equation $x^2+6x+y^2=4$ is $8$.
My problem:
Is my method correct? Is there any other method to solve this problem?
This is exactly how I would do it, and (shouting out to uday) I am far beyond middle school. Completing the square is a powerful tool for quadratic equations.