How to solve Diophantine equations of the form $Axy + Bx + Cy + D = N$?

604 Views Asked by At

Is there a general solution to solve a Diophantine equation of the form $Axy + Bx + Cy + D = N$?

With $A,B,C,D,N,x,y$ positive integers.

2

There are 2 best solutions below

1
On BEST ANSWER

We have $$AN=A^2xy+ABx+ACy+AD=(Ax+C)(Ay+B)+AD-BC.$$ This reduces to $$uv=K$$ where $K=AD-BC-AN$ is known and $u=Ax+C$ and $v=Ay+B$. So we are looking for factorisations of $K$ with extra conditions $u\equiv C\pmod A$ and $v\equiv B\pmod A$.

0
On

It's factorization (as done by LStU) is known as :

Simon's Favorite Factorization Trick

The general statement of SFFT is $$xy+yj+ xk+jk =(x+j)(y+k)$$ The act of adding $jk$ to $xy +xk+yj$ in order to be able to factor it could be called "completing the rectangle" in analogy to the more familiar "completing the square."

Now you can prime factorize the constant term in order to get solutions of $x$ and $y$.