It *is* a ternary quadratic form once you homogenize with a 3rd variable z.
Finding rational points on plane conics (which is what this is) has advanced substantially in the last few years. My paper with Rusin (Mathematics of Computation, 72 (2003), no. 243, pages 1417-1441.) works well for diaginal ones and is behind Magma's first implementations for RationalPoint(Conic()); a different method by Denis Simon is better for non-diagonal ones and is (I believe) what Magma uses. My method is implemented in the C++ code which is already in Sage in the mwrank package, so all tat would be needed would be to write the appropriate wrappers! John On 9/21/07, David Stahl <[EMAIL PROTECTED]> wrote: > > Hi Utpal, > > Does the Hasse-Minkowski theorem apply for a non-quadratic form like > mine? > > David > > On Sep 20, 2:34 pm, Utpal Sarkar <[EMAIL PROTECTED]> wrote: > > There is not always a solution. Whether or not there is a solution is > > the contents of the Hasse-Minkowski theorem. I couldn't find a > > function in sage that immediately tells you whether there is a > > rational solution. There is a function that tells you whether there is > > a local solution at a prime p, namely hilbert_symbol(-N, d, p) (this > > is 1 when there is a solution, otherwise -1), and the Hasse-Minkowski > > theorem actually states that there is a global (rational) solution if > > and only if there is a local solution at every prime p including > > infinity (in sage you have to pass p = -1). In fact this only has to > > be checked for primes that divide N or d, for 2 and for infinity. > > > > In sage you could write a function like this, in one line if you use > > some fancy python constructs (using the N and d as in your equation > > (2), check just in case I made a mistake): > > def has_rational_solution(N,d): > > return reduce(lambda P,Q: P and Q, [prod([hilbert_symbol(a,b,p) > > for a in [-N.numerator(), N.denominator()] for b in [d.numerator(), > > d.denominator()]]) == 1 for p in prime_divisors(2*N*d) + [-1]]) > > > > If you have magma installed (accessible from sage in that case), then > > this function will actually give you a rational point (in homogeneous > > coordinates) if it exists: > > f := func<N,d| HasRationalPoint(Conic(P2, P2.1^2 - d*P2.2^2 + > > N*P2.3^2))> where P2 is ProjectiveSpace(Rationals(),2); > > > > Hope you find this useful. > > Greetings, > > > > Utpal > > > > On Sep 20, 9:40 pm, David Stahl <[EMAIL PROTECTED]> wrote: > > > > > > > > > I have a non-SAGE question and am hoping someone can point me to a > > > source that discusses the solution. I am trying to find a rational > > > solution for x and y to the equation: > > > > > Ax^2 + Bxy + Cy^2 + Dx + Ey + F =0 (1) > > > > > where the coefficients are rational. This can be transformed to: > > > > > xprm^2 - d*yprm^2 + N = 0 (2) > > > > > There are alot of websites that talk about finding integer solutions > > > to these equations with integer coefficients. I do not think an > > > integer solution always exists when the coefficients of (2) are > > > rational but I do think a rational solution always does exist and I am > > > perfectly happy with a rational solution. Any guidance would be > > > appreciated. Thank you. > > > > > David- Hide quoted text - > > > > - Show quoted text - > > > > > -- John Cremona --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
