Diophantine equation with negative numbers

197 Views Asked by At

Good morning, I can't solve this diophantine equation through the Euclidean division: $45x - 8y = 231$

$45x'-8y' = 1$

Euclidean division

$45 = -5*(-8)+5$

$-8 = -2*5+2$

$5 = 2*2+1$

$2 = 2*1+0$

$1 = 5 -2*2$

$2 = -8+2*5$

$5 = 45-5*8$

$1 = 17*8-3*45$

However, at this point, the signs of the coefficients are "inverted", and so I cannot continue.

2

There are 2 best solutions below

0
On BEST ANSWER

No matter. Just multiply both terms in a product by $-1$. $$-3\cdot45+(-8)(-17)=1$$ $$45(-693)-8(-3927)=231$$

0
On

Here is how to do it by substitution method:

$45x-8y=231 \iff (8\times 5+5)x-8y=28\times8+7\iff 5x-8\underbrace{(y-5x+28)}_a=7$

$5x-8a=7\iff 5x-(5\times 1+3)a=5\times 1+2\iff 5\underbrace{(x-a-1)}_b-3a=2$

$5b-3a=2\iff \begin{cases}a=1\\b=1\end{cases}\iff \begin{cases}x=b+a+1=3\\y=a+5x-28=-12\end{cases}$

Thus the general solution is $$(8k+3,\ 45k-12)\ :\ k\in\mathbb Z$$