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!


1 Answer 1


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.

  • $\begingroup$ That does make sense. But is there a way to do it using my technique: the system of 2 equations in 2 variables? That's the way I was introduced to. $\endgroup$
    – Francesca
    Oct 6, 2016 at 3:18
  • $\begingroup$ I think I did the same thing, because I performed the reduction using a small trick. $\endgroup$ Oct 6, 2016 at 3:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .