Question about Diophantine equations?

69 Views Asked by At

Solve the Diophantine equation.

$6x+ 9y = 15$

We can see that $x = 1$ and $y=1$ solves the equation, so all solutions are given by $x = 1 + 3n$ and $y = 1 - 2n, n \in \mathbb{Z}$. By using:

$$x=x_0 + n \times \frac{b}{gcd(a,b)}$$ and $$y=y_0 - n \times \frac{a}{gcd(a,b)}$$

However, solving it as my textbook says I get:

I get that $gcd(9,6)=3$

$9 = 1 \times 6 + 3$

$6 = 2 \times 3 + 0 $

Then,

$3 = 9 - (1\times 6)$

So,

$3=6(-1) + 9(1) \implies 15 = 6(-5) + 9(5)$

All solutions are given by (as it is stated in my textbook) $$x=x_0 - n \times \frac{b}{gcd(a,b)}$$ and $$y=y_0 + n \times \frac{a}{gcd(a,b)}$$

Thus,

$x = - 5 - 3n$ and $y = 5 + 2n, n \in \mathbb{Z}$

My textbook give the answer as $ x=1+3n, y= 1-2n$, how did they arrive at that by using $$x=x_0 - n \times \frac{b}{gcd(a,b)}$$ and $$y=y_0 + n \times \frac{a}{gcd(a,b)}$$

and $$3=6(-1) + 9(1)?$$

All I get is $x=-1 -3n, y= 1 + 2n,n \in \mathbb{Z}$ which gives $3$ and not $15$, or $x = - 5 - 3n, y = 5 + 2n, n \in \mathbb{Z}$ which gives $15$ but looks ugly. What am I missing?

2

There are 2 best solutions below

0
On

For any $x_0,y_0$ that are solutions, you can use the formula: $$x=x_0+n\cdot\frac{b}{\gcd(a,b)}\ ,\ y=y_0-n\cdot\frac{a}{\gcd(a,b)}$$ But you can also change the sign, and use the formula like this: $$x=x_0-n\cdot\frac{b}{\gcd(a,b)}\ ,\ y=y_0+n\cdot\frac{a}{\gcd(a,b)}$$ It doesn't matter.

Now, the textbook used $(1,1)=(x_0,y_0)$ and he used the first formula, so he got $x=1+3n\ ,\ y=1-2n$. You used $(-5,5)=(x_0,y_0)$, and the second formula, so you have got $x=-5-3n\ ,\ y=5+2n$, but it's all the same.

0
On

Given $6x+9y=15\implies 2x+3y=5$

\begin{equation} x = \frac{(5 - 3 y)}{2}\quad\land\quad y =\frac{(5 - 2 x)}{3} \end{equation} A pattern in a spreadsheet suggests $\quad x = (3 n + 1), n\in\mathbb{Z}\quad$ and, by substitution we get

\begin{equation} y =\frac{(5 - 2 (3n-1)}{3}=\frac{(5 - 6n+1)}{3}=\frac{(6 - 6n)}{3}=(1-2n) \end{equation}

$$\therefore\quad x = (3 n + 1),\quad y = (1 - 2 n), \quad n \in\mathbb{Z}$$

$$(x,y)\in\{\cdots, (-5,5), (-2,3),(1,1),(4,-1),(7,-3),\cdots\}$$