[Math] Finding all integer solutions of linear diophantine equation in 3 variables

diophantine equationsnumber theory

I need to find all integer solutions of the following equation:

$$2x + 3y + 4z = 5$$

So far I have already found, through a system of 2 equations in 2 variables, that one particular solution is $x = 15, y = -15,$ and $z = 5$.

There is a formula for finding all the integer solutions from two known solutions for two variables, I'm wondering if there is one for three? I imagine it would have to do with the gcd's of $2, 3$ and $4$.I just don't know quite what it would look like.

Thanks in advance!

Best Answer

If you want the set of all solutions of this problem, then all you need to do, is the following:

Note that $2x+3y+4z=5 \iff 4(z+2x) + 3(y-2x) = 5$. Now, the general solution for an equation of this form is that $(z+2x,y-2x) = (-3n-1,4n+3)$, using the ordinary technique you have for two variables.

Hence, the final solution is $(x,y,z) = (k, 4n+2k+3,-3n-2k-1)$, where $n,k$ can vary among the integers.

For example, $n=13,k=-12$ gives $x = -12, y= 31, z = -16$, and $2x+3y+4z = 5$.

What helped here is the technique of reducing variables. Hence, we get the result.