Max Alekseyev on Thu, 20 Nov 2008 05:27:53 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Pell's equations and beyond |
Dear Karim, Thank you for the answers. One of important reasons I like Dario Alpern's java applet - it simply does "the job" for generic input by taking care of all possible branchings and degenerate cases. I would very welcome similar functionality for PARI/GP... As PARI/GP provides only basic functionality, I wonder if there is available any third-party wrapper that would take care of all degenerate cases in the course of solving general quadratic bivariate Diophantine equation? Or is it possible to extend PARI/GP functionality this way? Thanks, Max On Wed, Nov 19, 2008 at 7:09 PM, Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr> wrote: > * Max Alekseyev [2008-11-20 00:29]: >> I dream about having the functionality of Dario Alpern's quadratic >> bivariate Diophantine equation solver: >> http://www.alpertron.com.ar/QUAD.HTM >> in PARI/GP. Is anything like that already present there? >> At the moment, I'm not even sure if there is a simple way to solve >> Pell's equations in PARI/GP. >> >> Could you please clarify what is the best way (and if there exists one >> without much programming) to solve the following equations in PARI/GP: >> >> 1) Pell's equation x^2 - D y^2 = 1, where D is integer ? > > This is more or less given by quadunit(D) or (much better when D is large), > K = bnfinit(x^2 - D); K.fu > > Both assume that D is not a square. > >> 2) Generalized Pell's equation x^2 - D y^2 = c, where D and c are integer ? > > K = bnfinit(x^2 - D); bnfisintnorm(K, c) > > Assumes D not a square. Otherwise, it's "simpler" but a bit tedious to > program (special case c = 0, otherwise for each divisor of c, you get a > new 2 x 2 linear system). > >> 3) Quadratic bivariate Diophantine equation in the general form: ax^2 >> + bxy + cy^2 + dx + ey + f = 0, where a,b,c,d,e,f are integer >> coefficients ? > > You can reduce it to the above cases by a translation, but it's again > tedious: have to treat separately a number of degenerate cases... > > Cheers, > > K.B. > -- > Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 > Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 > 351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/ > F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP] > ` >