# Number of ordered pairs of integers $(x,y)$ satisfying the equation $x^2+6x+y^2=4$ [duplicate]

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?

## marked as duplicate by John Omielan, YuiTo Cheng, Lord Shark the Unknown, Thomas Shelby, postmortesJun 25 at 4:57

• did you write the solutions as $(y,x)$ without telling us? – J. W. Tanner Jun 24 at 22:53
• thanks; also, maybe you should indicate that $13-y^2\ge0$ limited your choice of $y$, so the extent of "trial and error" was small – J. W. Tanner Jun 24 at 22:56
• @J.W.Tanner, I have indicated that by stating $13-y^2$ is a perfect square. – MrAP Jun 24 at 23:00