I have to solve the following equation: $(x-y)^2=x+y$, where $x$ and $y$ are non-negative integers. This equation has an infinite number of solutions, but how to prove that there exists a positive integer k such that $x=\frac{(k+1)(k+2)}{2}$ and $y=\frac{k(k+1)}{2}$? Thanks!
2026-04-24 01:16:16.1776993376
On
On
Diophantine equation: $(x-y)^2=x+y$
215 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
1
On
Just substitute the values for x and y in the right hand side, you get:
$$\left(\frac{(k+1)(k+2)}{2}-\frac{k(k+1)}{2}\right)^2 = \left(\frac{(k+1)(k+2-k)}{2}\right)^2 = (k+1)^2$$
If you do the same thing on the left side, you get $(k+1)^2$ too, Q.E.D
0
On
On rearranegment we have $$x^2-x(2y+1)+y^2-y=0$$
$$\implies x=\frac{2y+1\pm\sqrt{(2y+1)^2-4(y^2-y)}}2=\frac{2y+1\pm\sqrt{8y+1}}2$$
As $x$ has to be integer, we need $8y+1$ to be perfect square
As $y$ is also an integer, $8y+1$ is odd, hence can be written as $(2a+1)^2$ where $a$ is any integer
Now simplify and find $x,y$ is terms of $a$
Hint: Rewrite as $(x-y)^2=(x-y)+2y$. Set $k+1=x-y$. Our equation is then $k(k+1)=2y$.