Franck MICHEL on Sun, 23 Feb 2003 12:33:15 +0100


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

Fast substitutions in Pari


Hi,

Assume u is a polynomial in x of degree n, and phi is a rational fraction
in t.
I would like to transform u to a truncated series in t, i.e:
- replace x by phi in u; 
- and expand in t (to the degree n).

I set seriesprecision to n and use:
taylor(subst(u,x,phi),t);

It is very simple; but is it the best way to do it?

I have to do this task many times, with large polynomials, the speed is
very important.

I've tried to first expand phi in t; and to substitute the series in t into
the polynomial in x. But it is slower, even if we add an O(t^p) to the
series in t, with p chosen in function of x^k. Perhaps this kind of
manipulation is already done by Pari with taylor(subst(u,x,phi),t) and
there is no need to search to improve it (?)

Thanks in advance for your advices.

 Franck