Pell Equation — Definition, Formula & Examples
A Pell equation is a Diophantine equation of the form , where is a positive integer that is not a perfect square and you seek integer solutions for and . It always has infinitely many solutions, and all of them can be generated from a single smallest positive solution called the fundamental solution.
Given a positive nonsquare integer , the Pell equation has a fundamental solution with that minimizes . Every positive solution is obtained from the recurrence for . The fundamental solution can be found via the convergents of the continued fraction expansion of .
Key Formula
Where:
- = Positive integer to be determined
- = Positive integer to be determined
- = A fixed positive integer that is not a perfect square
How It Works
To solve a Pell equation, first compute the continued fraction expansion of . The expansion is periodic, and the convergent at the end of the first complete period (or twice the period) gives the fundamental solution , . Once you have , generate all further solutions by expanding and collecting integer and irrational parts. Alternatively, use the recurrence and .
Worked Example
Problem: Find the fundamental solution and the next solution to the Pell equation x² − 2y² = 1.
Step 1: The continued fraction of √2 is [1; 2, 2, 2, ...] with period length 1. The first convergent at the end of the period is 3/2.
Step 2: Test x = 3, y = 2 as the fundamental solution.
Step 3: Generate the next solution using (x₁ + y₁√2)² = (3 + 2√2)².
Answer: The fundamental solution is (3, 2). The next solution is (17, 12), since 17² − 2(12²) = 289 − 288 = 1.
Why It Matters
Pell equations appear in problems about rational approximation of square roots, in algebraic number theory when studying the unit group of real quadratic fields, and in competition mathematics. Archimedes' famous cattle problem reduces to a Pell equation with enormous solutions.
Common Mistakes
Mistake: Trying D values that are perfect squares, such as D = 4 or D = 9.
Correction: When D is a perfect square, x² − Dy² = 1 factors over the integers and has only the trivial solution (x, y) = (1, 0). The Pell equation requires D to be a nonsquare positive integer.
