next up previous
Next: Units in Real Quadratic Up: Lecture 20: Continued Fractions Previous: Recognizing Rational Numbers

Pell's Equation

In February of 1657, Pierre Fermat issued the following challenge:
Given a positive integer $ d$, find a positive integer $ y$ such that $ dy^2 + 1$ is a perfect square.
In other words, find a solution to $ x^2 - dy^2 = 1$ with $ y\in\mathbb{N}$.

Note Fermat's emphasis on integer solutions. It is easy to find rational solutions to the equation $ x^2 - dy^2 = 1$. Simply divide the relation

$\displaystyle (r^2+d)^2 - d(2r)^2 = (r^2-d)^2
$

by $ (r^2 - d)^2$ to arrive at

$\displaystyle x = \frac{r^2+d}{r^2-d}, \qquad
y = \frac{2r}{r^2-d}.
$

Fermat said: ``Solutions in fractions, which can be given at once from the merest elements of arithmetic, do not satisfy me.''

The equation $ x^2 - dy^2 = 1$ is called Pell's equation. This is because Euler (in about 1759) accidently called it ``Pell's equation'' and the name stuck, though Pell (1611-1685) had nothing to do with it.

If $ d$ is a perfect square, $ d=n^2$, then

$\displaystyle (x+ny)(x-ny) = x^2-dy^2 = 1
$

which implies that $ x+ny = x-ny = 1$, so

$\displaystyle x = \frac{x+ny+x-ny}{2} = \frac{1+1}{2}=1.
$

We will thus always assume that $ d$ is not a perfect square. You can read about Pell's equation in Section 0.6 of Kato-Kurokawa-Saito and on pages 107-111 of Davenport. Pell's equation is best understood in terms of units in real quadratic fields.


next up previous
Next: Units in Real Quadratic Up: Lecture 20: Continued Fractions Previous: Recognizing Rational Numbers
William A Stein 2001-10-29