# Positive solution for linear Diophantine equations

by pyfgcr
Tags: diophantine, equations, linear, positive, solution
 P: 22 The linear Diophantine equations: ax+by=c, a,b,c is natural numbers. If c is a multiple of gcd(a,b), there is infinite integer solutions, and I know how to find x,y. However, I wonder how to find positive integer solution x,y only.
P: 606
 Quote by pyfgcr The linear Diophantine equations: ax+by=c, a,b,c is natural numbers. If c is a multiple of gcd(a,b), there is infinite integer solutions, and I know how to find x,y. However, I wonder how to find positive integer solution x,y only.

They may not exists. For example, the equation $\,7x+6y=5\,$ cannot have positive solutions, but it has

solutions, like $\,(5,-6)\,$

DonAntonio
 P: 105 Shouldn't that be (5,-5)?
P: 606

## Positive solution for linear Diophantine equations

 Quote by Mensanator Shouldn't that be (5,-5)?

Yes, you're right of course. Thanks.

DonAntonio
 PF Patron Sci Advisor Thanks Emeritus P: 38,400 All solutions of the Diophantine equation ax+ by= c (assuming a, b, relatively prime) are of the form x= x0+ kb, y= y0- ka for k any integer. If you want both x and y positive, you must be able to choose k so that those are postive. Whether that is possible, of course, depends on a, b, x0, and y0.

 Related Discussions Linear & Abstract Algebra 1 Calculus & Beyond Homework 1 Calculus & Beyond Homework 2 Calculus & Beyond Homework 8 Linear & Abstract Algebra 3