Bill Allombert on Sun, 17 Nov 2013 00:29:07 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Shorter way to convert polynomial in x^3 to x? |
On Sat, Nov 16, 2013 at 10:50:32PM +0100, Karim Belabas wrote: > * Richard Heylen [2013-11-16 22:43]: > > ? f=factor(elldivpol(ellinit([0,1]),13))[1,1] > > %32 = 13*x^12 + 52*x^9 + 1536*x^6 + 1024*x^3 + 256 > > ? Pol(vector(poldegree(f)/3+1,i,polcoeff(f,poldegree(f)-3*i+3))) > > %33 = 13*x^4 + 52*x^3 + 1536*x^2 + 1024*x + 256 > > > > > > I tried using subst(f,x,y^(1/3)) but to no avail. Is there a short way > > of doing this? > > (22:50) gp > substpol(f,x^3,x) > %2 = 13*x^4 + 52*x^3 + 1536*x^2 + 1024*x + 256 Eventually Richard idea can be made to work: ? lift(subst(f,x,Mod(x,x^3-y))) %9 = 13*y^4+52*y^3+1536*y^2+1024*y+256 (i.e. y^(1/3) can be denoted by Mod(x,x^3-y) in GP) Cheers, Bill.