• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python sympy.residue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中sympy.residue函数的典型用法代码示例。如果您正苦于以下问题:Python residue函数的具体用法?Python residue怎么用?Python residue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了residue函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_expressions_failing

def test_expressions_failing():
    assert residue(1/(x**4 + 1), x, exp(I*pi/4)) == -(S(1)/4 + I/4)/sqrt(2)

    n = Symbol('n', integer=True, positive=True)
    assert residue(exp(z)/(z - pi*I/4*a)**n, z, I*pi*a) == \
        exp(I*pi*a/4)/factorial(n - 1)
    assert residue(1/(x**2 + a**2)**2, x, a*I) == -I/4/a**3
开发者ID:AALEKH,项目名称:sympy,代码行数:7,代码来源:test_residues.py


示例2: test_basic1

def test_basic1():
    assert residue(1 / x, x, 0) == 1
    assert residue(-2 / x, x, 0) == -2
    assert residue(81 / x, x, 0) == 81
    assert residue(1 / x ** 2, x, 0) == 0
    assert residue(0, x, 0) == 0
    assert residue(5, x, 0) == 0
    assert residue(x, x, 0) == 0
    assert residue(x ** 2, x, 0) == 0
开发者ID:vipulroxx,项目名称:sympy,代码行数:9,代码来源:test_residues.py


示例3: test_basic2

def test_basic2():
    assert residue(1 / x, x, 1) == 0
    assert residue(-2 / x, x, 1) == 0
    assert residue(81 / x, x, -1) == 0
    assert residue(1 / x ** 2, x, 1) == 0
    assert residue(0, x, 1) == 0
    assert residue(5, x, 1) == 0
    assert residue(x, x, 1) == 0
    assert residue(x ** 2, x, 5) == 0
开发者ID:vipulroxx,项目名称:sympy,代码行数:9,代码来源:test_residues.py


示例4: test_basic2

def test_basic2():
    x = Symbol("x")
    assert residue(1/x, x, 1) == 0
    assert residue(-2/x, x, 1) == 0
    assert residue(81/x, x, -1) == 0
    assert residue(1/x**2, x, 1) == 0
    assert residue(0, x, 1) == 0
    assert residue(5, x, 1) == 0
    assert residue(x, x, 1) == 0
    assert residue(x**2, x, 5) == 0
开发者ID:ALGHeArT,项目名称:sympy,代码行数:10,代码来源:test_residues.py


示例5: test_expressions

def test_expressions():
    assert residue(1 / (x + 1), x, 0) == 0
    assert residue(1 / (x + 1), x, -1) == 1
    assert residue(1 / (x ** 2 + 1), x, -1) == 0
    assert residue(1 / (x ** 2 + 1), x, I) == -I / 2
    assert residue(1 / (x ** 2 + 1), x, -I) == I / 2
    assert residue(1 / (x ** 4 + 1), x, 0) == 0
开发者ID:vipulroxx,项目名称:sympy,代码行数:7,代码来源:test_residues.py


示例6: test_bug

def test_bug():
    assert residue(2 ** (z) * (s + z) * (1 - s - z) / z ** 2, z, 0) == 1 + s * log(2) - s ** 2 * log(2) - 2 * s
开发者ID:vipulroxx,项目名称:sympy,代码行数:2,代码来源:test_residues.py


示例7: test_NotImplemented

def test_NotImplemented():
    raises(NotImplementedError, lambda: residue(exp(1 / z), z, 0))
开发者ID:vipulroxx,项目名称:sympy,代码行数:2,代码来源:test_residues.py


示例8: test_functions

def test_functions():
    assert residue(1 / sin(x), x, 0) == 1
    assert residue(2 / sin(x), x, 0) == 2
    assert residue(1 / sin(x) ** 2, x, 0) == 0
    assert residue(1 / sin(x) ** 5, x, 0) == S(3) / 8
开发者ID:vipulroxx,项目名称:sympy,代码行数:5,代码来源:test_residues.py


示例9: _test_f

def _test_f():
    f = Function("f")
    assert residue(f(x) / x ** 5, x, 0) == f(x).diff(x, 4).subs(x, 0) / 24
开发者ID:vipulroxx,项目名称:sympy,代码行数:3,代码来源:test_residues.py


示例10: test_functions

def test_functions():
    x = Symbol("x")
    assert residue(1/sin(x), x, 0) == 1
    assert residue(2/sin(x), x, 0) == 2
    assert residue(1/sin(x)**2, x, 0) == 0
开发者ID:101man,项目名称:sympy,代码行数:5,代码来源:test_residues.py


示例11: test_issue_3400

def test_issue_3400():
    assert residue(1/(exp(z) - 1), z, 0) == 1

    # github issue 2519:
    assert residue((z**3 + 5)/((z**4 - 1)*(z + 1)), z, -1) == -S(9)/4
开发者ID:AALEKH,项目名称:sympy,代码行数:5,代码来源:test_residues.py


示例12: _test_f

def _test_f():
    # FIXME: we get infinite recursion here:
    f = Function("f")
    assert residue(f(x)/x**5, x, 0) == f.diff(x, 4)/24
开发者ID:AALEKH,项目名称:sympy,代码行数:4,代码来源:test_residues.py


示例13: test_bug

def test_bug():
    from sympy.abc import s, z
    assert residue(2**(z)*(s+z)*(1-s-z)/z**2, z, 0) == \
           1 + s*log(2) - s**2*log(2) - 2*s
开发者ID:ALGHeArT,项目名称:sympy,代码行数:4,代码来源:test_residues.py


示例14: test_issue_3400

def test_issue_3400():
    assert residue(1/(exp(z) - 1), z, 0) == 1
开发者ID:Amo10,项目名称:Computer-Science-2014-2015,代码行数:2,代码来源:test_residues.py


示例15: test_NotImplemented

def test_NotImplemented():
    z = Symbol('z')
    raises(NotImplementedError, lambda: residue(exp(1/z), z, 0))
开发者ID:Acebulf,项目名称:sympy,代码行数:3,代码来源:test_residues.py


示例16: test_issue_5654

def test_issue_5654():
    assert residue(1 / (x ** 2 + a ** 2) ** 2, x, a * I) == -I / (4 * a ** 3)
开发者ID:vipulroxx,项目名称:sympy,代码行数:2,代码来源:test_residues.py


示例17: test_issue_6499

def test_issue_6499():
    assert residue(1 / (exp(z) - 1), z, 0) == 1
开发者ID:vipulroxx,项目名称:sympy,代码行数:2,代码来源:test_residues.py


示例18: test_expressions_failing

def test_expressions_failing():
    x = Symbol('x')
    assert residue(1/(x**4+1), x, exp(I*pi/4)) == -(S(1)/4+I/4)/sqrt(2)
开发者ID:AlexandruFlorescu,项目名称:sympy,代码行数:3,代码来源:test_residues.py



注:本文中的sympy.residue函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python sympy.rf函数代码示例发布时间:2022-05-27
下一篇:
Python sympy.refine函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap