[Math] Transforming Diophantine quadratic equation to Pell’s equation

diophantine equationsnumber theoryquadratic-forms

I have been discussing the fastest and most efficient ways of solving QDEs in a separate question record (Alternative method to solve quadratic Diophantine equations). However, as suggested by individ, I want to shunt the discussion onto new tracks.
Note also, that I am aware of similar entries related to this topic (like Solving Pell's equation(or any other diophantine equation) through modular arithmetic.) but my questions are slightly different and the special case I am interested in (see below in bullets) does not match the previous QDEs discussed.

Again we have: $$Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 $$

where $ A,B,C,D,E,F \in \mathbb Z$

Individ suggested that instead of following a general algorithm proposed by Dario Alpern (https://www.alpertron.com.ar/METHODS.HTM) a more elegant and computationally faster may be a method of transforming QDE into some form of Pell's equation.

The questions are:

  • Can any QDE be transformed into some form of Pell's equation? If yes, please provide guidelines.
  • If not, then at least is it feasible for $A=1, B=0, C=-1, D=D_0, E=0, F=F_0$ , where $ D_0 > F_0 $ and $ F_0 > 1 $? If yes, then please provide guidelines how to do this at least in outline.
  • Does such transformations into Pell's yield any substantial advantage in terms of solving QDE over Alpern's guidelines? This is perhaps the most crucial question — Does solving QDE through Pell's transformation involve finding integer divisors of some linear combination of $D$ and $F$ during the solving process? If so, then the whole idea seems pointless from computational perspective.

Best Answer

Legendre has long established this.

I. Transformation

Given any QDE,

$$ax^2+bxy+cy^2+dx+ey+f=0\tag1$$

then it can be transformed to two Pell-type equations,

$$u_i^2-Dv_i^2 = k_i\tag2$$

as,

$$(Dy-2ae+bd)^2-D(2ax+by+d)^2 = 4a(ae^2+cd^2-bde+Df)\tag3$$

$$(Dx-2cd+be)^2-D(2cy+bx+e)^2 = 4c(ae^2+cd^2-bde+Df)\tag4$$

with the same discriminant $D=b^2-4ac$.

But there is a problem. Once you've found integer $u,v$ then, by undoing the transformation, it does not guarantee that $x,y$ will be integers as well.

II. Example

$$4x^2+20xy+5y^2-24x-20y-73=0$$

By formulas $(3),(4)$, this can be transformed to either,

$$p^2-320q^2 = -4\times113920$$ $$r^2-320s^2 = -5\times113920$$

Let's use the Alpertron:

  1. It gives a small solution $p,q = 80,38$ which yields rational $x, y = \frac{37}{8}, \frac{5}{4}$.
  2. Fortunately, another family starts with $p,q = 640,54$ and gives integer $x,y = 2,3$.
  3. We also have $r,s = 280, 45$ which yields $x, y = \frac{11}{8}, \frac{15}{4}$.
  4. But $r,s = 480, 50$ gives$x,y = 2,3$.

Thus, if you're not fortunate, you'll only end up with rational $x,y$.

Related Question