How to solve Linear diophantine equation ax+by=4ab

79 Views Asked by At

$ Answer : x= 3b, y=a $
$ x =2b,y=2a $
$ x= b, y=3a $
$. $
$ ax+by=4ab $
$ (0,4a) $
$ x=x' $
$ y=y'+4a $
$ ax'+b(y'+4a)=4ab $
$ ax'+by'+4ab=4ab $
$ ax'+by'=0 $
$ ax'=-by' $
$ x':y' = (- b) :a $
$ x'=-bk $
$ y'=ak $
$ x=-bk $
$ y=ak+4a $
$ so,if, k=-1 $
$ x=b, y=3a $
$ if, k= - 3 $
$ x=3b, y=a $
$ if, k= - 2 $
$ x=2b, y=2a $

1

There are 1 best solutions below

0
On

Let assume you have two solutions $\begin{cases}ax+by=4ab\\ax_0+by_0=4ab\end{cases}$

By subtraction $a(x-x0)+b(y-y0)=0\iff A(x-x_0)=-B(y-y_0)$

With $\gcd(A,B)=1$ and $\begin{cases}A=\frac{a}{\gcd(a,b)}\\B=\frac{b}{\gcd(a,b)}\end{cases}$

Since $A$ divides $B(y-y_0)$ and $\gcd(A,B)=1$ then $A$ divides $y-y_0$, similarly $B$ divides $x-x_0$

and we get $\begin{cases}x=x_0+tB\\y=y_0-tA\end{cases}$

Now we only need one initial solution, for instance $(x_0,y_0)=(2b,2a)$