MarketPell's equation
Company Profile

Pell's equation

Pell's equation, also called the Pell–Fermat equation, is any Diophantine equation of the form where n is a given positive nonsquare integer, and integer solutions are sought for x and y. In Cartesian coordinates, the equation is represented by a hyperbola; solutions occur wherever the curve passes through a point whose x and y coordinates are both integers, such as the trivial solution with x = 1 and y = 0. Joseph Louis Lagrange proved that, as long as n is not a perfect square, Pell's equation has infinitely many distinct integer solutions. These solutions may be used to accurately approximate the square root of n by rational numbers of the form x/y.

History
Special cases As early as 400 BC in India and Greece, mathematicians studied the numbers arising from the n = 2 case of Pell's equation, x^2 - 2 y^2 = 1, and from the closely related equation x^2 - 2 y^2 = -1 because of the connection of these equations to the square root of 2. Later, Archimedes approximated the square root of 3 by the rational number 1351/780. Although he did not explain his methods, this approximation may be obtained in the same way, as a solution to Pell's equation. Likewise, Archimedes's cattle problem—an ancient word problem about finding the number of cattle belonging to the sun god Helios—can be solved by reformulating it as a Pell's equation. The manuscript containing the problem states that it was devised by Archimedes and recorded in a letter to Eratosthenes, and the attribution to Archimedes is generally accepted today. General case Around AD 250, Diophantus considered the equation a^2 x^2 + c = y^2, where a and c are fixed numbers, and x and y are the variables to be solved for. This equation is different in form from Pell's equation but equivalent to it. Diophantus solved the equation for (ac) equal to (1, 1), (1, −1), (1, 12), and (3, 9). Al-Karaji, a 10th-century Persian mathematician, worked on similar problems to Diophantus. In Indian mathematics, Brahmagupta discovered that (x_1^2 - Ny_1^2)(x_2^2 - Ny_2^2) = (x_1x_2 + Ny_1y_2)^2 - N(x_1y_2 + x_2y_1)^2, a form of what is now known as Brahmagupta's identity. Using this, he was able to "compose" triples (x_1, y_1, k_1) and (x_2, y_2, k_2) that were solutions of x^2 - Ny^2 = k, to generate the new triples : (x_1x_2 + Ny_1y_2 , x_1y_2 + x_2y_1 , k_1k_2) and (x_1x_2 - Ny_1y_2 , x_1y_2 - x_2y_1 , k_1k_2). Not only did this give a way to generate infinitely many solutions to x^2 - Ny^2 = 1 starting with one solution, but also, by dividing such a composition by k_1k_2, integer or "nearly integer" solutions could often be obtained. For instance, for N = 92, Brahmagupta composed the triple (10, 1, 8) (since 10^2 - 92(1^2) = 8) with itself to get the new triple (192, 20, 64). Dividing throughout by 64 ("8" for x and y) gave the triple (24, 5/2, 1), which when composed with itself gave the desired integer solution (1151, 120, 1). Brahmagupta solved many Pell's equations with this method, proving that it gives solutions starting from an integer solution of x^2 - Ny^2 = k for k = ±1, ±2, or ±4. The first general method for solving the Pell's equation (for all N) was given by Bhāskara II in 1150, extending the methods of Brahmagupta. Called the chakravala (cyclic) method, it starts by choosing two relatively prime integers a and b, then composing the triple (a, b, k) (that is, one which satisfies a^2 - Nb^2 = k) with the trivial triple (m, 1, m^2 - N) to get the triple \big(am + Nb, a + bm, k(m^2 - N)\big), which can be scaled down to \left(\frac{am + Nb}{k}, \frac{a + bm}{k}, \frac{m^2 - N}{k}\right). When m is chosen so that \frac{a + bm}{k} is an integer, so are the other two numbers in the triple. Among such m, the method chooses one that minimizes \frac{m^2 - N}{k} and repeats the process. This method always terminates with a solution. Bhaskara used it to give the solution x = , y =  to the N = 61 case. In a letter to Kenelm Digby, Bernard Frénicle de Bessy said that Fermat found the smallest solution for N up to 150 and challenged John Wallis to solve the cases N = 151 or 313. Both Wallis and William Brouncker gave solutions to these problems, though Wallis suggests in a letter that the solution was due to Brouncker. John Pell's connection with the equation is that he revised Thomas Branker's translation of Johann Rahn's 1659 book Teutsche Algebra into English, with a discussion of Brouncker's solution of the equation. Leonhard Euler mistakenly thought that this solution was due to Pell, as a result of which he named the equation after Pell. The general theory of Pell's equation, based on continued fractions and algebraic manipulations with numbers of the form P + Q\sqrt{a}, was developed by Lagrange in 1766–1769. In particular, Lagrange gave a proof that the Brouncker–Wallis algorithm always terminates. ==Solutions==
Solutions
Fundamental solution via continued fractions Let h_i/k_i denote the unique sequence of convergents of the regular continued fraction for \sqrt{n}. Then the pair of positive integers (x_1, y_1) solving Pell's equation and minimizing x satisfies x1 = hi and y1 = ki for some i. This pair is called the fundamental solution. The sequence of integers [a_0; a_1,a_2,\ldots] in the regular continued fraction of \sqrt{n} is always eventually periodic. It can be written in the form \left[\lfloor\sqrt{n}\rfloor;\;\overline{a_1,a_2,\ldots,a_{r-1}, 2\lfloor\sqrt{n}\rfloor}\right], where \lfloor\, \cdot\, \rfloor denotes integer floor, and the sequence a_1,a_2,\ldots,a_{r-1}, 2\lfloor\sqrt{n}\rfloor repeats infinitely. Moreover, the tuple (a_1,a_2,\ldots,a_{r-1}) is palindromic, the same left-to-right or right-to-left. Additional solutions from the fundamental solution Once the fundamental solution is found, all remaining solutions may be calculated algebraically from Hallgren's algorithm, which can be interpreted as an algorithm for finding the group of units of a real quadratic number field, was extended to more general fields by Schmidt and Völlmer. ==Example==
Example
As an example, consider the instance of Pell's equation for n = 7; that is, x^2 - 7y^2 = 1. The continued fraction of \sqrt{7} has the form [2;\ \overline{1, 1, 1, 4}]. Since the period has length 4, which is an even number, the convergent producing the fundamental solution is obtained by truncating the continued fraction right before the end of the first occurrence of the period: [2;\ 1,1,1]=\frac{8}{3}. The sequence of convergents for the square root of seven are : Applying the recurrence formula to this solution generates the infinite sequence of solutions :(1, 0); (8, 3); (127, 48); (2024, 765); (32257, 12192); (514088, 194307); (8193151, 3096720); (130576328, 49353213); ... (sequence (x) and (y) in OEIS) For the Pell's equation x^2 - 13y^2 = 1, the continued fraction \sqrt{13}=[3;\ \overline{1,1,1,1,6}] has a period of odd length. For this the fundamental solution is obtained by truncating the continued fraction right before the second occurrence of the period [3;\ 1,1,1,1,6,1,1,1,1]=\frac{649}{180}. Thus, the fundamental solution is (x_1, y_1)=(649, 180). The smallest solution can be very large. For example, the smallest solution to x^2 - 313y^2 = 1 is (, ), and this is the equation which Frenicle challenged Wallis to solve. Values of n such that the smallest solution of x^2 - ny^2 = 1 is greater than the smallest solution for any smaller value of n are : 1, 2, 5, 10, 13, 29, 46, 53, 61, 109, 181, 277, 397, 409, 421, 541, 661, 1021, 1069, 1381, 1549, 1621, 2389, 3061, 3469, 4621, 4789, 4909, 5581, 6301, 6829, 8269, 8941, 9949, ... . (For these records, see for x and for y.) ==List of fundamental solutions of Pell's equations==
List of fundamental solutions of Pell's equations
The following is a list of the fundamental solution to x^2 - n y^2 = 1 with n ≤ 128. When n is an integer square, there is no solution except for the trivial solution (1, 0). The values of x are sequence and those of y are sequence in OEIS. ==Connections==
Connections
Pell's equation has connections to several other important subjects in mathematics. Algebraic number theory Pell's equation is closely related to the theory of algebraic numbers, as the formula x^2 - n y^2 = (x + y\sqrt n)(x - y\sqrt n) is the norm for the ring \mathbb{Z}[\sqrt{n}] and for the closely related quadratic field \mathbb{Q}(\sqrt{n}). Thus, a pair of integers (x, y) solves Pell's equation if and only if x + y \sqrt{n} is a unit with norm 1 in \mathbb{Z}[\sqrt{n}]. Dirichlet's unit theorem, that all units of \mathbb{Z}[\sqrt{n}] can be expressed as powers of a single fundamental unit (and multiplication by a sign), is an algebraic restatement of the fact that all solutions to the Pell's equation can be generated from the fundamental solution. The fundamental unit can in general be found by solving a Pell-like equation but it does not always correspond directly to the fundamental solution of Pell's equation itself, because the fundamental unit may have norm −1 rather than 1 and its coefficients may be half integers rather than integers. Chebyshev polynomials Demeyer mentions a connection between Pell's equation and the Chebyshev polynomials: If T_i(x) and U_i(x) are the Chebyshev polynomials of the first and second kind respectively, then these polynomials satisfy a form of Pell's equation in any polynomial ring R[x], with n = x^2 - 1: T_i^2 - (x^2-1) U_{i-1}^2 = 1. Thus, these polynomials can be generated by the standard technique for Pell's equations of taking powers of a fundamental solution: T_i + U_{i-1} \sqrt{x^2-1} = (x + \sqrt{x^2-1})^i. It may further be observed that if (x_i, y_i) are the solutions to any integer Pell's equation, then x_i = T_i (x_1) and y_i = y_1 U_{i-1} (x_1). Continued fractions A general development of solutions of Pell's equation x^2 - n y^2 = 1 in terms of continued fractions of \sqrt{n} can be presented, as the solutions x and y are approximates to the square root of n and thus are a special case of continued fraction approximations for quadratic irrationals. As part of this theory, Størmer also investigated divisibility relations among solutions to Pell's equation; in particular, he showed that each solution other than the fundamental solution has a prime factor that does not divide n. ==The negative Pell's equation==
The negative Pell's equation
The negative Pell's equation is given by x^2 - n y^2 = -1 and has also been extensively studied. It can be solved by the same method of continued fractions and has solutions if and only if the period of the continued fraction has odd length. A necessary (but not sufficient) condition for solvability is that n is not divisible by 4 or by a prime of form 4k + 3. Thus, for example, x2 − 3 y2 = −1 is never solvable, but x2 − 5 y2 = −1 may be. The first few numbers n for which x2 − n y2 = −1 is solvable are 1 (with only one trivial solution) and :2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, ... with infinitely many solutions. The solutions of the negative Pell's equation for 1 \le n \le 298 are: Let \alpha = \Pi_{j\text{ is odd}} (1 - 2^j). The proportion of square-free n divisible by k primes of the form 4m + 1 for which the negative Pell's equation is solvable is at least α. When the number of prime divisors is not fixed, the proportion is given by 1 − α. If the negative Pell's equation does have a solution for a particular n, its fundamental solution leads to the fundamental one for the positive case by squaring both sides of the defining equation: (x^2 - n y^2)^2 = (-1)^2 implies (x^2 + n y^2)^2 - n(2xy)^2 = 1. As stated above, if the negative Pell's equation is solvable, a solution can be found using the method of continued fractions as in the positive Pell's equation. The recursion relation works slightly differently however. Since (x + y\sqrt{n})(x - y\sqrt{n}) = -1, the next solution is determined in terms of i(x_k + y_k\sqrt{n}) = (i(x + y\sqrt{n}))^k whenever there is a match, that is, when k is odd. The resulting recursion relation is (modulo a minus sign, which is immaterial due to the quadratic nature of the equation) x_k = x_{k-2} x_1^2 + n x_{k-2} y_1^2 + 2 n y_{k-2} y_1 x_1, y_k = y_{k-2} x_1^2 + n y_{k-2} y_1^2 + 2 x_{k-2} y_1 x_1, which gives an infinite tower of solutions to the negative Pell's equation (except for n = 1). == Generalized Pell's equation ==
Generalized Pell's equation
The equation x^2 - n y^2 = N is called the generalized (or general) '''Pell's equation. The equation \textstyle u^2 - n v^2 = 1 is the corresponding Pell's resolvent'''. Such solutions can be derived using the continued-fractions method as outlined above. If (x_0, y_0) is a solution to \textstyle x^2 - n y^2 = N, and (u_k, v_k) is a solution to \textstyle u^2 - n v^2 = 1, then (x_k, y_k) such that x_k + y_k \sqrt{n} = \big(x_0 + y_0 \sqrt{n}\big)\big(u_k + v_k \sqrt{n}\big) is a solution to \textstyle x^2 - n y^2 = N, a principle named the multiplicative principle. If x and y are positive integer solutions to the Pell's equation with |N| , then x/y is a convergent to the continued fraction of \sqrt n. and they arise in the study of SIC-POVMs in quantum information theory. The equation x^2 - n y^2 = 4 is similar to the resolvent \textstyle x^2 - n y^2 = 1 in that if a minimal solution to \textstyle x^2 - n y^2 = 4 can be found, then all solutions of the equation can be generated in a similar manner to the case N = 1. For certain n, solutions to \textstyle x^2 - n y^2 = 1 can be generated from those with \textstyle x^2 - n y^2 = 4, in that if n \equiv 5 \pmod{8}, then every third solution to \textstyle x^2 - n y^2 = 4 has x, y even, generating a solution to \textstyle x^2 - n y^2 = 1. == Notes ==
tickerdossier.comtickerdossier.substack.com