---
tag: 0AF3DANJ76
kind: definition
name: Pell's equation
aliases: [pell-fermat-equation]
msc: [11D09]
defines: 0Z0NE3J6JX
uses: [08B1RTW7VZ]
sources:
  - url: https://en.wikipedia.org/wiki/Pell%27s_equation
    locator: lead section
---

## Definition

Let $d$ be a positive integer that is not a perfect square.
Pell's equation for $d$ is the [[Diophantine equation|08B1RTW7VZ]] $x^2 - d y^2 = 1$, with unknowns $x, y \in \mathbb{Z}$.
A solution is a pair $(x, y)$ of integers that satisfies the equation.

## Remarks

The pairs $(\pm 1, 0)$ are the trivial solutions.
For $d = 2$, the pair $(3, 2)$ is a solution, since $9 - 2 \cdot 4 = 1$.
A solution $(x, y)$ with $y \neq 0$ gives the rational approximation $x / y$ of $\sqrt{d}$.
The name comes from an error of Euler, who attributed a solution by William Brouncker to John Pell.

## Explanations

### L1 human

Pell's equation asks for integers $x$ and $y$ such that $x^2$ is exactly one more than $d y^2$.
For $d = 2$, the solutions $(3, 2)$, $(17, 12)$ and $(577, 408)$ give fractions very close to $\sqrt{2}$.
