What this move does
The equation is a single equation with two unknowns, so its solutions are not pinned down: it is called a Diophantine equation, and we only want its integer solutions, that is, the lattice points on the line.
When there are solutions, let be one of them. Then all the solutions are
- Find . If , there are no integer solutions and you are done.
- Find a particular solution : with small numbers, by trying; with big ones, by running the Euclidean algorithm and working backwards.
- Write down the general solution, then use what the problem asks for (positive integers, a certain range) to decide which values can take.
Predict first
How many integer solutions does have?
The left side is , a multiple of whatever integers and are. The right side, , is not. In the picture, the line slips through the gaps between the lattice points without touching a single one. Drag to and look again.
Work through one
Example: find all positive integer solutions of 4x + 7y = 53
Step 1 / 5- First ask whether there are solutions
, and divides every number. There are solutions.
When you can't find a particular solution by trying
When the coefficients are big, let the Euclidean algorithm find one for you. First solve , then scale the whole solution up by .
Systems: eliminate first
With three unknowns and two equations, eliminate one unknown first and you are back in the situation above.
Example (the “Hundred Fowls Problem”, from the ancient Chinese Zhang Qiujian Suanjing) A rooster costs coins, a hen costs coins, and chicks cost coin. With coins you buy birds. How many of each do you buy?
Let there be roosters, hens and chicks: and . Multiply the second equation by and subtract the first to eliminate :
A particular solution is , the general solution is , , and then . For none of the three to be negative, :
When it fails
Break it
Counterexample lab: remove one condition
Conclusion: has integer solutions ← still true?
: and . There is a lattice point on the line every .
Change just the to .
The line is squeezed between the two dashed lines and . Lattice points only lie on lines like these dashed ones (where is a multiple of ), so this line has no lattice points at all.
Practice
How many positive integer solutions does have?
has integer solutions, and . What can be?
Write as “a positive multiple of ” plus “a positive multiple of ”: with , positive integers. Find .
There are only -cent and -cent stamps (as many of each as you like). What is the largest postage, in cents, that cannot be made?