Solve Diophantine equation: $xy+5y=2x+(y+2)^2$

99 Views Asked by At

Solve Diophantine equation: $xy+5y=2x+(y+2)^2$ for positive integers $x,y$.

Rearranging the equation gives: $y^2=xy-2x+y-4$.So the RHS must be a perfect square,how can it be more restricted?

1

There are 1 best solutions below

1
On BEST ANSWER

It is equivalent to

$$x(y-2)=y^2-y+4\iff x=\frac{y^2-y+4}{y-2}=y+1+\frac6{y-2}$$

for $y\neq2$.


EDIT

As @lab bhattacharjee suggested, we may also arrange the equation with $y$ as the subject.

$$y^2-(1+x)y+(2x+4)=0\tag1$$

For integer $y$, we must have some integer $z$ such that $$\Delta=z^2=(1+x)^2-4(2x+4)=x^2-6x-15=(x-3)^2-24$$ $$\iff(x-3-z)(x-3+z)=24$$

So there exists some integer $a=x-3-z$ and $\frac{24}{a}=x-3+z$.

Thus we have $$a+\frac{24}a=2x-6\iff x=\frac a2+\frac{12}a+3$$

So $a=2,4,6,12\iff x=8,10$. Substitute both values of $x$ into $(1)$ and we get

$$(x,y)=(8,4),(8,5),(10,3),(10,8)$$