How many pairs of positive integers (x,y) satisfy x^2-y^2=51+xy?


Hopefully, someone other than Vinculum can actually answer this.

 Jun 14, 2022

Hello Guest!

The original equation: \(x^2-y^2=51+xy\)  (*)


          Factorise the L.H.S: \((x-y)(x+y)=51+xy\)


The R.H.S will always be positive, as \(x>0,y>0 \implies xy>0\)

So, the L.H.S has to be always positive, hence, \(x>y\) is a must condition.

We can rewrite (*) as follows: 

\(x(x-y)=51+y^2\)  (1)

\(y(y-x)=x^2-51\)  (2)

Observe (2): we know x>y but notice (y-x)... This is negative!
Hence, L.H.S of (2) is negative, and so R.H.S must also be negative.

That is, \(x^2-51 <0 \implies x \le 7\) (**) 

So, x could be any of the following:

x:  2,3,4,5,6,7   

We can, from here, try to solve the quadratic in (1) using each x, but a quicker way is as follows:

Ok, let's solve for y in (1):


Quadratic formula:


Observe: \(5x^2-204\ge 0 \implies x\ge7\) (***)  

Look at (**) and (***)

Thus, x has to be 7  (To satisfy both inequalities.)

But, substituting x=7 in (3) does not give an integer value of y.

This means, there does not exist integer pairs (x,y) such that (*) is satisfied.

Therefore, 0 pairs.


Also, Wolframalpha gives no integer solutions:



Hope this helped!

 Jun 15, 2022

I'm willing to believe Wolframalpha, that there are no integer solutions, but your solution is wrong.

Specifically your eq(2) is wrong.

 Jun 15, 2022

Oh! Sign error! Sorry!


But, anyway, a similar approach can be used:


Now the correct equation (2):


The R.H.S is always positive so: \(x^2-51>0 \implies x > 7\implies x\ge8\)  (*) 

\(y=-\frac{x\pm \sqrt{5x^2-204}}{2}\)

\(y>0 \implies \frac{x\pm \sqrt{5x^2-204}}{2}<0\)

\(x\pm \sqrt{5x^2-204} <0\)

So: \(\pm \sqrt{5x^2-204}<-x\)  (Square both sides, and solve the inequality:)

Then: \(5x^2-204




So: \(x\le 7\) (**)

But, (*) contradicts (**). (As there is no x that satisfies both)

Therefore, there does not exist an integer x so that y is a positive integer.

Guest Jun 16, 2022
edited by Guest  Jun 16, 2022
edited by Guest  Jun 16, 2022
edited by Guest  Jun 16, 2022
edited by Guest  Jun 16, 2022
edited by Guest  Jun 16, 2022
edited by Guest  Jun 16, 2022

for some reason latex does not work for 5x^2-204<0     

Guest Jun 16, 2022

If latex is lagging: * 5x^2-204 4x^2-204 < 0 ----->x^2 < 51 -----> x <=7

Guest Jun 16, 2022

Sorry, but I'm still not convinced.

At the point where you say  square both sides and solve the inequality , are you not multiplying throughout by negative quantities, ( -x on the rhs), in which case the direction of the inequality should switch.

-4 < -2, so squaring and solving the inequality, 16 < 4, 12 < 0 ?

 Jun 16, 2022

Oh! I see the mistake! Thanks for pointing it!
My solution is then completely wrong! Sorry!
Will try to find another solution.

Guest Jun 16, 2022
edited by Guest  Jun 16, 2022

Ok I guess I found a "valid" solution.

I do not think this is the way the question was intended to be solved.

However, this is a correct mathematical proof that there does not exist integers that satisfy the given equation.

Consider what we found earlier:


The point is,  consider: \(2x-y=\sqrt{5y^2+204}\)  (*)

Let's proof this by contradiction:
Suppose x and y are positive integers.

Then the L.H.S is an integer.

Now, we will prove that the R.H.S is not an integer. It is in fact, an irrational number! For all integers y.

For the R.H.S to be an integer, \(\sqrt{5y^2+204}\) must be the square root of a "Perfect square" 
Consider:   \(y^2\) This is a perfect square for all y. As, \(\sqrt{y^2}=y\) an integer.

However, consider:  \(\sqrt{5y^2}=\sqrt{5}*\sqrt{y^2}=y\sqrt{5}\) . Clearly, for all integers ,y, the \(\sqrt{5}\) will always be there.

Hence, \(\sqrt{5y^2}\) Is not an integer, it is always an irrational number.

Now, obviously, adding +204 does not make it an integer either.

Hence, \(5y^2+204\) is not a perfect square; thus, \(\sqrt{5y^2+204}\) is not an integer.

So the R.H.S of (*) is irrational, but the L.H.S was supposed to be an integer by our assumption.

This contradicts our assumption, and therefore, there does not exist integers x and y such that (*) is satisfied.

(By the way, this proof can even be extended to integers! (Need not to be only positive!))

hope this helped!

 Jun 16, 2022

44 Online Users