Linear Diophantine equation solving

59 Views Asked by At

Find all the positive solutions in integers of

$x+y+z=31$

$x+2y+3z=41$

For the first, I have subtract second equation from first , and by that I have found that $y=2k-10$ ,$z=k$,is it possible?

2

There are 2 best solutions below

0
On

If $z=k,y=2k-10;x=31-(2k-10)-k=41-3k$

$x+2y+3z=41-3k+2k-10+3k=39+2k$ which is not necessarily $=41$

Let us try this way:

$$x=31-y-z,$$

$$31-y-z+2y+3z=41\iff y=10-2z$$

$$x=31-(10-2z)-z=z+21$$

0
On

Expanding on lab bhattacharjee's solution, since I can't comment yet,

$x = z + 21$

$x = \frac{52-y}{2}$

$x = 31 - y - z$

Since $x, y, z \in Z^+$,

therefore, from the first and the second equations, $ 21 < x < 26 $

After this, it isn't that hard to see that the general solutions would be

$(x, 2(26 - x), x - 21), \forall x \in (21, 26) \cap Z $

For example, the first one(smallest x value) would be

$(22, 8, 1)$

and the last one(largest x value) would be

$(25, 2, 4)$.