Karim Belabas on Sat, 16 Nov 2013 22:50:47 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Shorter way to convert polynomial in x^3 to x?


* 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

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-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`