[Math] Methods for solving Pell’s equation

diophantine equationsnt.number-theory

It is known that the minimum solution of Pell's equation $x^2-dy^2=\pm1$ can be found from the continued fraction expansion of $\sqrt d$. Are there other methods for finding the minimum (or any other) solutions?

Best Answer

The basic and classical methods, apart from brute force, are

  • continued fraction expansions (regular, nearest integer, etc.) or, equivalently, some form of reduction theory for indefinite binary quadratic forms;

  • computing many elements of small norm in a quadratic number field, which often is a lot more effective; the technique used here is also used for factoring integers.

For a detailed algorithmic description see Jacobson & Williams (Solving the Pell Equation) or Buchmann & Vollmer (Binary Quadratic Forms).

In addition, you can compute a power of the fundamental unit from the class number formulas, which essentially consists in taking norms of suitable cyclotomic units. Kronecker has shown how to solve the Pell equation using elliptic and modular functions, and Girstmair (Kronecker's solution of the Pell equation on a computer {Kroneckers Lösung der Pellschen Gleichung auf dem Computer], Math. Semesterber. 53, 45-64 (2006)) has shown that it can be made to work in practice.

You can also imitate the theory of descent on elliptic curves; I have sketched connections with classical tricks in some preprints on higher descent on Pell conics.

Related Question