I have the following linear diophantine equation with $3$ unknowns:
$$10x+3y+{z \over 2}=100$\qquad\text{ with }\qquad x,y,z \ge 1.$$
I only know how to solve with 2 unknowns, how do I approach with 3 unknowns?
I have the following linear diophantine equation with $3$ unknowns:
$$10x+3y+{z \over 2}=100$\qquad\text{ with }\qquad x,y,z \ge 1.$$
I only know how to solve with 2 unknowns, how do I approach with 3 unknowns?
On
If we want positive integer solutions, we can see $$10x+3y+{z \over 2}=100\implies 200-z = 20 x + 6 y\\ \implies 13 \le (10x+3y) \le 99\\ \quad\implies\quad x\le\bigg\lfloor\frac{99-3}{10}\bigg\rfloor=9\\ \quad\implies\quad y\le\bigg\lfloor\frac{99-10}{3}\bigg\rfloor=29 \\ \land\quad 200-(20+6)=174\implies z\le 174$$
Now cycling through two nested loops of $x,y$ with the limits above, integer values of $z$ reveal all the solutions.
$$z = 200 -20 x - 6 y$$
Heuristic shows, there are solutions whenever $$x\in\{1,2,3,4,5,6,7,8,9\}\quad\land\quad y\in\big\{1,2,3,\cdots, \big\lfloor(10-x)\log_2 10\big\rfloor\big\}$$
where $\quad\big\lfloor(10-x)\log_2 10\big\rfloor\quad$ yeilds $\qquad Set_{y_{max}}=\{29,26,23,19,16,13,9,6,3\}$
Because $x,y,z\geq1$ it is clear that $x<10$. Now for each value of $x$ you get a linear diophantine equation in $2$ unknowns, which you know how to solve.
If you solve a few of these linear diophantine equations in three variables, you will quickly see the pattern for how to solve such equations in general. You'll also noticed I chose to distinguish cases by different values of $x$, because this results in fewer cases.