-2

I've been assigned to write a program which then calculates the Laurent series of a function using Python. I've already found a library called SymPy for symbolical computations in Python but the problem is I have no idea how should I produce the Laurent series in the program. Of course I'm familiar with the concept, but I've always calculated the Laurent series in an ad hoc way using Taylor series, never used an algorithmic method. I'd be grateful if someone helps me in finding an algorithm to produce the Laurent series using the inputs mentioned in the question below :-)

Given a fractional function containing polynomials in both numerator
and denominator; find its Laurent series in all convergence domains.
The polynomials are given by its zeros. For example, the function 
((z-1)(z+i))/(z^2(z-1)(z+1)) is given in the input as:
+   1+0i    0-1i 
    0+0i    0+0i    1+0i    -1+0i 
The first sign (+ or -) defines the sign of the fraction. 
The output of the above example is the Laurent series around z0=0 in two convergence domains: |z|<1 and |z|>1.
Ahmad Siavosh
  • 646
  • 1
  • 9
  • 22
  • 2
    This question isn't really suitable for StackOverflow in its current form. However, Sage has some [Laurent functions](http://www.sagemath.org/doc/reference/power_series/sage/rings/laurent_series_ring_element.html#laurent-series), you might get some ideas looking at the Python [source code](http://sagenb.org/src/rings/laurent_series_ring.py). – PM 2Ring Jan 21 '15 at 13:26

1 Answers1

1

You can reform denominator and use these expansions:

$\frac{1}{1-u}= \sum _{n=0}^{\infty }{u^n}$

$\frac{1}{1+u} = \sum _{n=0}^{\infty} (-1)^n u ^ n$

Sia Kateb
  • 21
  • 1
  • 3