how to solve binary form $ax^2+bxy+cy^2=m$, for integer and rational $(x,y)$

solve

$3x^2+3xy-5y^2=55$

using number theory tools ,i have found the following

$\Delta=3^2+4(5)(3)=9+60=69$

$d=69,u=1$

$w_{69}=\frac{1+\sqrt{69}}{2}$

$O_{69}=\theta_{-11}=[1,\frac{1+\sqrt{69}}{2}]$

$3x^2+3xy-5y^2=55\\9x^2+9xy-15y^2=(3x+\frac{3}{2}y)^2-69(\frac{y}{2})^2=55\times 3=163$

$|x+\frac{3}{2}y|\le \sqrt{163},\sqrt{69}|\frac{y}{2}|\le \sqrt{163}$

using the inequality $a^2+b^2=c^2\implies |a|,|b|\le|c|$

• $|y|\le 3$

• $|x+\frac{3}{2}y|\le |x|+\frac{3}{2}|y|\le |x|+\frac{3}{2}2\le \sqrt{55}\le \sqrt{64}=8\implies |x|\le5$

hence we should check for solutions

$y=0,\pm 1$

$x=0\pm 1,\pm 2\pm 3,\pm4,\pm 5,\pm 6$

case 1

$y=1\implies 3x^2+3x-5=55\implies x^2+x-20=(x-4)(x+5)=0$

$x=-5,4$

case 2

$y=-1\implies 3x^2-3x-5=55\implies x^2-x-20=(x+4)(x-5)=0$

$x=-4,5$

case 3 $x=0 \implies$ NA

hence solutions are

$(1,5),(1,-4),(-1,5),(-1,4)$

i am searching for other possible roots,specifically a generalisation in $n$

or a general METHOD

EDIT, March 2016: I wrote a program that finds this stuff quickly, also identifies the "fundamental" solutions from which all others may be derived. Good if the question is to solve for one specific target value. Oh, I told it to use only $x,y \geq 0.$ Going backwards by the automorphism matrix does give solutions with smaller absolute values, for a while. This method includes an effective bound on the entries that allows proving that all such "fundamental" solutions have been found.

jagy@phobeusjunior:~$./Pell_Target_Fundamental_A 8 15 9 17 25^2 - 69 3^2 = 4 3 x^2 + 3 x y -5 y^2 = 55 Thu Mar 31 11:12:43 PDT 2016 x: 4 y: 1 ratio: 0.25 fundamental x: 5 y: 4 ratio: 0.8 fundamental x: 12 y: 13 ratio: 1.08333 fundamental x: 25 y: 28 ratio: 1.12 fundamental x: 47 y: 53 ratio: 1.12766 x: 100 y: 113 ratio: 1.13 x: 291 y: 329 ratio: 1.13058 x: 620 y: 701 ratio: 1.13065 x: 1171 y: 1324 ratio: 1.13066 x: 2495 y: 2821 ratio: 1.13066 x: 7263 y: 8212 ratio: 1.13066 x: 15475 y: 17497 ratio: 1.13066 x: 29228 y: 33047 ratio: 1.13066 x: 62275 y: 70412 ratio: 1.13066 x: 181284 y: 204971 ratio: 1.13066 x: 386255 y: 436724 ratio: 1.13066 x: 729529 y: 824851 ratio: 1.13066 x: 1554380 y: 1757479 ratio: 1.13066 x: 4524837 y: 5116063 ratio: 1.13066 Thu Mar 31 11:13:03 PDT 2016 8 15 9 17 Inverse of given automorphism of quadratic form: 17 -15 -9 8 jagy@phobeusjunior:~$

Given a solution $(x,y),$ you get another solution from $$(8x+15y,9x+17y).$$ Repeat forever. Going backwards is $$(17x-15y,-9x+8y).$$

For $y=1,$ it should have been $3x^2 + 3 x - 60 = 0,$ so $x^2 + x - 20 = 0.$ Also you got the xy order wrong at the end, start with $$(4,1)(-5,1)(-4,-1)(5,-1).$$ These are just $$\pm (4,1); \pm (5,-1).$$

EEDDIITT: unfortunate, you missed two infinite strings. I carefully drew Conway's topograph for one cycle. The four solutions with small entries, in distinct orbits, are $(4,1), (5,-1),(5,4), (9,-4).$

