Solving the Diophantine equation $xy = az + b$ for $x, y, z \in \mathbb{Z}$

107 Views Asked by At

Is there a method to solve Diophantine equations of the form

$$ xy = az + b \tag{1} $$

where $x, y, z \in \mathbb{Z}$ are unknown and $a, b \in \mathbb{Z}$ are known constants? There are also bounds on $|x|, |y|, |z|$, call them $\alpha, \beta, \gamma$ respectively.

One approach I thought of was rearranging $(1)$ as

$$ xy - az = b \tag {2} $$

and taking $u = xy, v = z$ to get

$$ 1 \cdot u - a \cdot v = b \tag {3} $$

which can be solved using the Euclidean algorithm and then we find $x, y$ as the divisors of $u$ (both positive and negative), subject to bounds $\alpha, \beta, \gamma$.

2

There are 2 best solutions below

2
On BEST ANSWER

We'll solve the case $\gcd(a,b)=1$ first.

Then for any $x$ with $\gcd(x,a)=1,$ we can solve: $xu+av=1,$ then choose any $y\equiv xub\pmod{ a}.$ Then let $z=\frac{xy-b}{a}.$

We only need to solve for $1\leq x_0<a,$ since we can then choose $x\equiv x_0\pmod a,$ use the same $y$ and the compute $z.$


If $\gcd(a,b)=d>1,$ then you have $a=da_0,b=db_0.$

Solve $x_0y_0=a_0z_0+b_0,$ and factor $d=d_1d_2,$ we get a solution:

$$(d_1x_0)(d_2y_0)=az+b.$$

The tricky part of that is factoring $d.$ But that isn't really harder than enumerating all the numbers $<b_0$ which are relatively prime to $b_0.$


This should work to find all classes of solutions.

But if you just need one solution, let $d=\gcd(a,b)$, $a_0,b_0$ as before, then let $x=d,y=a_0, z=0.$

0
On

Equation, $(xy=az+b)$ has parmeteric solution:

Since, $(a,b)$ is given, we take:

$(a,b)=(1,3)$

Hence we have,

$x*y=(1)z+3$

We have the identity:

$(w+1)*(w+11)=(1)(w^2+12w+8)+(3)$

So in the above we take:

$x=w+1$

$y=w+11$

$z=w^2+12w+8$

For, $w=2$ we get:

$(x,y,z)=(3,13,36)$