You are on page 1of 3

7/16/2016 IMOmath: 

Solutions to Pell’s Equation

Log In     Register    

IMOmath Olympiads Book Training IMO Results

Forum

Pell’s Equation (Table of contents)

Solutions to Pell’s Equation
A Pell’s equation has one trivial solution, (x, y) = (1, 0) , corresponding to solution z = 1  of
equation N (z) = 1 . But if we know the smallest non­trivial solution, then we can derive all the
solutions. This is what the following statement claims.

Theorem 2
 
If z0  is the minimal element of Z[√d]  with z0 > 1  and N (z0 ) = 1 , then all the elements
z ∈ Z[√d ]  with N z = 1  are given by z = ±z , n ∈ Z .
n
0

Hide proof

Suppose that N (z) = 1  for some z > 0 . There is a unique integer k for which 


k
. Then the number z1  satisfies 1  and 
k k+1 −k
z ≤ z < z = zz = z¯
z¯¯
¯¯
0
≤ z1 < z0
0 0 0

N (z1 ) = N (z)N (z0 )


−k
= N (z) = 1 . It follows from the minimality of z0  that z1 = 1

and hence z = z
0
k
.

Corollary
 
If (x0 , y0 )  is the smallest solution of the Pell’s equation with d  given, then all natural
solutions (x, y)  of the equation are given by x + y√d = ±(x0 + y0 √d) n , n ∈ N .

¯
¯ ¯
¯
z+z̄
Note that z  determines x and y  by the formulas x  and y . Thus
z−z̄
= x + y√d = =
2 2√ d

all the solutions of the Pell’s equation are given by the formulas
n n n n
z +¯
z¯¯
¯¯
0
z −¯
z¯¯
¯¯
0
0 0
x = i y = .
2 2√d

Example
 

2 2
http://imomath.com/index.php?options=616&lmm=0 − 2 = 1 ( , ) = (3, 2) 1/3
7/16/2016 IMOmath: Solutions to Pell’s Equation

The smallest non­trivial solution of the equation x2 − 2y 2 = 1 is (x, y) = (3, 2) .


Therefore for every solution (x, y)  there is an integer n  such that 
x + y√d = ±(3 + 2√2) . Thus
n

n n n n
(3 + 2√2) + (3 − 2√2) (3 + 2√2) − (3 − 2√2)
x = , y = .
2 2√2

Now we will show that every Pell’s equation indeed has a non­trivial solution.

Lemma 1 (Dirichlet’s theorem)
 
Let α  be an irrational number and n  be a positive integer. There exist p ∈ Z  and 
p
 such that  .
1
q ∈ {1, 2, … , n} ∣α − ∣ <
∣ q ∣ (n+1)q

Hide proof

The stated inequality is equivalent to |qα − p| <
1
.
n+1

Let, as usual, {x}  denote the fractional part of real x. Among the n + 2  numbers 0 , 


, {2α} , …, {nα} , 1  in the segment [0, 1], some two will differ by less than  n+1 . If
1
{α}

such are the numbers {kα}  and {lα} , it is enough to set q = |k − l|; and if such are 


{kα}  and 0 or 1, it is enough to set q = k . In either case, p  is the integer closest to kα .

Lemma 2
 
If α  is an arbitrary real number, then there exist infinitely many pairs of positive integers 
p
(p, q)  satisfying ∣ .
1

∣α − q ∣ < q
2

Hide proof

This lemma immediately follows from Dirichlet’s theorem.

Theorem 3
 
A Pell’s equation has a solution in the set of positive integers.

Hide proof

Applying Lemma 2 to α = √d , we see that there exists an integer n  with 


|n| < 2√d + 1  such that the equation x − dy = n  has infinitely many positive
2 2

integral solutions (x, y) . It follows that there are two different ones, say (x1 , y1 )  and 

http://imomath.com/index.php?options=616&lmm=0 = + √ 2/3
7/16/2016 IMOmath: Solutions to Pell’s Equation

, that satisfy x1 ≡ x2  and y1 ≡ y2  {\rm (mod n )}. Denote z1 = x1 + y1 √d


(x 2 , y2 )

and z2 = x2 + y2 √d  and assume z1 > z2 . Then z0 = z1 /z2 > 1  is an element of 


Z[√d ]  of norm 1 and corresponds to a non­trivial solution (x 0 , y0 )  of the Pell’s equation.

Pell’s Equation (Table of contents)

2005­2016 IMOmath.com | imomath"at"gmail.com | Math rendered by MathJax
Home | Olympiads | Book | Training | IMO Results | Forum | Links | About | Contact us

http://imomath.com/index.php?options=616&lmm=0 3/3

You might also like