Bill Allombert on Thu, 12 Dec 2002 14:00:21 +0100


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

Re: How to eliminate the big-oh


On Thu, Dec 12, 2002 at 12:26:44PM +0100, Franck MICHEL wrote:
> Thank you, it works. Certainly a naive question, but: how can we know the
> level of priority of variables? Is it possible to change it?

The rule is: x has always the highest priority, then priorities are
assigned to variable as soon as they are introduced.

The customary way to avoid problem is to enter x;t;z as the start of a gp
session, so that we have  x >> t >> z

> >fortunately there is a  simpler solution, convert your polynomial to a
> vector:
> >
> >Pol(truncate(Vec(taylor((1-x)/(1-t),t))))
> 
> It's a nicest solution, unfortunately it does not work for other expressions.
> For example, if we slightly modify (1-x)/(1-t) and consider
> 
> truncate(taylor((1-x)/(x-t),t)), we get -1+O(t^16)
> 
> Pol(truncate(Vec(taylor((1-x)/(x-t),t)))) gives the same bad answer

Of course, because it is a rational function not a polynomial.
The answer is correct, since truncate() apply to the highest priority
variable, that is x, and (1-x)/x=x^-1 - 1 + O(x^15)

> but subst(truncate(subst(taylor((1-x)/(x-t),t),x,z)),z,x) gives the good
> expansion.



> If we ask for the type of taylor(1/(1-t),t), we get "SER"; for
> taylor((1-x)/(1-t),t) we get "POL"; and for taylor((1-x)/(x-t),t) we get
> "RFRAC". When we have x and t, the type is determined with respect to x. It
> is determined with respect to t after changing z in x as you have
> suggested. If we have to deal with a quotient with multiple variables (x,
> y, z, etc.., and t), I presume all the variables above the level of
> priority of t would have to be substituted by variables below the level of
> priority of t. But it is not very convenient, the determination of levels
> of priority of variables is a little bit mysterious for me and I am
> wondering if there would be a better solution than using substitutions with
> low-level variables.

I agree, this system is confusing, but we don't have any idea to make it
better.

I suppose we should extend truncate to take the variable we want to truncate
as an extra parameters.

Cheers,
Bill.