Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Python查找函数的Laurent级数_Python_Algorithm_Python 2.7_Math_Complex Numbers - Fatal编程技术网

使用Python查找函数的Laurent级数

使用Python查找函数的Laurent级数,python,algorithm,python-2.7,math,complex-numbers,Python,Algorithm,Python 2.7,Math,Complex Numbers,我被指派编写一个程序,然后使用Python计算函数的劳伦特级数。我已经在Python中找到了一个用于符号计算的库,但问题是我不知道如何在程序中生成Laurent级数。当然,我对这个概念很熟悉,但我总是用泰勒级数以一种特殊的方式计算洛朗级数,从来没有使用过算法方法。如果有人能帮助我找到一种算法,使用下面问题中提到的输入生成劳伦特级数,我将不胜感激:-) 给定一个分数函数,该函数包含两个分子中的多项式 和分母;在所有收敛域中找到它的Laurent级数。 多项式由其零点给出。例如,函数 ((z-1)(

我被指派编写一个程序,然后使用Python计算函数的劳伦特级数。我已经在Python中找到了一个用于符号计算的库,但问题是我不知道如何在程序中生成Laurent级数。当然,我对这个概念很熟悉,但我总是用泰勒级数以一种特殊的方式计算洛朗级数,从来没有使用过算法方法。如果有人能帮助我找到一种算法,使用下面问题中提到的输入生成劳伦特级数,我将不胜感激:-)

给定一个分数函数,该函数包含两个分子中的多项式
和分母;在所有收敛域中找到它的Laurent级数。
多项式由其零点给出。例如,函数
((z-1)(z+i))/(z^2(z-1)(z+1))在输入中表示为:
+1+0i 0-1i
0+0i 0+0i 1+0i-1+0i
第一个符号(+或-)定义分数的符号。
上述示例的输出是两个收敛域中z0=0附近的劳伦特级数:| z | 1。

您可以改革分母并使用以下扩展:

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


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

这个问题实际上不适合当前形式的堆栈溢出。然而,Sage有一些,您可能会对Python有一些想法。
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.