411 REFERENCE · Wikibooks
Mathematics Foundations/3.5 Diophantine Equations
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Diophantine Equations
Introduction
Diophantine equations are polynomial equations with integer coefficients for which integer solutions are sought. Named after the ancient Greek mathematician Diophantus of Alexandria (c. 200-284 CE), these equations have been studied for millennia and remain an active area of research in number theory. This section explores various types of Diophantine equations, methods for solving them, and their applications.
Linear Diophantine Equations
The Equation ax + by = c
The simplest form of a Diophantine equation is the linear equation in two variables:
where , , and are integers, and we seek integer solutions for and .
Theorem: The linear Diophantine equation has integer solutions if and only if (i.e., the greatest common divisor of and divides ).
Proof:
If has an integer solution , then . Since any common divisor of and divides , it must also divide . In particular, .
Conversely, if , then for some integer . By Bézout's identity, there exist integers and such that . Multiplying both sides by , we get . Therefore, and is an integer solution to . ∎
Finding All Solutions
If is a particular solution to , then all solutions are given by:
where is an arbitrary integer.
Proof: Suppose is another solution. Then:
and
Subtracting, we get , which simplifies to .
Let , , and . Then . Since , must divide , so for some integer . Similarly, .
Therefore, and . ∎
Example: Solve
First, we check if a solution exists by calculating . Since , solutions exist.
Using the Euclidean algorithm:
Working backwards to express in terms of and :
Multiplying by :
So a particular solution is and .
All solutions are given by:
for any integer .
Linear Diophantine Equations with More Variables
The equation has integer solutions if and only if .
To solve such equations, we can reduce them to equations with fewer variables by grouping terms and applying the method for two variables recursively.
Quadratic Diophantine Equations
Pythagorean Triples
A Pythagorean triple is a set of three positive integers , , and that satisfy the Pythagorean theorem:
This is one of the most famous quadratic Diophantine equations.
Theorem: All primitive Pythagorean triples (where ) can be parametrized as:
where are coprime integers and one of them is even and the other is odd.
Proof: If , we can write , which represents a point on the unit circle. Using the rational parametrization of the circle, we set and for some rational .
Let in lowest terms. Then:
For these to be integers and the triple to be primitive, we must have , giving and . ∎
Examples of Pythagorean triples:
:
:
:
:
Pell's Equation
Pell's equation is a quadratic Diophantine equation of the form:
where is a positive non-square integer, and we seek integer solutions for and .
Theorem: Pell's equation always has infinitely many solutions for any positive non-square integer .
The smallest positive solution can be found using the continued fraction expansion of . Once this fundamental solution is found, all other solutions can be generated using the recurrence relation:
Example: For , the fundamental solution is since .
The next few solutions are:
since
since
The Equation x² + y² = z²
The equation is closely related to Pythagorean triples, but we can also consider cases where , , and are not all positive.
For instance, the equation can be rewritten as , which is an example of a quadratic form in three variables.
The Equation x² + y² = n
The equation , where is a positive integer, asks for ways to represent as a sum of two squares.
Theorem (Fermat): A positive integer can be expressed as a sum of two squares if and only if every prime factor of with occurs with an even exponent in the prime factorization of .
Example: can be expressed as a sum of two squares () because both 5 and 13 are congruent to 1 modulo 4.
In contrast, cannot be expressed as a sum of two squares because 3 is congruent to 3 modulo 4 and appears with an odd exponent.
Higher-Degree Diophantine Equations
Fermat's Last Theorem
Fermat's Last Theorem states that the equation has no positive integer solutions for .
This theorem was conjectured by Pierre de Fermat in 1637 but remained unproven until Andrew Wiles provided a proof in 1994, after more than 350 years of effort by mathematicians.
The Equation x³ + y³ = z³
As a special case of Fermat's Last Theorem, the equation has no non-zero integer solutions.
However, the related equation does have integer solutions, such as and .
Taxicab Numbers
A taxicab number is the smallest number that can be expressed as a sum of two positive cubes in different ways.
This number is famous from the anecdote where G. H. Hardy mentioned to Ramanujan that he had taken taxi number 1729, which seemed uninteresting, to which Ramanujan immediately replied that it was actually quite interesting as the smallest number expressible as a sum of two cubes in two different ways.
The Equation x² - Dy² = n
A generalization of Pell's equation is , where is a positive non-square integer and is a non-zero integer.
If is a solution to and is a solution to Pell's equation , then new solutions to can be generated using:
for .
Systems of Diophantine Equations
Systems of Diophantine equations involve multiple equations that must be satisfied simultaneously. These systems can be particularly challenging to solve.
Linear Systems
For systems of linear Diophantine equations, techniques from linear algebra combined with number theory can be applied. The Chinese Remainder Theorem is often useful for solving certain types of linear systems.
Mixed Systems
Systems involving both linear and non-linear Diophantine equations require specialized techniques, often tailored to the specific problem.
Computational Methods
Algorithms for Linear Diophantine Equations
Linear Diophantine equations can be solved using the Extended Euclidean Algorithm to find Bézout coefficients.
Algorithm for solving :
1. Compute using the Euclidean algorithm
2. If , there are no solutions
3. Otherwise, find integers and such that using the Extended Euclidean Algorithm
4. A particular solution is and
5. All solutions are given by and for integer
Computational Complexity
The computational complexity of solving Diophantine equations varies greatly depending on the type of equation:
Linear Diophantine equations can be solved in polynomial time
For many higher-degree Diophantine equations, determining whether a solution exists is undecidable (by Matiyasevich's theorem, resolving Hilbert's tenth problem)
Even when solutions exist, finding them can be computationally intensive
Applications
Number Theory
Diophantine equations are central to number theory and have connections to many other areas, such as:
Modular arithmetic
Algebraic number theory
Elliptic curves
Cryptography
Some cryptographic systems rely on the difficulty of solving certain Diophantine equations. For example, elliptic curve cryptography uses equations of the form over finite fields.
Combinatorial Problems
Many combinatorial problems can be formulated as Diophantine equations. For example, the coin problem (or Frobenius coin problem) asks for the largest amount that cannot be expressed using given coin denominations, which relates to linear Diophantine equations.
Computer Science
In computer science, Diophantine equations arise in various contexts:
Program verification
Scheduling problems
Resource allocation
Historical Notes
Diophantine equations have a rich history dating back to ancient civilizations:
Ancient Babylonians (c. 1800 BCE) solved specific cases of quadratic Diophantine equations
Diophantus of Alexandria (c. 200-284 CE) wrote "Arithmetica," a collection of problems leading to various Diophantine equations
Pierre de Fermat (1607-1665) made significant contributions, including his famous "Last Theorem"
Joseph-Louis Lagrange (1736-1813) and Leonhard Euler (1707-1783) developed methods for solving various types of Diophantine equations
Carl Friedrich Gauss (1777-1855) made important advances in the theory of quadratic forms
Yuri Matiyasevich (1947-present) proved in 1970 that there is no general algorithm for determining whether an arbitrary Diophantine equation has integer solutions, resolving Hilbert's tenth problem
Exercises
1. Solve the linear Diophantine equation .
2. Find all integer solutions to where .
3. Determine whether the equation has integer solutions. If it does, find one.
4. Find all primitive Pythagorean triples where .
5. Solve Pell's equation . Find the three smallest positive solutions.
6. Determine all integers that can be expressed as a sum of two squares.
7. Find all integer solutions to the system:
8. Prove that the equation has no non-zero integer solutions.
9. Find all integer solutions to .
10. Show that the equation has infinitely many integer solutions.