Celeb Glow
updates | April 19, 2026

How to solve linear Diophantine equation with 3 variables?

$\begingroup$

I worked on this problem several times, but for some reason, I can't seem to get it. Here is the problem:

$$6x + 15y + 10z = 53$$

These are my attempts:

  1. Let $w = 2y + 2z$. So our equations are: $6x + 5w = 53\ (1)$ and $ 3y + 2z = w\ (2)$. For $(1)$, after using the Euclidean Algorithm, I got $x = 53 + 5n$ and $w = -53 - 6n$. Now substituting into $(2)$, we get $3y + 2z = -53 -6n$. This is where I'm stuck.

  2. Let $w = 2x + 5y$. So our equations are: $2x + 5y = w\ (1)$ and $ 3w + 10z = 53\ (2)$. For $(2)$, after using the Euclidean Algorithm, I got $w = -159 + 10n$ and $w = 53 - 3n$. Now substituting into $(1)$, we get $2x + 5y = -159 +10n$. Again, I'm stuck!

Also, are we allowed to have rational solutions? Any help is greatly appreciated. Thank you in advance!

$\endgroup$

3 Answers

$\begingroup$

I was able to figure it out. So I thought I would post it in case someone else searched for help on a similar problem!

Solve $6x+15y+10z = 53 \rightarrow 6x+5(3y+2z)=53.$ Let $w=3y+2z.$ Solve:

$$3y+2z=w\ (1) \\6x+5w=53\ (2)$$

Solution to $(2):\ gcd(6,5) = 1.$ So forming a linear combo, get $6(1)+5(-1)=1$. Multiply by 53, get $6(53)+5(-53)=53$. So, $$x=x_0+(b/d)n = 53+5n$$ $$w=w_0-(a/d)n = -53-6n.$$

Solution to $(1):$ First, solve $3y+2z=1.$ So, $gcd(3,2)=1$; form linear combo, get $3(1)+2(-1)=1.$ Multiply by $w=-53-6n$ to get

$$3(w)+2(-w)=w \rightarrow 3(-53-6n)+2(53+6n)=-53-6n$$

Then, $y_0=-53-6n\ and\ z_0=53+6n$. So,

$$y=y_0+(b/d)m =-53-6n+2m$$ $$z=z_0 -(a/d)m = 53+6n-3m $$

Similarly, you can let $w=2x+5y$ and you'll get the same answer. Hope this process makes some sense!

$\endgroup$ $\begingroup$

Evaluating equation mod 5 we get x $\equiv$ 3 (mod 5) Evaluating equation mod 3 we get z $\equiv$ 2 (mod 3) Setting x=5m+3, z=3n+2 in equation we get y=1-2m-2n Integer values for m & n will generate Integer solutions for x,y,z

$\endgroup$ 0 $\begingroup$

$x=-2,y=1,z=5$ gives $6(-2) + 15(1) + 10(5) = 53$, by inspection. I'm trying to think of the general rule.

$\endgroup$ 0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy