alpertron.com.ar/QUAD.HTM
2 x² + 3 xy - 4 y² - 2 = 0The discriminant is D = b² − 4ac = 41 2 X² + 3 XY − 4 Y² = 2 (1) The algorithm requires that the coefficient of X² and the right hand side are coprime. This does not happen, so we have to find a value of m such that applying one of the unimodular transformations - X = mU + (m−1)V, Y = U + V
- X = U + V, Y = (m−1)U + mV
the coefficient of U² and the right hand side are coprime. This coefficient equals 2 m² + 3 m − 4 in the first case and -4 (m − 1)² + 3 (m − 1) + 2 in the second case. We will use the first unimodular transformation with m = 1: X = U, Y = U + V (2) Using (2), the equation (1) converts to: U² − 5 UV − 4 V² = 2 (3)We will have to solve several quadratic modular equations. To do this we have to factor the modulus and find the solution modulo the powers of the prime factors. Then we combine them by using the Chinese Remainder Theorem. The different moduli are divisors of the right hand side, so we only have to factor it once. 2 = 2 Searching for solutions U and V coprime. We have to solve: T² − 5 T − 4 ≡ 0 (mod 2 = 2) Solutions modulo 2: 0 and 1 - T = 0
The transformation U = - 2 k (4) converts U² − 5 UV − 4 V² = 2 to PV² + QVk + R k² = 1 (5) where: P = (aT² + bT + c) / n = -2, Q = −(2aT + b) = 5, R = an = 2The continued fraction expansion of (Q + D) / (2R) = (5 + 41) / 4 is: 2+ // 1, 5, 1, 2, 2// (6)Solution of (5) found using the convergent V / (−k) = 1 / 3 of (6)U = 6, V = 1 From (2): X = 6, Y = 7 x = 6 y = 7 U = -6, V = -1 From (2): X = -6, Y = -7 x = -6 y = -7 The continued fraction expansion of (−Q + D) / (−2R) = (-5 + 41) / (-4) is: -1+ // 1, 1, 1, 5, 1, 2, 2// (7)- T = 1
The transformation U = V - 2 k (8) converts U² − 5 UV − 4 V² = 2 to PV² + QVk + R k² = 1 (9) where: P = (aT² + bT + c) / n = -4, Q = −(2aT + b) = 3, R = an = 2The continued fraction expansion of (Q + D) / (2R) = (3 + 41) / 4 is: 2+ // 2, 1, 5, 1, 2// (10)The continued fraction expansion of (−Q + D) / (−2R) = (-3 + 41) / (-4) is: -1+ // 6, 1, 2, 2, 1, 5// (11)Solution of (9) found using the convergent V / (−k) = 1 / -1 of (11)U = -1, V = 1 From (2): X = -1, Y = 0 x = -1 y = 0 U = 1, V = -1 From (2): X = 1, Y = 0 x = 1 y = 0
Recursive solutions: xn+1 = 1089 xn + 2560 yn yn+1 = 1280 xn + 3009 yn and also: xn+1 = 3009 xn - 2560 yn yn+1 = - 1280 xn + 1089 yn |