I have seen many statements to the effect that the general quadratic diophantine equation $$ax^2+bxy+cy^2+dx+ey+f=0$$ can be reduced to a "Pell-type" equation of the form $x^2-ny^2=m$, but I haven't been able to find a good reference for this.

Can someone point me to a nice textbook-style treatment? Thanks.

P.S. I see many specific examples of this problem on StackExchange but I don't see any pointers to the general theory.

P.P.S. I am not looking for the solution of the Pell equation; I am looking for the reduction of the general quadratic to the Pell equation.


Actually, there are many articles explaining this in detail. For example, the recent text by K. Matthews, Solving the Diophantine equation $ax^2+bxy+cy^2+dx+ey+f=0$, using completing the square, the discriminant, some translations and modulo considerations. It also has several examples.


(If you want the specific transformation.) Given any QDE,


then Legendre established that it can be transformed (in fact) to two Pell-type equations,

$$u^2-Dv^2 = k$$


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

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

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

Note: One can easily recover $x,y$ from $u,v$. But if $u,v$ is integral, it is no guarantee that the $x,y$ will be integral as well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.