### Finding the fundamental solutions of the diophantine equation ax^{2}+bxy+cy^{2}=n, where a > 0, b^{2}-4ac > 0 and is not a perfect square, n non-zero

We use completion of the square and reduce the equation to X^{2} – d Y^{2} = 4an, where X = 2ax + y and Y = y and then solve this equation and obtain its Stolt fundamental solutions. It is only a short step to produce the fundamental solutions of the diophantine equation ax^{2} + bxy +cy^{2} = n. See Arkiv för Matematik, Vol 3 (1957), no. 4, 381-390.
We also give formulae for the equivalence class of solutions corresponding to each fundamental solution.

This program has wider applicability than http://www.numbertheory.org/php/stolt_fundamental.html, as the latter is slow when the bounds become large.

This program is a BCMath version of a BC program.

See Note.

*Last modified 3rd August 2021*

Return to main page