On Jan 15, 2008 10:44 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> > It might be a lot easier to help if you gave the rational function.
> > Depending on how complicated the denominator is, you basically just have to
> > compute the Taylor series of the rational function, by differentiation and
> > evaluation (using Taylor's formula), i.e., kind of like this is doing, but
> > over GF(p):
> >
> > sage: f = (x^3 + x +1)/((x^4 + x^2 + 2)*x^3*(x^3-5))
> > sage: f.taylor(x, 0, 4)
> > -1/(10*x^3) - 1/(10*x^2) + 1/(20*x) - 7/100 + x/200 + 17*x^2/200 -
> > 103*x^3/2000 - 23*x^4/2000
>
> Hi,
>
> sorry for not being specific enough earlier. In my particular application
>
>     f(t) = p(t)/(1-t)^n
>
> where p is a polynomial with integer coefficients. So I am not actually
> working over GF(p) and in that case the Taylor expansion seems to give me
> what I want. However as I am looking into this now, I try to come up with
> something more general. I am wondering what Magma is doing (maybe just Taylor
> as well?) and if we want this too, e.g. that
>
>   sage: L.<t> = LaurentSeriesRing(IntegerRing())
>   sage: L(f)
>
> returns the expansion? Would that make sense? Is it feasible?

Yes that makes sense and would be a great idea to do.

In your particular case above, you should write

p(t)/(1-t)^n  = p(t) * (1/(1-t))^n

then expand 1/(1-t) out as a geometric series, raise it to the
power of n, and multiply it by p(t).  You actually will get
a power series rather than a Laurent series, (1-t) has no pole
at 0.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to