Newsgroups: sci.math.research From: gm115@owl.pmms.cam.ac.uk (Gabor Megyesi) Subject: Re: number theory question: quadratic forms Date: Fri, 20 Aug 1993 15:09:24 GMT In article <9308200244.AA04273@riesz> tycchow@BOURBAKI.MIT.EDU writes: >In article jmurdock@iastate.edu >(James A Murdock) writes: > >>While constructing graphing examples for calculus, I wondered: is there >>a cubic polynomial with integer coefficients having three real roots, all of >>whose roots and critical points are integers? I then found that this is >>equivalent to: does the binary quadratic form x^2+xy+y^2 represent any perfect >>squares? Looking through various elementary number theory books I found that >>if ax^2+bxy+cy^2=ez^2 has one solution it has infinitely many, but I have >>found no criteria to tell if it has one. Someone out there must know. > >The first thing to do is to get rid of the xy term by changing variables: >r = x - y, s = x + y, t = z so that we are reduced to finding the solutions >to the Diophantine equation 3r^2 + s^2 - 4t^2 = 0. This has some trivial >solutions (e.g., r = s = t = 1), but presumably what you want is a cubic >where all the interesting points are distinct (otherwise you'd settle for >Y = X^3). I don't know how to solve this equation, but Maple says: > >Let a, b, and c be parameters, and set d = 6a^2 - 2b^2, e = 3a^2 + b^2, >and f = gcd(4ab,d,e). Then the solution is r = 4abc/f, s = cd/f, t = ce/f. > >So for example, one solution is r = 8, s = 22, t = 13, which yields for >your quadratic form x = -7, y = 15. We obtain Y = (X - 3)(X - 24)(X + 21), >whose minima/maxima are located at X = 15 and X = -11, and whose point of >inflection is located at X = 2. > >Perhaps some number theorist can explain the solution of the Diophantine >equation. I am not a number theorist, but here is the solution. Going back to the original problem, we want to find the integer solutions of x^2+xy+y^2=z^2. Introducing inhomogeneous co-ordinates u=x/z, v=y/z, this reduces to finding the rational points on the curve u^2+uv+v^2=1. Once we have one solution, however trivial it is, we can find all others by taking all straight lines with rational slopes through that point, and taking the other point of intersection with the ellipse. In this case we can choose u=0, v=-1, and lines of the form v=m*u-1, where m is rational. The other point of intersection is u=(2m+1)/(1+m+m^2), v=(m^2-1)/(1+m+m^2). This gives the complete set of rational solutions as m runs through the rational numbers and infinity. This method works for qaudratics in any number of variables. Finding a particular solution can be slightly more tricky if one cannot be spotted immediately. By a change of variables this equation can be transformed to the form p^2-dq^2=n, where n is a constant, p,q are the two variables. In our case we should get p^2-3q^2=1, where p=2t/s, q=r/s. It is a Pell's equation, and a solution, if one exists can be found by expanding the square root of d in a continued fraction. Gabor Megyesi G.Megyesi@pmms.cam.ac.uk ============================================================================== Newsgroups: sci.math.research From: gk00@midway.uchicago.edu (Greg Kuperberg) Subject: Re: number theory question; quadratic forms Date: Fri, 20 Aug 1993 16:47:06 GMT In article jmurdock@iastate.edu (James A Murdock) writes: >While constructing graphing examples for calculus, I wondered: is there >a cubic polynomial with integer coefficients having three real roots, all of >whose roots and critical points are integers? I then found that this is >equivalent to: does the binary quadratic form x^2+xy+y^2 represent any perfect >squares? I don't know how much smarter I am than Maple concerning this question, but the solution is extremely similar to that of the Pythagorean equation x^2 + y^2 = z^2. Let omega = exp(pi*i/3), i.e., omega^2 = omega - 1. Z[omega] is the medium-well-known ring of Eisenstein integers, which has unique factorization (not to mention the Euclidean algorithm) just as the Gaussian integers do. Your equation factors into (x + omega y) (x + omega-bar y) = z^2, where omega-bar, the complex conjugate of omega, is 1 - omega. Essentially this equation means that you take a square (of a vanilla integer) and you regroup its Eisenstein factors into two unequal combinations which are, of necessity, complex conjugates. To get an interesting solution, you must also make sure that the two parts are not unit multiples of each other, where the six units are +-1, +-omega, and +-omega-bar. The first case of this is 7 = (2 + omega)(2 + omega-bar) (2+omega)^2 = 3 + 5 omega 7^2 = (3 + 5 omega)(3 + 5 omega-bar) 7^2 = 3^2 + 3 . 5 + 5^2 A corresponding cubic is x(x-9)(x+15). Its derivative is 3(x+9)(x-5). If you want a larger supply of examples, you need to understand which numbers are vanilla primes but not Eisenstein primes. It is fortuitous that the Eisenstein integers are a PID, because it means that irreducible numbers (n = ab ==> n|a or n|b) are prime (n|ab ==> n|a or n|b). Therefore p, a vanilla prime, is an Eisenstein prime iff x^2 + xy + y^2 = 0 mod p has an interesting solution, iff x^2 + x + 1 = 0 mod p has an interesting solution, iff x^3 = 1 mod p has an interesting solution, iff the group of residues has 3n elements, iff p = 1 mod 3. Therefore 5, 11, 17, etc. are Eisenstein primes, but 7, 13, 19, etc. are not. Finally, 3 is not an Eisenstein prime, but since has only one Eisenstein prime factor that appears twice, rather than two distinct ones, its presence complicates the set of solutions but it does not produce solutions ex nihilo.