3

I read today that $Ax+By+Cz=D \text { has a solution iff } \gcd(\gcd(A,B),C\mid D$ but I can't find it again, I also can't find any Diophantine equations with 3 variables that doesn't have solutions so I'm starting to suspect that I'm remembering something wrong.

My questions are: Are there Diophantine equations with 3 variables that has no solutions?

Is the statement in the title correct?

Note: $A,B,C,D,x,y,z\in \mathbb Z$ and $ A,B,C\neq0$.

shinzou
  • 3,981
  • Note that $\gcd(gcd(A,B),C)=\gcd(A,B,C)$. For a Diophantine equation without a solution, take for instance $2x+2y+2z=5$. – Arthur Nov 21 '14 at 20:28
  • This is the Euclidean Algorithm, I think. – Joe Z. Nov 21 '14 at 20:28
  • All 3-variable Diophantine equations you've found have solutions; what does that have to do with remembering something wrong, when the example you give also does? – MackTuesday Nov 21 '14 at 20:31
  • @JoeZ. yeah it's related but I don't see the part in the title... – shinzou Nov 21 '14 at 20:31
  • 1
    Do you already know that $Ax+By=F$ has a solution if and only if $\gcd(A,B)\mid F$? – Thomas Andrews Nov 21 '14 at 20:31
  • @ThomasAndrews I think so, does it scale up to 3 variables? – shinzou Nov 21 '14 at 20:34
  • Sure, it's basically induction on the number of variables. $Ax+By=\gcd(A,B)$ then $\gcd(A,B)U + CV=\gcd(\gcd(A,B),C)$. – Thomas Andrews Nov 21 '14 at 20:45
  • @ThomasAndrews well I tried just now and it didn't work, take $A=81, B=57, C=9, D=10$ then $\gcd (A,B,C)=3$ which does not divide $10$ but I just made a program that finds how many solutions a given equation has and it does find solutions... – shinzou Nov 21 '14 at 20:50
  • That sounds like it works - there shouldn't be a solution. What do you mean, it "doesn't work?" – Thomas Andrews Nov 21 '14 at 20:51
  • The statement of the result should be about integer solutions. Did your program produce an integer solution? Programs are not always correct. If it produced an integer solution, you might check by hand whether the claimed solution really is a solution. – André Nicolas Nov 21 '14 at 20:55
  • @AndréNicolas yeah you're right, I just checked again and it does find non integer solutions... Pretty embarrassing. – shinzou Nov 21 '14 at 21:02
  • @ThomasAndrews Andre was right, it was an int/float error in the program... – shinzou Nov 21 '14 at 21:03
  • 2
    Computers are not going to help you understand this, I think. $81x+57y+9z=3(27x+19y+3z)$, so if $D$ is not divisible by $3$... – Thomas Andrews Nov 21 '14 at 21:05
  • @ThomasAndrews yeah I see. BTW do you know of a proof online of the statement in the title or with one less variable like you mentioned? – shinzou Nov 21 '14 at 21:21

1 Answers1

3

$$ax + by = \gcd(a,b)$$

has a solution $(x_0,y_0)$

so write:

$$ax_0 + by_0 = \gcd(a,b)$$

Then,

$$\gcd(a,b)w + cz = \gcd(\gcd(a,b),c)$$

has a solution $(w_0,z_0)$:

$$\gcd(a,b)w_0 + cz_0 = \gcd(\gcd(a,b),c)$$

Substituting for $\gcd(a,b)$ and some algebra, simplifying:

$$a(x_0w_0) + b(y_0w_0) + c(z_0) = \gcd(a,b,c)$$

so the original equation:

$$ax + by + cz = \gcd(a,b,c)$$

has a solution

$$x = x_0 w_0, y = y_0w_0,z = z_0$$

If you want all solutions, use $x = x_0 + \frac {b}{\gcd(a,b)}t$, etc

Because of this, the same theorems apply for three variable as for two, regarding linear equations with no solutions.

GFauxPas
  • 5,047