0

I'm trying to code a program for finding integer solutions for the general hyperbola equation; $$ax^2 + bxy + cy^2 + dx + ey + f = 0$$

I'm basing it on a paper I found on arXiv; arXiv:0907.3675 [math.GM]

In a nutshell, the paper derives an equation; $$p * q = I$$ and creates systems of linear equations based on factors of |I|, such that; $$p = a_px + b_py + c_p = \pm d_i$$ $$q = a_qx + b_qy + c_q = I / \pm d_i$$ and $$p = a_px + b_py + c_p = I / \pm d_i$$ $$q = a_qx + b_qy + c_q = \pm d_i$$

My first candidate equation is; $$x^2 - y^2 - y = -5$$ which gives; $$a=1,b=0,c=-1,d=0,e=-1,f=5$$

The program then runs;

(1)
    ax^2 + bxy + cy^2 + dx + ey + f  =  0,  
           a = 1, b = 0, c = -1, d = 0, e = -1, f = 5


k:
    k^2  =  b^2 - 4ac
         =  0^2 - 4(1)(-1)
         =  4,  k  =  2

(10)
    p * q  =  I

    p  =  2akx + k(b - k)y + dk + (2ae - bd)
       =  2(1)(2)x + 2(0 - 2)y + 0(2) + (2(1)(-1) - (0)(0))
       =  4x + -4y + -2

    q  =  2akx + k(b + k)y + dk - (2ae - bd)
       =  2(1)(2)x + 2(0 + 2)y + 0(2) - (2(1)(-1) - (0)(0))
       =  4x + 4y - -2

    I  =  k^2(d^2 - 4af) - (2ae - bd)^2
       =  2^2(0^2 - 4(1)(5)) - (2(1)(-1) - (0)(0))^2))
       =  -84

    [4x + -4y + -2] * [4x + 4y - -2]  =  -84


factor pairs of I 
    (d_i, I/d_i)  =  [(1, -84), (2, -42), (3, -28), (4, -21), (6, -14), (7, -12), 
                      (-1, 84), (-2, 42), (-3, 28), (-4, 21), (-6, 14), (-7, 12)]


Linear systems
    p  =  4x + -4y + -2  =  d_i         p  =  4x + -4y + -2  =  I / d_i
    q  =  4x + 4y - -2  =  I / d_i       q  =  4x + 4y - -2  =  d_i


    p  =  4x + -4y + -2  =  1       p  =  4x + -4y + -2  =  -84
    q  =  4x + 4y - -2  =  -84       q  =  4x + 4y - -2  =  1

    ... and so on ...

The problem is; All of my coefficients in p and q are even, but some of the factors of |I| are odd, and so it is immediately apparent that not all solutions are in fact integers.

Is this approach totally off kilter somehow, or should I just ignore the non-integer solutions?

Also, the paper I'm following was the only ready reference I found on this process. Pointers to other good, specific references would be appreciated.

saulspatz
  • 53,131
CAB
  • 169
  • There need to be some restrictions on coefficients $a,b,\cdots,f$ to force it to be a hyperbola. Otherwise it could be ellipse/circle, or two intersecting lines, or maybe empty, or (?). – coffeemath Jul 16 '19 at 16:25
  • MathJax works in titles, too. – saulspatz Jul 16 '19 at 16:29
  • The question is not whether all solution to the derived equations are integers, but whether the integer solutions to the derived equations comprise all integer solutions to the original equation. – saulspatz Jul 16 '19 at 16:36
  • Multiply your test equation by $4$ and complete the square to get $(2y+1)^2-(2x)^2=21.$ This has the integer solutions $2y+1=\pm11,, 2x=\pm10$ and $2y+1=\pm5,,2x=\pm2.$ Do you get these eight solutions? – saulspatz Jul 16 '19 at 16:53
  • You may be interested in a link in OEIS sequence A243655 "C++ program Conway_Positive_All.cc to find all positive numbers represented by an indefinite binary quadratic form". – Somos Jul 16 '19 at 16:56
  • @saulspatz - I wasn't too focused on this specific candidate, except that I had a solution in mind of $$(1,2) = 1^2 - 2^2 - 2 = -5$$, which agrees with your answer. – CAB Jul 16 '19 at 19:35
  • It is obvious (see e.g. the example in section 4 of the paper you cited) that not all the solutions of the systems are integers, but all integer solutions of the original equation are also solutions of the linear systems and all integer solutions of the linear systems are also solutions of the original equation. – Intelligenti pauca Jul 17 '19 at 08:43
  • @saulspatz - how did you get 2 and 5? Is this because 3 * 7 = 21 and 5 - 2 = 3 and 5 + 2 = 7? – CAB Jul 17 '19 at 12:10
  • No, I said $11^2-10^2=21$ and $5^2-2^2=21$ are the only ways of expressing $21$ as a difference of two squares. – saulspatz Jul 17 '19 at 12:30

0 Answers0