0% found this document useful (0 votes)
19 views7 pages

Pell

Uploaded by

dgatttto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views7 pages

Pell

Uploaded by

dgatttto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Pell’s Equation

Handout for MATHS 714

Let A be a positive integer which is not a perfect square. The equation

x2 − Ay 2 = 1 (1)

is called Pell’s equation.


The requirement that A is not the square of a whole number is equivalent to the fact

that the number A is irrational. It is very important! In this case the set of numbers

Q( A) consisting of

p + q A, p, q ∈ Q, (2)

are quadratic irrationalities with the following properties:


√ √ √
(p + q A) + (r + s A) = (p + r) + (q + s) A, (3)
√ √ √
(p + q A)(r + s A) = (pr + qsA) + (ps + qr) A, (4)
√ 1 √
(p + q A)−1 = 2 (p − q A). (5)
p − q2A
2
Note that if p2 − q 2 A = 0, then either p = q = 0 or q 6= 0. In the latter case A = pq2
√ √
or A = pq which is a contradiction. Thus p2 − q 2 A 6= 0 unless p + q A = 0 which is
equivalent to p = q = 0, and the inverse (5) exists for every non-zero quadratic irrationality

(2). This number deserves a special notation and for u = p + q A we denote N (u) =
p2 − q 2 A.
In relation to the solutions of (1) we will be especially interested in quadratic irra-
tionalities

z1 + z2 A, z1 , z2 ∈ Z.

This set of numbers we will denote Z( A).
√ √ √
Proposition 1. Let u, v ∈ Z( A), then u+v, uv ∈ Z( A). If u ∈ Z( A) and N (u) = 1,

then u−1 ∈ Z( A).

1

Proof. Let us denote ū = p − q A, then the formula (5) can be written as uū = N (u).
Thus we have
ū √
u−1 = = ū ∈ Z( A).
N (u)

Inspecting (4) and replacing q by −q and s by −s we also get

ūv̄ = uv. (6)

(Note the analogy with the complex numbers!) Formulae (5) and (6) also imply a very
important formula
N (uv) = N (u)N (v). (7)
Indeed, we have N (uv) = uvuv = uvūv̄ = uūvv̄ = N (u)N (v).
It is time now to relate these properties of the new function N (x) to the solutions of
(1) and also to the solutions of the equation

x2 − Ay 2 = k, k ∈ Z. (8)

Proposition 2. A pair of integers (x, y) is a solution to Pell’s equation (8) if and only if

N (u) = k for u = x + y A. In particular, a pair of integers (x, y) is a solution to Pell’s
equation (1) if and only if N (u) = 1.

Proof. As N (u) = x2 − Ay 2 we see that the statement N (u) = 1 is simply a reformulation


of the statement that the pair (x, y) is a solution to the equation (1).

Theorem 1. Suppose that a pair of integers (a, b) is a solution to Pell’s equation (1) and

(x, y) is an arbitrary solution to the Diophantine equation (8). Let us denote u = x+y A,

v = a + b A, and
√ √
uv = (xa + ybA) + (xb + ya) A = x′ + y ′ A, (9)

where x′ = xa + ybA and y ′ = xb + ya. Then this pair of integers (x′ , y ′ ) is also a solution
to the equation (8).

Proof. This follows from the multiplicative property of the norm. Indeed, N (uv) =
N (u)N (v) = 1 · k = k.

This theorem gives us a very important tool to obtain a number of solutions of (8) if we
know at least one solution of (1) different from the trivial solution (1, 0). We reformulate
Theorem 1 now in terms of geometric transformations of the plane.

2
Theorem 2. Suppose that a pair of integers (a, b) is a solution to Pell’s equation (1).
Let us consider a linear transformation of the plane (x, y) → (x′ , y ′ ), where

x′ = ax + bAy,
y ′ = bx + ay.

Then this transformation maps the solutions of (8) again onto the solutions of (8).

It is clear now why the solution (1, 0) of (1) is called trivial. It is because of the fact
that the corresponding linear transformation for a = 1 and b = 0 is simply the identity
transformation.

Example 1. Let us consider the equation

x2 − 2y 2 = 1. (10)

It has a nontrivial solution (x, y) = (3, 2). Then the following linear transformation

x′ = 3x + 4y,
y ′ = 2x + 3y

will produce more solutions of


x2 − 2y 2 = k.
if we know one. For example, we can get some more solutions of (10). Applying twice the
linear transformation to the pair (3, 2) we get two more solutions of (10):

(3, 2) → (17, 12) → (99, 70).

