The two points given us two equations:
. . . . .aq + b = 39
. . . . .ap + b = 18
Multiplying the first by p and the second by q, and then subtracting the first from the second, we get:
. . . . .apq + bp = 39p
. . . . .apq + bq = 18q
. . . . .b(q - p) = 18q - 39p
. . . . .b = (18q - 39p) / (q - p)
Now think about the slope. Clearly, m = a. Using the given points, we also get:
. . . . .a = [39 - 18] / [q - p] = 21/(q - p) = m
Since a is integral, then a equals 21, 7, 3, or 1, depending on the value of q - p. Consider cases:
. . . . .a = 21, so q - p = 1 and q = p + 1:
. . . . .b = (18(p + 1) - 39p) / 1
. . . . .b = (18p + 18 - 39p) / 1
. . . . .b = 18 - 21p
Since p is a whole number, then 18 - 21p < 0. But b > 0. So a cannot be 21.
. . . . .a = 7, so q - p = 3 and q = p + 3:
. . . . .b = (18(p + 3) - 39p) / 3
. . . . .b = (18p - 39p + 18×3) / 3
. . . . .b = (-21p + 18×3) / 3
. . . . .b = 18 - 7p
If p = 1, then b = 11 and q = 4. But a = 7 and b < a, so p cannot be 1.
If p = 2, then b = 4 and q = 5.
And p cannot be 3 or more.
. . . . .a = 3, so q - p = 7 and q = p + 7:
. . . . .b = (18×7 - 21p) / 7
. . . . .b = 18 - 3p
If p = 1, then b = 15 and q = 8. But a = 3 and b < a, so p cannot be 1.
If p = 2, then b = 12. But this won't work, either.
In fact, for b < a = 3, we must have 18 - 3p < 3, so 15 < 3p, and p > 5.
If p = 6, then b = 0. But b > 0. So we cannot have a = 3.
. . . . .a = 1, so q - p = 21 and q = p + 21:
. . . . .b = (18×21 - 21p) / 21
. . . . .b = 18 - p
But there are no integers b such that b < a = 1. So we don't need to consider values for p, because a cannot be 1.
Go back through the cases. Which one worked?
Eliz.