The four strings, continued in both directions, become $$\ldots (32972,-17497);(1321,-701);(53,-28); (4,1); (47,53) ; (1171,1324); (29228,33047); \ldots$$ $$\ldots (62275,-33047);(2495,-1324);(100,-53);(5,-1); (25,28) ; (620,701); (15475,17497); \ldots$$ $$\ldots (15475,-8212);(620,-329);(25,-13);(5,4); (100,113) ; (2495,2821); (62275,70412); \ldots$$ $$\ldots (132687,-70412);(5316,-2821);(213,-113);(9,-4); (12,13) ; (291,329); (7263,8212); \ldots$$

I decided to make a very careful tree outline so that I could fill in the relevant bits of the Conway topograph and have it clearly visible. In brief, one diagram shows behavior along the "river." However, specific representations of a number with larger absolute value happen a bit away from the river, in trees... I have carefully shown how the four representations of $55$ with small entries, arise in the diagram. Here is a jpeg of the relevant portion of Conway's topograph for this problem. This is from The First Lecture in The Sensual Quadratic Form. Note that the 2 by 2 matrix

$$A \; = \; \left( \begin{array}{rr} 8 & 15 \\ 9 & 17 \end{array} \right)$$ is visible towards the right of the diagram, the value $3$ with coordinate vector $$\left( \begin{array}{r} 8 \\ 9 \end{array} \right),$$ and on the lower right of that we find the value $-5$ with coordinate vector $$\left( \begin{array}{r} 15 \\ 17 \end{array} \right).$$ That 2 by two matrix, which is where I got the formula $(8x+15y,9x+17y),$ is the generator of the automorphism group of the quadratic form, also called the orthogonal group, the rotation group, etc. The traditional name for it was "automorph," not so many use that any more except me, i guess. The automorph also comes, quickly, from the Lagrange cycle method, illustrated in the computer output below that. The best book for that is Duncan A. Buell, Binary Quadratic Forms. jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$./indefCycle 3 3 -5 0 form 3 3 -5 1 0 0 1 To Return 1 0 0 1 0 form 3 3 -5 delta -1 1 form -5 7 1 delta 7 2 form 1 7 -5 delta -1 3 form -5 3 3 delta 1 4 form 3 3 -5 form 3 x^2 + 3 x y -5 y^2 minimum was 1rep x = -1 y = -1 disc 69 dSqrt 8.3066238629 M_Ratio 7.666667 Automorph, written on right of Gram matrix: 8 15 9 17 ========================================= jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$

Generate solutions of Quadratic Diophantine Equation

Another quadratic Diophantine equation: How do I proceed?

How to find solutions of $x^2-3y^2=-2$?

Generate solutions of Quadratic Diophantine Equation

Finding all solutions of the Pell-type equation $x^2-5y^2 = -4$

Find all integer solutions for the equation $|5x^2 - y^2| = 4$

Maps of primitive vectors and Conway's river, has anyone built this in SAGE?

Infinitely many systems of $23$ consecutive integers

Finding integers of the form $3x^2 + xy - 5y^2$ where $x$ and $y$ are integers, using diagram via arithmetic progression

Small integral representation as $x^2-2y^2$ in Pell's equation

Solving the equation $x^2-7y^2=-3$ over integers

• oh yes,thank you,how do we know other solutions are of this from $(8x+15y,9x+17y)$ – Jonas Kgomo Apr 4 '14 at 17:06
• i see how you found out the other forms from the c++ algorithm,but how is $M_{ratio}=[a,\frac{b+u\sqrt{d}}{2}]$ – Jonas Kgomo Apr 4 '14 at 17:16
• Dr William ,i notice that you are more interested with quadratic forms,would you please send a link of one of your work or similar example ,as i am more concerned with the process,for exam preparation,esp for getting $M_{Ratio}$ ,and Gram Matrix,thank you – Jonas Kgomo Apr 4 '14 at 19:05
• @janmarqz thanks. I edited in my list of answers either talking about the diagrams or having drawings. The answer above gives fairly good examples of two tree parts of the diagram, it is actually the "river" that is less predictable and may need more than one try to fit on a page. – Will Jagy Jan 3 '16 at 4:34
• if I will lecture Number Theory this next semester I will include this subject – janmarqz Jan 3 '16 at 4:36