### Solving the diophantine equation ax^{2} + bxy + cy^{2} + dx + ey +f = 0, where a ≠ 0, b^{2} - 4ac > 0 is not a perfect square.

Our algorithm is based on a method of John Robertson, communicated to the author on March 29, 2015.
Let D = b^{2} - 4ac. We make a transformation
Dx = X + r, Dy = Y + s, ... (1)

where (r/D, s/D) = (2cd - be, 2ae - bd) is the centre of the hyperbola. This converts ax^{2} + bxy + cy^{2} + dx + ey +f = 0 to AX^{2} + BXY + CY^{2} = k. After dealing with the case k = 0 (intersection of two lines) we check that t = gcd(A,B,C) divides k and if so, divide through by t. We then investigate solubility of the binary form equation. In the case of solubility, we get g families with representatives (X_{h},Y_{h}), with the general solution having the form
X = (γF + δG)/2,
Y = (εF + ζG)/2,

where γ = X_{h}, ε = Y_{h}, δ = -(2Cε+Bγ) and F^{2} - DG^{2} = 4, where D = B^{2} - 4AC. Then F + G√D = ±(Φ/2 + Ψ/2√D)^{n}, n an integer, where (Φ, Ψ) is the least positive solution of Φ^{2} - DΨ^{2} = 4. John Robertson has pointed out that it is enough to test the four solutions (X_{h},Y_{h}) corresponding to n = 0 and 1, to see if they give integer x and y in equation (1).
The output should be equivalent to that of the Sawilla, Silvester, Williams program
This is a BCMath version of BC function `ssw3(a,b,c,d,e,f)` contained in patz.

*Last modified 7th April 2015*

Return to main page