For the equations $$x+y+z=31$$ $$x+2y+3z=41$$ is there a elegant way or method to find all the positive solutions in integers? Thus far, I have been using trial and error (which is time consuming). Another approach I tried was subtracting the first equation from the second to get $y+2z=10$. But I feel like there must be some faster way of doing this that I am not thinking of right now. Any input is appreciated.
2026-04-12 07:41:46.1775979706
On
Solutions to $x+y+z=31$ and $x+2y+3z=41$
2k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
No, I think the second approach you had is as quickly as this can be solved. Subtracting the first equation from the second gives $y + 2z = 10$, and the only possible ways that both $y$ and $z$ are positive integers is when $(y,z) = (8,1), (6,2), (4,3), (2,4)$. Plugging each set back into the first equation, we get that the four possible combinations for $(x,y,z)$ are $(22,8,1), (23,6,2), (24,4,3), (25,2,4)$.
Subtract the first equation from the second.
Express $y$ in terms of $z$
Now substitute into the first equation and you'll get and relation for $x$ with respect for $z$.
Because $z \in \mathbb{R}$ there are infinite amount of solutions and all of them are of a closed form, you'll obtain. And this is the fastest way to compute solution, maybe you were confused, because there are infinite amount of them.