Karim BELABAS on Wed, 23 Jun 1999 13:20:22 +0200 (MET DST)


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

Re: changevar


[Rosita Wachenchauzer:]
> Here is some problem I've found while using the changevar function in
> the GP calculator.
[...]
> ? p = x^5+5*x*y^3+z
> %1  = x^5 + 5*y^3*x + z
> ? poldegree(p)
> %2 = 5
> ? q =changevar(p,[z,x,y])
> %3 = 5*z*y^3 + (z^5 + z)
> ? poldegree(q)
> %4  = 3
> 
> while the change of variable was done in order
> to obtain polynomial  5*z*x^3 + (z^5 + y)

Not exactly.

? p = x^5+5*x*y^3+z
%1 = x^5 + 5*y^3*x + z
? reorder               \\ list of defined variables
%2 = [x, p, y, z]
        ^^^
Hence your change of variable [z,x,y] is in fact

  x --> z
  p --> x
  y --> y

The changevar function is very hard to use reliably due to these phenomenons
unless you start the session by defining first the needed variables in the
correct order.

? x; y; z; t; ...
? p = x^5 + ...

would be ok.

Karim.
__
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://hasse.mathematik.tu-muenchen.de/ntsw/pari/