# Number TheoryDiophantine equation

#### Petrus

##### Well-known member
Hello MHB,
I got problem with this exemple (It's 'Exempel 1' and yes it's on Swedish), I follow my book method and get,
$$\displaystyle x=169-35K, \ y= -468-97K$$
I get the 'homogen soloution' that $$\displaystyle x=-35k, \ y=97k$$
'Solve equation $$\displaystyle 97x+35y=13$$'

Regards,

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hello MHB,
I got problem with this exemple (It's 'Exemple 1' and yes it's on Swedish), I follow my book method and get,
$$\displaystyle x=169-35K, \ y= -468-97K$$
I get the 'homogen soloution' that $$\displaystyle x=-35k, \ y=97k$$
'Solve equation $$\displaystyle 97x+35y=13$$'

Regards,

#### Petrus

##### Well-known member
Solve equation $$\displaystyle 97x+35y=13$$
ehmm. I am suposed to find one soultion with gcd, eucliders algoritmen then find all other soloution, cause it got infinity soloution, for x and y. Do it make sense now?

Regards,

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Solve equation $$\displaystyle 97x+35y=13$$
ehmm. I am suposed to find one soultion with gcd, eucliders algoritmen then find all other soloution, cause it got infinity soloution, for x and y. Do it make sense now?

Regards,
Ah, okay.
So do you know how to apply Euclid's algorithm?
(Btw, isn't this university-level stuff instead of pre-algebra?)

#### MarkFL

Staff member
...
(Btw, isn't this university-level stuff instead of pre-algebra?)
Good call...moved to the Number Theory sub-forum.

#### Petrus

##### Well-known member
Ah, okay.
So do you know how to apply Euclid's algorithm?
(Btw, isn't this university-level stuff instead of pre-algebra?)
Yes, I get x=169 and y=-468

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Yes, I get x=169 and y=-468
Wolfram says x=29, y=-80, which is effectively the same answer.
(Since you can add a multiple of 35 to x if you also subtract the same multiple of 97 from y.)
So you're all good?

#### Petrus

##### Well-known member
Wolfram says x=29, y=-80, which is effectively the same answer.
(Since you can add a multiple of 35 to x if you also subtract the same multiple of 97 from y.)
So you're all good?
$$\displaystyle x=169-35K, \ y= -468-97K$$
cause that website says the answer shall be #### Opalg

##### MHB Oldtimer
Staff member
$$\displaystyle x=169-35K, \ y= -468-97K$$
cause that website says the answer shall be The website answer is correct. If you add a multiple of 35 to $x$ then you have to subtract that multiple of 97 from $y$.

#### Petrus

##### Well-known member
The website answer is correct. If you add a multiple of 35 to $x$ then you have to subtract that multiple of 97 from $y$.
I am kinda confused cause I follow the method from my book.
* find a soloution $$\displaystyle x=x_0 , y=t_0$$ (particulate solution) that is what we find we euclidmens algorithmen.
*Find all soloution to homogeneous equation $$\displaystyle ax'+by'=0$$ and that is the one i do it wrong then...

#### Klaas van Aarsen

##### MHB Seeker
Staff member
*Find all soloution to homogeneous equation $$\displaystyle ax'+by'=0$$ and that is the one i do it wrong then...
The solution is $x'=kb,\ y'=-ka$, for integers k (note the minus sign).
Substitute to verify...

#### Petrus

##### Well-known member
The solution is $x'=kb,\ y'=-ka$, for integers k (note the minus sign).
Substitute to verify...
that is the part I strugle, my book say $$\displaystyle x'=-kb, \ y'= ka$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
that is the part I strugle, my book say $$\displaystyle x'=-kb, \ y'= ka$$
That works as well.
Can you substitute that solution in the equation?

#### Petrus

##### Well-known member
That works as well.
Can you substitute that solution in the equation?
$$\displaystyle x' = -35k , \ y'= 97k$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$$\displaystyle x' = -35k , \ y'= 97k$$
Yes.
Can you substitute that in the equation $ax′+by′=0$?

#### Petrus

##### Well-known member
Yes.
Can you substitute that in the equation $ax′+by′=0$?
$$\displaystyle 35(-35k)+97*97k=0$$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$$\displaystyle 35(-35k)+97*97k=0$$ ?
I kind of lost track of the equation. But the equation was $97x'+35y'=0$.

Can you redo the substitution with this equation?

#### Petrus

##### Well-known member
I kind of lost track of the equation. But the equation was $97x'+35y'=0$.

Can you redo the substitution with this equation?
$$\displaystyle 97(-35k)+35*97k$$
my book says $$\displaystyle x=x_0+x' , y=y_0+y'$$
and our $$\displaystyle x_0=169$$ and $$\displaystyle y_0=-468$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$$\displaystyle 97(-35k)+35*97k$$
Do you see that this is zero?

my book says $$\displaystyle x=x_0+x' , y=y_0+y'$$
and our $$\displaystyle x_0=169$$ and $$\displaystyle y_0=-468$$
Yes?

#### Petrus

##### Well-known member
Do you see that this is zero?
Yes,

That means the answer is $$\displaystyle x=169-35K, \ y= -468-97K$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$$\displaystyle 97(-35k)+35*97k$$
my book says $$\displaystyle x=x_0+x' , y=y_0+y'$$
and our $$\displaystyle x_0=169$$ and $$\displaystyle y_0=-468$$
That means the answer is $$\displaystyle x=169-35K, \ y= -468-97K$$
Erm.

You have $x'=-35k,\ y'=97k$ and $$\displaystyle x_0=169$$, $$\displaystyle y_0=-468$$

If I substitute that into $$\displaystyle x=x_0+x' , y=y_0+y'$$, I get
$$\displaystyle \qquad x=169+(-35k) , y=-468+(97k)$$.

See the difference?

#### Petrus

##### Well-known member
Erm.

You have $x'=-35k,\ y'=97k$ and $$\displaystyle x_0=169$$, $$\displaystyle y_0=-468$$

If I substitute that into $$\displaystyle x=x_0+x' , y=y_0+y'$$, I get
$$\displaystyle \qquad x=169+(-35k) , y=-468+(97k)$$.

See the difference?
Finally, I did find my mistake...! I somehow did have $$\displaystyle -97k$$ in my paper... and confused myself..! Can you confirm that this is correct answer?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Finally, I did find my mistake...! I somehow did have $$\displaystyle -97k$$ in my paper... and confused myself..! Can you confirm that this is correct answer?
Erm, yes. It is the correct answer.
It's what the website solution said...

#### Petrus

##### Well-known member
Erm, yes. It is the correct answer.
It's what the website solution said...
Hello I like Serena,
I am sorry I just got confused, Thanks for taking your time and now I understand diophantine equation alot better! Hey look at the bright side, you gained some 'thanks' Regards,

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Yep. Thanks! 