This question already has an answer here:

Find the number of ordered pairs of integers $(x,y)$ satisfying the equation $x^2+6x+y^2=4.$

My attempt:





$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, postmortes Jun 25 at 4:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ did you write the solutions as $(y,x)$ without telling us? $\endgroup$ – J. W. Tanner Jun 24 at 22:53
  • $\begingroup$ @J.W.Tanner, corrected. $\endgroup$ – MrAP Jun 24 at 22:56
  • $\begingroup$ 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 $\endgroup$ – J. W. Tanner Jun 24 at 22:56
  • $\begingroup$ @J.W.Tanner, I have indicated that by stating $13-y^2$ is a perfect square. $\endgroup$ – MrAP Jun 24 at 23:00
  • 2
    $\begingroup$ Same question as:math.stackexchange.com/questions/878556/… $\endgroup$ – NoChance Jun 24 at 23:12

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.


Not the answer you're looking for? Browse other questions tagged or ask your own question.