Overview
A Diophantine equation is an algebraic equation where we are strictly looking for integer solutions. The most fundamental type is the Linear Diophantine Equation, which takes the form , where are given integers, and are unknown integers.
Geometrically, the equation represents a line in the Cartesian plane. Solving the Diophantine equation means finding the exact points on this line where both the x-coordinate and y-coordinate are integers (often called lattice points).
Key Ideas
- Existence of Solutions (Bézout's Identity): The equation has integer solutions if and only if the greatest common divisor divides . If , no integer solutions exist.
- Finding a Base Solution: If the numbers are small, guess and check. If they are large, use the Extended Euclidean Algorithm to work backward and find a base solution .
- Generating the Infinite Solution Set: Once you have one valid point , you can find all other integer points on the line using the slope. The general solution is: where is any integer. Notice how as steps forward by the reduced coefficient, must step backward by the reduced coefficient to keep the sum balanced.
Worked Examples
Example 1: Finding the General Solution
Find all integer solutions to .
1. Check for existence: First, compute . We check if . Since , integer solutions exist.
2. Simplify the equation: Divide the entire equation by the GCD to make the coefficients coprime:
3. Find a base solution: By inspection, . So, is a valid base solution.
4. Write the general solution: Using the simplified coefficients and , we apply the general formula. As increases by , must decrease by : where .
Example 2: Recognizing When No Solutions Exist
Does the equation have any integer solutions?
1. Check for existence: Compute . We then check if . Since is not a multiple of , Bézout's Identity tells us that it is impossible to form the sum of using integer multiples of and . Conclusion: There are no integer solutions.
Example 3: Word Problems and Real-World Constraints
A farmer buys chickens for dollars each and pigs for dollars each. If he spends exactly dollars, what are all the possible combinations of chickens and pigs he could have bought?
1. Set up the equation: Let be the number of chickens and be the number of pigs. Because he is buying physical animals, we have a real-world constraint: and .
2. Isolate one variable: It is usually easiest to isolate the variable with the smaller coefficient.
3. Test valid inputs: Since must be an integer, must be a multiple of . We test non-negative integers for :
- If : (Not an integer)
- If : (Not an integer)
- If : . Valid solution:
- If : (Not an integer)
- If : (Not an integer)
- If : . Valid solution:
- If : (Not an integer)
- If : (We stop here because is now negative).
Conclusion: The farmer could have bought 8 chickens and 2 pigs, or 3 chickens and 5 pigs.
Common Pitfalls
- Forgetting to divide by the GCD: When writing the general solution, students often use the original coefficients (e.g., and ). You must divide and by to ensure you don't skip over valid integer points between your steps.
- Sign errors in the general solution: Remember that one variable must increase while the other decreases to maintain the constant sum .
- Ignoring constraints: In word problems, variables often represent physical quantities that cannot be negative. Always bounds-check your general solution against and if the context demands it.
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
Module Progress:
Join the AoPS Community!
Stuck on a problem, or don't understand a module? Join the AoPS community and get help from other math contest students.
