Diophantine Equations — Pell's Equation and Thue-Mahler

  • Pell's equation x2−Dy2=1x^2 - Dy^2 = 1 always has infinitely many integer solutions for non-square DD, generated from a fundamental solution.
  • Solutions to Pell's equation correspond to units in real quadratic fields and form a group structure.
  • Thue's theorem (1909) proved that binary form equations F(x,y)=mF(x,y) = m with degree ≥ 3 have only finitely many solutions.
  • Thue-Mahler equations generalize Diophantine problems by allowing mm to have prime factors from a specified finite set.
  • These equations connect to modern techniques: continued fractions, Baker's theory of linear forms in logarithms, and S-unit equations.
  • The contrast between infinite solutions (Pell) and finite solutions (Thue-Mahler) reveals how polynomial degree and form structure control solution behavior.

Diophantine Equations — Pell's Equation and Thue-Mahler

Overview

Pell's equation, despite being named after the 17th-century mathematician John Pell (who had little to do with it), stands as one of the most elegant and thoroughly studied families of Diophantine equations. The equation x2−Dy2=1x^2 - Dy^2 = 1, where DD is a positive non-square integer, asks us to find integer solutions—a seemingly simple question that leads to profound connections with algebraic number theory, continued fractions, and the structure of quadratic fields. The fundamental fact that Pell's equation always has infinitely many solutions when DD is not a perfect square distinguishes it sharply from other Diophantine problems. The Thue-Mahler equation generalizes this classical problem by considering equations of the form F(x,y)=mF(x,y) = m, where FF is a binary form (homogeneous polynomial in two variables) of degree at least 3, and mm lies in a finitely generated multiplicative group. While Pell's equation has infinitely many solutions, Thue's theorem (1909) revolutionized the field by proving that equations F(x,y)=mF(x,y) = m with deg⁡(F)≥3\deg(F) \geq 3 have only finitely many integer solutions. The Thue-Mahler equation represents a significant generalization, allowing the right-hand side to have prime divisors from a specified finite set. These equations exemplify a fundamental principle in Diophantine analysis: the geometry of the solution set reflects deep arithmetic properties. Pell's equation corresponds to finding units in real quadratic fields, while Thue-Mahler equations connect to S-unit equations and ultimately to modern tools like Baker's theory of linear forms in logarithms and the Roth-Ridout theorem.

💡 The Core Insight

Pell's equation x2−Dy2=1x^2 - Dy^2 = 1 has infinitely many solutions governed by the fundamental solution and forms a group under a natural operation, while Thue-Mahler equations F(x,y)=mF(x,y) = m with deg⁡(F)≥3\deg(F) \geq 3 have only finitely many solutions—a dichotomy that reflects the deep connection between Diophantine equations and algebraic geometry through the genus of associated curves.

Definition

Pell's Equation: For a positive integer DD that is not a perfect square, Pell's equation is

x2−Dy2=1x^2 - Dy^2 = 1

where we seek integer solutions (x,y)∈Z2(x, y) \in \mathbb{Z}^2.

Negative Pell's Equation: The equation x2−Dy2=−1x^2 - Dy^2 = -1.

Thue Equation: For an irreducible binary form F(x,y)∈Z[x,y]F(x,y) \in \mathbb{Z}[x,y] of degree n≥3n \geq 3 and a non-zero integer mm, the Thue equation is

F(x,y)=mF(x,y) = m

where we seek integer solutions (x,y)∈Z2(x,y) \in \mathbb{Z}^2.

Thue-Mahler Equation: Let F(x,y)∈Z[x,y]F(x,y) \in \mathbb{Z}[x,y] be an irreducible binary form of degree n≥3n \geq 3, let S={p1,…,ps}S = \{p_1, \ldots, p_s\} be a finite set of primes, and let m∈Z∖{0}m \in \mathbb{Z} \setminus \{0\}. The Thue-Mahler equation is