Or else the solution (5, 3) to the equation

x2 − 2y 2 = 7

gives us another solution of this equation, namely: (5, 3) → (27, 19).

It is clear now that it is important to prove that the equation (1) always has a nontrivial
solution for every positive integer A which is not the square of a whole number. We shall
start proving this with the following

Lemma 1. Let α be an irrational number. Then for every positive integer t the inequality
p 1
α− < . (11)
q tq
has an integer solution (p, q) such that 1 ≤ q ≤ t.

3
Proof. Let [γ] be the integer part and {γ} be the fractional part of a real number γ, i.e.,
  √  √ √
[γ] ∈ Z and 0 ≤ {γ} < 1. (For example, 23 = 1, { 32 } = 21 , and 5 = 2, { 5} = 5−2.)
It is always true that γ = [γ] + {γ}.
Let us divide the unit interval [0, 1) (where 0 is included and 1 is not) into t intervals
     
1 1 2 t−1
0, , , , ... , ,1 (12)
t t t t
of equal length 1/t. Let us consider t + 1 numbers {αk}, k = 1, 2, . . . , t + 1. By Pigeonhole
Principle at least two of them, say {αk1 } and {αk2 }, will be situated in the same interval
of the partition (12) of the unit interval. Thus
1
|{αk1 } − {αk2 }| < .
t
Replacing here {αki } by αki − [αki ] we get
1
|αk1 − [αk1 ] − (αk2 − [αk2 ])| < .
t
or |qα − p| < 1t , where q = k1 − k2 and p = [αk1 ] − [αk2 ]. Dividing by q we get (11). It is
clear that q ≤ (t + 1) − 1 = t.

Corollary 1 (Dirichlet). Let α be an irrational number. Then the inequality


p 1
α− < 2. (13)
q q
has infinitely many integer solutions (p, q).

Proof. As
p 1 1
α− < ≤ 2
q tq q
we see that every solution to (11) is also a solution to (13). It is also clear that as t grows
more and more new solutions of (13) will emerge.

Lemma 2. For some integer k such that |k| < 2 A + 1 the equation

x2 − Ay 2 = k

has infinitely many integer solutions.


√ p

Proof. Let (p, q) be a solution to the inequality (13) with α = A. Then q
< A+1
and
√ p √ p 1 √ p √
p2 − Aq 2 = q 2 A− · A+ < q2 · 2 · A + < 2 A + 1.
q q q q

4
Therefore |p2 − Aq 2 | can take only finitely many integer values k satisfying
√ √
−(2 A + 1) < k < 2 A + 1.

As the inequality (13) has infinitely many solutions by Pigeonhole Principle for some k
in this range the equation x2 − Ay 2 = k also has infinitely many integer solutions.

Lemma 3. There exist a nonzero integer k and two positive integers 0 ≤ a, b < |k| such
that the equation (8) has infinitely many integer solutions (x, y) such that x ≡ a (mod |k|)
and y ≡ b (mod |k|).

Proof. Let k be such that the equation (8) has an infinite number of solutions. Such k
exists according to Lemma 2. We assume that k 6= −1 and we consider this case later.
We need Pigeonhole Principle again. For an arbitrary solution (x, y) of (8) we have
x ≡ i (mod |k|) and y ≡ j (mod |k|) for some 0 ≤ i, j ≤ |k|. As we have k possibilities
for i and k possibilities for j, in total, we have k 2 possibilities for the pair (i, j). Again
we have a finite number of boxes and infinite number of solutions to (8) to go into them.
Therefore there will be an infinite number of solutions at least in one of them.

Theorem 3. For every positive integer A which is not the square of a whole number Pell’s
equation (1) has a nontrivial integer solution (a, b) 6= (1, 0).

Proof. The idea of constructing a solution to Pell’s equation is as follows. Let (x1 , y1 )

and (x2 , y2 ) be two distinct solutions to (8). This means that for u1 = x1 + y1 A and

u2 = x2 + y2 A we have N (u1 ) = N (u2 ) = k. Since N (u1 u−12 ) = N (u1 )N (u2 )
−1
= 1, the
−1

idea is to consider v = u1 u2 = a + b A. Then N (v) = 1, hence (a, b) is a solution of (1).
We now have to take care of two things: to secure that a and b are integers and to check
that this solution is nontrivial. To deal with the first problem let us calculate a and b:
 √ 
 √  x2 − y2 A (x1 x2 − Ay1 y2 ) (x1 y2 − x2 y1 ) √