F(x,y)=m∏i=1spiziF(x,y) = m \prod_{i=1}^{s} p_i^{z_i}

where we seek solutions (x,y,z1,…,zs)∈Z2+s(x,y,z_1,\ldots,z_s) \in \mathbb{Z}^{2+s} with gcd⁡(x,y)=1\gcd(x,y) = 1.

Core Theory

TheoremMain Results

Theorem 1 (Existence of Solutions to Pell's Equation): Let DD be a positive integer that is not a perfect square. Then the equation x2−Dy2=1x^2 - Dy^2 = 1 has infinitely many solutions in positive integers.

Theorem 2 (Fundamental Solution): Among all positive integer solutions to x2−Dy2=1x^2 - Dy^2 = 1, there exists a unique solution (x1,y1)(x_1, y_1) with minimal x1>1x_1 > 1 (equivalently, minimal y1>0y_1 > 0), called the fundamental solution. Every other positive solution (xn,yn)(x_n, y_n) is given by

xn+ynD=(x1+y1D)nx_n + y_n\sqrt{D} = (x_1 + y_1\sqrt{D})^n

for n∈Nn \in \mathbb{N}.

Theorem 3 (Thue's Theorem): Let F(x,y)∈Z[x,y]F(x,y) \in \mathbb{Z}[x,y] be an irreducible binary form of degree n≥3n \geq 3, and let m∈Z∖{0}m \in \mathbb{Z} \setminus \{0\}. Then the equation F(x,y)=mF(x,y) = m has only finitely many solutions (x,y)∈Z2(x,y) \in \mathbb{Z}^2.

Theorem 4 (Thue-Mahler Finiteness): Let F(x,y)∈Z[x,y]F(x,y) \in \mathbb{Z}[x,y] be an irreducible binary form of degree n≥3n \geq 3, let SS be a finite set of primes, and let m∈Z∖{0}m \in \mathbb{Z} \setminus \{0\}. Then the Thue-Mahler equation F(x,y)=m∏p∈SpzpF(x,y) = m \prod_{p \in S} p^{z_p} has only finitely many solutions with gcd⁡(x,y)=1\gcd(x,y) = 1.

Proof

Proof of Theorem 1 and 2: We prove these together using the theory of continued fractions and algebraic units. Step 1: Connection to units in Z[D]\mathbb{Z}[\sqrt{D}]. Note that if (x,y)(x,y) is a solution to x2−Dy2=1x^2 - Dy^2 = 1, then

N(x+yD)=(x+yD)(x−yD)=x2−Dy2=1N(x + y\sqrt{D}) = (x + y\sqrt{D})(x - y\sqrt{D}) = x^2 - Dy^2 = 1

where NN is the norm from Q(D)\mathbb{Q}(\sqrt{D}) to Q\mathbb{Q}. Thus x+yDx + y\sqrt{D} is a unit in Z[D]\mathbb{Z}[\sqrt{D}]. Conversely, any unit u=x+yD∈Z[D]u = x + y\sqrt{D} \in \mathbb{Z}[\sqrt{D}] with N(u)=1N(u) = 1 gives a solution. Step 2: Existence via continued fractions. The continued fraction expansion of D\sqrt{D} is eventually periodic:

D=[a0;a1,a2,…,ar‾]\sqrt{D} = [a_0; \overline{a_1, a_2, \ldots, a_r}]

Let pk/qkp_k/q_k denote the kk-th convergent. A classical result states that if the period length is rr, then

pr−12−Dqr−12=(−1)rp_{r-1}^2 - Dq_{r-1}^2 = (-1)^r

This gives either a solution to Pell's equation (if rr is even) or to the negative Pell equation (if rr is odd). In the latter case, (p2r−1,q2r−1)(p_{2r-1}, q_{2r-1}) satisfies p2r−12−Dq2r−12=1p_{2r-1}^2 - Dq_{2r-1}^2 = 1. Step 3: Fundamental solution. Let (x1,y1)(x_1, y_1) be the positive solution with minimal y1>0y_1 > 0 (equivalently, minimal x1>1x_1 > 1). Set ε=x1+y1D>1\varepsilon = x_1 + y_1\sqrt{D} > 1. This is the fundamental unit of Z[D]\mathbb{Z}[\sqrt{D}] among those with norm 1. Step 4: All solutions from powers. For any n∈Zn \in \mathbb{Z}, εn\varepsilon^n has norm 1. Write εn=xn+ynD\varepsilon^n = x_n + y_n\sqrt{D} where xn,yn∈Zx_n, y_n \in \mathbb{Z}. Then (xn,yn)(x_n, y_n) satisfies Pell's equation. Conversely, suppose (x,y)(x,y) is any positive solution. Then u=x+yDu = x + y\sqrt{D} is a unit with u>1u > 1. We can write u=εnu = \varepsilon^n for some n∈Zn \in \mathbb{Z} (since the units of norm 1 form a cyclic group generated by ε\varepsilon). Since u>1u > 1 and ε>1\varepsilon > 1, we have n≥1n \geq 1. The formulas for xn,ynx_n, y_n follow from the binomial expansion and the recurrence relations:

xn+1=x1xn+Dy1yn,yn+1=x1yn+y1xnx_{n+1} = x_1 x_n + Dy_1 y_n, \quad y_{n+1} = x_1 y_n + y_1 x_n

This establishes infinitely many distinct solutions and their parametrization. □

∎
Proof

Proof Sketch of Theorem 3 (Thue's Theorem): We provide an outline of the classical approach. Step 1: Reduction to approximation problem. Write F(x,y)=an∏i=1n(x−αiy)F(x,y) = a_n \prod_{i=1}^{n}(x - \alpha_i y) where αi\alpha_i are the (distinct) roots of F(x,1)F(x,1) in C\mathbb{C}. If F(x,y)=mF(x,y) = m with y≠0y \neq 0, dividing by yny^n gives

m/yn=an∏i=1n(x/y−αi)m/y^n = a_n \prod_{i=1}^{n}(x/y - \alpha_i)

For at least one root α\alpha, we must have

∣x/y−α∣≤C∣y∣−n+1|x/y - \alpha| \leq C|y|^{-n+1}

for some constant CC depending on FF and mm. Step 2: Diophantine approximation. Since FF is irreducible of degree n≥3n \geq 3, at least one root α\alpha has degree nn over Q\mathbb{Q}. The inequality above shows x/yx/y approximates α\alpha better than C∣y∣−n+1C|y|^{-n+1}. Step 3: Application of Thue-Siegel-Roth. For any algebraic number α\alpha of degree n≥2n \geq 2 and any ε>0\varepsilon > 0, the inequality

∣α−pq∣<1qn/2+1+ε\left|\alpha - \frac{p}{q}\right| < \frac{1}{q^{n/2 + 1 + \varepsilon}}

has only finitely many solutions in coprime integers p,qp, q (this is Thue's theorem on Diophantine approximation, later strengthened by Siegel and Roth). Since n≥3n \geq 3, we have n−1≥2>n/2+1n - 1 \geq 2 > n/2 + 1 for small ε\varepsilon, so the approximations forced by solutions to F(x,y)=mF(x,y) = m contradict Thue's approximation theorem for all but finitely many (x,y)(x,y). □

∎
⚠️ Common mistake

Common Misconception: Not all values of DD admit solutions to the negative Pell equation x2−Dy2=−1x^2 - Dy^2 = -1. For example, D=3D = 3 has the solution (1,1)(1,1), but D=3⋅5=15D = 3 \cdot 5 = 15 has no solutions. The negative Pell equation is solvable if and only if the period length of the continued fraction of D\sqrt{D} is odd. Additionally, students often forget that Thue's finiteness theorem says nothing about how to find the solutions—it is an existence result, not a constructive one. Effective bounds came much later through Baker's work.

mathematician

Axel Thue (1909) — Proved that irreducible Diophantine equations F(x,y)=mF(x,y) = m with deg⁡(F)≥3\deg(F) \geq 3 have only finitely many integer solutions, pioneering the use of Diophantine approximation in solving Diophantine equations.

visualization

(1,0) (3,2) (17,12) x y x² - 2y² = 1

Examples and Applications

Example1

Solving Pell's Equation for D=2D = 2 Find all positive integer solutions to x2−2y2=1x^2 - 2y^2 = 1. Solution: The continued fraction expansion of 2\sqrt{2} is [1;2‾][1; \overline{2}], which has period 1 (odd). Computing convergents:

  • p0/q0=1/1p_0/q_0 = 1/1
  • p1/q1=1+1/(2)=3/2p_1/q_1 = 1 + 1/(2) = 3/2

Since the period is odd, (p0,q0)=(1,1)(p_0, q_0) = (1,1) satisfies the negative Pell equation: 12−2(1)2=−11^2 - 2(1)^2 = -1. For the positive Pell equation, we compute (p1,q1)(p_1, q_1): indeed, 32−2(2)2=9−8=13^2 - 2(2)^2 = 9 - 8 = 1. The fundamental solution is (x1,y1)=(3,2)(x_1, y_1) = (3, 2), with ε=3+22\varepsilon = 3 + 2\sqrt{2}. All solutions come from:

(xn+yn2)=(3+22)n(x_n + y_n\sqrt{2}) = (3 + 2\sqrt{2})^n

For n=2n=2:

(3+22)2=9+122+8=17+122(3 + 2\sqrt{2})^2 = 9 + 12\sqrt{2} + 8 = 17 + 12\sqrt{2}

So (x2,y2)=(17,12)(x_2, y_2) = (17, 12). Verify: 172−2(122)=289−288=117^2 - 2(12^2) = 289 - 288 = 1. ✓ For n=3n=3:

(3+22)3=(3+22)(17+122)=51+362+342+48=99+702(3 + 2\sqrt{2})^3 = (3 + 2\sqrt{2})(17 + 12\sqrt{2}) = 51 + 36\sqrt{2} + 34\sqrt{2} + 48 = 99 + 70\sqrt{2}

So (x3,y3)=(99,70)(x_3, y_3) = (99, 70). □

Example2

A Thue Equation Consider the equation x3−2y3=1x^3 - 2y^3 = 1. This is a Thue equation with F(x,y)=x3−2y3F(x,y) = x^3 - 2y^3, which is irreducible over Q\mathbb{Q} (by Eisenstein's criterion with p=2p = 2 applied to F(x,1)=x3−2F(x, 1) = x^3 - 2). By inspection, (x,y)=(1,0)(x,y) = (1, 0) is a solution. We can verify that (x,y)=(−1,−1)(x,y) = (-1, -1) is also a solution: (−1)3−2(−1)3=−1+2=1(-1)^3 - 2(-1)^3 = -1 + 2 = 1. ✓ By Thue's theorem, there are only finitely many solutions. In fact, these are the only integer solutions (this can be verified through various methods, including reduction modulo small primes and height bounds). Note the stark contrast with Pell's equation: degree 2 gives infinitely many solutions, degree 3 gives finitely many. □

Counterexample

Why Degree Matters: The Quadratic Case Consider F(x,y)=x2−2y2F(x,y) = x^2 - 2y^2, a binary quadratic form. The equation x2−2y2=1x^2 - 2y^2 = 1 is Pell's equation and has infinitely many solutions. Thue's theorem requires deg⁡(F)≥3\deg(F) \geq 3. This is not a technicality—the conclusion fails for quadratic forms. The geometric reason is that x2−Dy2=mx^2 - Dy^2 = m defines a genus 0 curve (a conic), which has either no rational points or infinitely many. In contrast, F(x,y)=mF(x,y) = m with deg⁡(F)=n≥3\deg(F) = n \geq 3 typically defines a curve of genus g≥1g \geq 1. For example, x3−2y3=1x^3 - 2y^3 = 1 can be transformed into a plane cubic curve. By Faltings' theorem (formerly Mordell's conjecture), curves of genus g≥2g \geq 2 have only finitely many rational points, and genus 1 curves (elliptic curves) have finitely many points if the Mordell-Weil group is finite. The hypothesis deg⁡(F)≥3\deg(F) \geq 3 is sharp and essential. □

🧠 Intuition

Geometric Picture: Pell's equation x2−Dy2=1x^2 - Dy^2 = 1 describes a hyperbola in the (x,y)(x,y)-plane. Integer points on this hyperbola correspond to units in Z[D]\mathbb{Z}[\sqrt{D}]. The fundamental solution is the "smallest" unit greater than 1, and all other solutions are obtained by repeatedly "multiplying" this unit by itself—geometrically, this corresponds to a discrete but infinite sequence of points marching off to infinity along each branch of the hyperbola. For Thue equations with degree ≥3\geq 3, the curve F(x,y)=mF(x,y) = m is no longer a conic but a higher-degree algebraic curve. These curves "bend" more severely, and the spacing between integer points grows rapidly. The finiteness result reflects a deep principle: higher-genus curves are "more rigid" and cannot support infinitely many rational (or integer) points scattered along them. Think of it as the curve having "too much curvature" to admit infinitely many lattice points. □

Historical Development

The study of Pell's equation dates back to ancient times. Indian mathematicians, particularly Brahmagupta (7th century) and Bhaskara II (12th century), developed sophisticated methods for solving what is now called Pell's equation, including the chakravala method. Fermat challenged European mathematicians with the problem in 1657, and solutions were found by Wallis and Brouncker. The name "Pell's equation" is a historical accident due to Euler's misattribution in the 18th century. Lagrange (1768) gave the first complete proof using continued fractions that solutions always exist for non-square DD, establishing the theory on rigorous foundations. The connection to algebraic number theory emerged in the 19th century through the work of Dirichlet on the unit theorem for number fields. The recognition that solutions to x2−Dy2=1x^2 - Dy^2 = 1 are precisely the units in Z[D]\mathbb{Z}[\sqrt{D}] unified Pell's equation with the broader theory of algebraic integers.

Axel Thue's groundbreaking 1909 paper "Über Annäherungswerte algebraischer Zahlen" introduced completely new methods to prove that F(x,y)=mF(x,y) = m with irreducible FF of degree ≥3\geq 3 has only finitely many solutions. His approach via Diophantine approximation was revolutionary, though his bounds were ineffective. The Thue-Mahler equation was studied by Kurt Mahler in the 1930s, who recognized that allowing finitely many prime divisors on the right-hand side (creating SS-unit equations) still preserved finiteness. This work connected to Siegel's theorem on integral points on curves. Effective bounds for Thue equations came from Alan Baker's theory of linear forms in logarithms (1960s-1970s), for which he received the Fields Medal in 1970. Modern computational methods can now solve many specific Thue and Thue-Mahler equations completely.

Connections to Other Areas

connection

Connection to Cryptography: Pell's equation has surprising applications in public-key cryptography. The infrastructure of the fundamental unit in real quadratic fields, based on Pell's equation solutions, has been used to construct cryptographic protocols analogous to those based on elliptic curves. The Buchmann-Williams cryptosystem uses the arithmetic of ideal classes in real quadratic orders, where computing the fundamental solution to Pell's equation becomes a crucial subroutine. The difficulty of computing the fundamental solution for large DD (the regulator problem) provides potential computational hardness for cryptographic security, offering an alternative to factoring and discrete logarithm problems.

What You Need First

What This Opens Up

See Also

Diophantine Approximation · Continued Fractions · Quadratic Forms · Algebraic Number Theory · Unit Theorem · S-integers · Binary Forms · Mordell's Conjecture