v = x1 + y1 A = + A,
k k k
whence
(x1 x2 − Ay1 y2 ) (x1 y2 − x2 y1 )
a= , b= . (14)
k k
Let (x1 , y1 ) and (x2 , y2 ) be two distinct solutions to (8) such that

x1 ≡ x2 (mod |k|) y1 ≡ y2 (mod |k|),

which existence is guaranteed by Lemma 3. Then

x1 x2 − Ay1 y2 ≡ x21 − Ay12 ≡ 0 (mod |k|),

5
and
x1 y2 − x2 y1 ≡ x1 y1 − x1 y1 ≡ 0 (mod |k|).

Therefore in (14) a and b are integers.


We need to prove now that the solution obtained is a nontrivial one. Suppose that

(a, b) = (1, 0). In this case v = u1 u−1
2 = 1 + 0 A = 1 and u1 = u2 . This contradiction
completes the proof.

Exercise 1. Let k 6= 1 be an integer and A be a positive integer which is not the square
of a whole number. Suppose that the equation (8) has at least one solution. Then it has
infinitely many solutions.

We can say much more about the solutions to Pell’s equation. We need the following
comment.

Lemma 4. Let (x, y) be an integer solution to Pell’s equation (1) and u = x + y A.

1. If x > 0 and y > 0, then u > 1;

2. If x > 0 and y < 0, then 0 < u < 1;

3. If x < 0 and y > 0, then −1 < u < 0;

4. If x < 0 and y < 0, then u < −1;


√ √ √
Proof. Suppose x > 0 and y > 0. Since (x − y A)(x + y A) = 1, we have x − y A > 0
√ √
and x + y A > x − y A. Hence u > 1 and ū < 1. This proves the first two statements.
The third and the forth statements follow from the first two.

Definition 1. Let (a, b) be a nontrivial solution to Pell’s equation (1) with positive integer
components a > 0, b > 0. We say that this solution is fundamental if the number u =

a + b A takes the minimal possible value.
√ √
Note that the number u is uniquely determined since a + b A = a′ + b′ A implies
√ √
(b − b′ ) A = a′ − a and A is rational unless b = b′ and a = a′ . Let us also note that
u > 1 by Lemma 4.

Theorem 4. Let (x1 , y1 ) be the fundamental solution to Pell’s equation (1) and u =

x1 + y1 A. Let

un = xn + yn A, n = 0, 1, 2, . . . (15)

Then (±xn , ±yn ), n = 0, 1, 2, . . ., is the complete set of solutions to Pell’s equation.

6
Proof. The trivial solution (1, 0) is in this set and we get it for n = 0. Let (x, y) be
an arbitrary nontrivial solution to Pell’s equation. We may assume that x > 0. Since
√ √
(x + y A)−1 = x − y A, we may also assume that y > 0. All we need to show is that

v = x + y A can be represented as un for some positive integer n. Let us assume the
contrary. As x > 0 and y > 0, we know that v > 1. Since u > 1 the terms of the sequence
1, u, u2 , . . ., un , . . . get arbitrary large, thus there exists n such that un < v < un+1 . Let
us multilply this inequality by (un )−1 . We get

1 < v(un )−1 < u, (16)



where v(un )−1 = x̄ + ȳ A for some x̄, ȳ ∈ Q. Let us make a number of observations.
√ √
Firstly, (un )−1 = (u−1 )n = (x1 − y1 A)n . This means that (un )−1 ∈ Z( A) and hence

v(un )−1 ∈ Z( A), i.e., x̄, ȳ are integers. Secondly, N (v(un )−1 ) = N (v)N (u)−n = 1 and
(x̄, ȳ) is a solution to Pell’s equation. Thirdly, by Lemma 4 and (16) we get x̄ > 0, ȳ >
0 because of the inequality 1 < v(un )−1 . Finally, this contradicts to (16), namely to
v(un )−1 < u, since u was fundamental. The theorem is proved.

Exercise 2. Suppose that a pair of integers (x1 , y1 ), x1 > 0, y1 > 0, is a solution to Pell’s
equation x2 − Ay 2 = 1. Then this solution is fundamental if and only if y1 is minimal
among all integers solutions with positive components.

This Exercise gives us an algorithm how to find the minimal solution. We have to try
subsequently y1 = 1, 2, . . . until a matching x1 is found. This algorithm is not an efficient
one. For example, for the equation x2 − 109y 2 = 1 the minimal solution (x1 , y1 ) will have
y1 = 15140424455100. A better algorithm is beyond the scope of this lecture.

You might also like