本文整理汇总了Python中sympy.series.gruntz.gruntz函数的典型用法代码示例。如果您正苦于以下问题:Python gruntz函数的具体用法?Python gruntz怎么用?Python gruntz使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gruntz函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_I
def test_I():
from sympy.functions import sign as sgn
y = Symbol("y")
assert gruntz(I*x, x, oo) == I*oo
assert gruntz(y*I*x, x, oo) == y*I*oo
assert gruntz(y*3*I*x, x, oo) == y*I*oo
assert gruntz(y*3*sin(I)*x, x, oo).simplify() == sgn(y)*I*oo
开发者ID:AALEKH,项目名称:sympy,代码行数:7,代码来源:test_gruntz.py
示例2: test_gruntz_evaluation_slow
def test_gruntz_evaluation_slow():
sskip()
assert gruntz((exp(exp(-x/(1+exp(-x))))*exp(-x/(1+exp(-x/(1+exp(-x)))))
*exp(exp(-x+exp(-x/(1+exp(-x))))))
/ (exp(-x/(1+exp(-x))))**2 - exp(x) + x, x, oo) == 2
assert gruntz(exp(exp(exp(x)/(1-1/x)))
- exp(exp(exp(x)/(1-1/x-log(x)**(-log(x))))), x, oo) == -oo
开发者ID:greensnake,项目名称:sympy,代码行数:7,代码来源:test_gruntz.py
示例3: test_gruntz_eval_special_slow
def test_gruntz_eval_special_slow():
sskip()
assert gruntz(gamma(x+1)/sqrt(2*pi)
- exp(-x)*(x**(x+S(1)/2) + x**(x-S(1)/2)/12), x, oo) == oo
assert gruntz(exp(exp(exp(digamma(digamma(digamma(x))))))/x, x, oo) == 0
# XXX This sometimes fails!!!
assert gruntz(exp(gamma(x-exp(-x))*exp(1/x)) - exp(gamma(x)), x, oo) == oo
开发者ID:101man,项目名称:sympy,代码行数:7,代码来源:test_gruntz.py
示例4: test_gruntz_eval_special_fail
def test_gruntz_eval_special_fail():
# TODO exponential integral Ei
assert gruntz(
(Ei(x - exp(-exp(x))) - Ei(x)) *exp(-x)*exp(exp(x))*x, x, oo) == -1
# TODO zeta function series
assert gruntz(
exp((log(2) + 1)*x) * (zeta(x + exp(-x)) - zeta(x)), x, oo) == -log(2)
开发者ID:agamdua,项目名称:sympy,代码行数:8,代码来源:test_gruntz.py
示例5: test_issue_2073
def test_issue_2073():
n = Symbol('n')
r = Symbol('r', positive=True)
c = Symbol('c')
p = Symbol('p', positive=True)
m = Symbol('m', negative=True)
expr = ((2*n*(n - r + 1)/(n + r*(n - r + 1)))**c + \
(r - 1)*(n*(n - r + 2)/(n + r*(n - r + 1)))**c - n)/(n**c - n)
expr = expr.subs(c, c + 1)
assert gruntz(expr.subs(c, m), n, oo) == 1
# fail:
assert gruntz(expr.subs(c, p), n, oo).simplify() == \
(2**(p + 1) + r - 1)/(r + 1)**(p + 1)
开发者ID:agamdua,项目名称:sympy,代码行数:13,代码来源:test_gruntz.py
示例6: test_issue_5172
def test_issue_5172():
n = Symbol("n")
r = Symbol("r", positive=True)
c = Symbol("c")
p = Symbol("p", positive=True)
m = Symbol("m", negative=True)
expr = (
(2 * n * (n - r + 1) / (n + r * (n - r + 1))) ** c
+ (r - 1) * (n * (n - r + 2) / (n + r * (n - r + 1))) ** c
- n
) / (n ** c - n)
expr = expr.subs(c, c + 1)
assert gruntz(expr.subs(c, m), n, oo) == 1
# fail:
assert gruntz(expr.subs(c, p), n, oo).simplify() == (2 ** (p + 1) + r - 1) / (r + 1) ** (p + 1)
开发者ID:Carreau,项目名称:sympy,代码行数:15,代码来源:test_gruntz.py
示例7: test_intractable
def test_intractable():
assert gruntz(1/gamma(x), x, oo) == 0
assert gruntz(1/loggamma(x), x, oo) == 0
assert gruntz(gamma(x)/loggamma(x), x, oo) == oo
assert gruntz(exp(gamma(x))/gamma(x), x, oo) == oo
assert gruntz(gamma(x), x, 3) == 2
assert gruntz(gamma(S(1)/7 + 1/x), x, oo) == gamma(S(1)/7)
assert gruntz(log(x**x)/log(gamma(x)), x, oo) == 1
assert gruntz(log(gamma(gamma(x)))/exp(x), x, oo) == oo
开发者ID:agamdua,项目名称:sympy,代码行数:9,代码来源:test_gruntz.py
示例8: test_limit2
def test_limit2():
assert gruntz(x**x, x, 0, dir="+") == 1
assert gruntz((exp(x) - 1)/x, x, 0) == 1
assert gruntz(1 + 1/x, x, oo) == 1
assert gruntz(-exp(1/x), x, oo) == -1
assert gruntz(x + exp(-x), x, oo) == oo
assert gruntz(x + exp(-x**2), x, oo) == oo
assert gruntz(x + exp(-exp(x)), x, oo) == oo
assert gruntz(13 + 1/x - exp(-x), x, oo) == 13
开发者ID:agamdua,项目名称:sympy,代码行数:9,代码来源:test_gruntz.py
示例9: test_gruntz_evaluation_slow
def test_gruntz_evaluation_slow():
_sskip()
# 8.4
assert gruntz(exp(exp(exp(x) / (1 - 1 / x))) - exp(exp(exp(x) / (1 - 1 / x - log(x) ** (-log(x))))), x, oo) == -oo
# 8.18
assert (
gruntz(
(
exp(exp(-x / (1 + exp(-x))))
* exp(-x / (1 + exp(-x / (1 + exp(-x)))))
* exp(exp(-x + exp(-x / (1 + exp(-x)))))
)
/ (exp(-x / (1 + exp(-x)))) ** 2
- exp(x)
+ x,
x,
oo,
)
== 2
)
开发者ID:Carreau,项目名称:sympy,代码行数:20,代码来源:test_gruntz.py
示例10: test_I
def test_I():
y = Symbol("y")
assert gruntz(I*x, x, oo) == I*oo
assert gruntz(y*I*x, x, oo) == y*I*oo
assert gruntz(y*3*I*x, x, oo) == y*I*oo
assert gruntz(y*3*sin(I)*x, x, oo) == y*I*oo
开发者ID:agamdua,项目名称:sympy,代码行数:6,代码来源:test_gruntz.py
示例11: test_issue1715
def test_issue1715():
assert gruntz((x + 1)**(1/log(x + 1)), x, oo) == E
开发者ID:agamdua,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
示例12: test_limit3
def test_limit3():
a = Symbol('a')
assert gruntz(x - log(1 + exp(x)), x, oo) == 0
assert gruntz(x - log(a + exp(x)), x, oo) == 0
assert gruntz(exp(x)/(1 + exp(x)), x, oo) == 1
assert gruntz(exp(x)/(a + exp(x)), x, oo) == 1
开发者ID:agamdua,项目名称:sympy,代码行数:6,代码来源:test_gruntz.py
示例13: test_limit4
def test_limit4():
#issue 364
assert gruntz((3**x + 5**x)**(1/x), x, oo) == 5
#issue 364
assert gruntz((3**(1/x) + 5**(1/x))**x, x, 0) == 5
开发者ID:agamdua,项目名称:sympy,代码行数:5,代码来源:test_gruntz.py
示例14: test_issue1091
def test_issue1091():
assert gruntz(x - gamma(1/x), x, oo) == S.EulerGamma
开发者ID:agamdua,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
示例15: test_gruntz_evaluation
def test_gruntz_evaluation():
# Gruntz' thesis pp. 122 to 123
assert gruntz(exp(x)*(exp(1/x-exp(-x))-exp(1/x)), x, oo) == -1
assert gruntz((x*log(x)*(log(x*exp(x)-x**2))**2)
/ (log(log(x**2+2*exp(exp(3*x**3*log(x)))))), x, oo) == S(1)/3
assert gruntz((3**x + 5**x)**(1/x), x, oo) == 5
assert gruntz(exp(exp(S(5)/2*x**(-S(5)/7)+ S(21)/8*x**(S(6)/11)
+2*x**(-8)+S(54)/17*x**(S(49)/45) ))**8
/ log(log(-log(S(4)/3*x**(-S(5)/14))))**(S(7)/6), x, oo) == oo
assert gruntz(exp(x*exp(-x)/(exp(-x)+exp(-2*x**2/(x+1))))/exp(x), x, oo) \
== 1
assert gruntz(log(x)*(log(log(x)+log(log(x))) - log(log(x)))
/ (log(log(x)+log(log(log(x))))), x, oo) == 1
assert gruntz(x/log(x**(log(x**(log(2)/log(x))))), x, oo) == oo
assert gruntz(log(x)**2 * exp(sqrt(log(x))*(log(log(x)))**2
* exp(sqrt(log(log(x))) * (log(log(log(x))))**3)) / sqrt(x),
x, oo) == 0
assert gruntz(exp((log(log(x+exp(log(x)*log(log(x))))))
/ (log(log(log(exp(x)+x+log(x)))))), x, oo) == E
assert gruntz(exp(x)*(exp(1/x+exp(-x)+exp(-x**2)) \
- exp(1/x-exp(-exp(x)))), x, oo) == 1
assert gruntz((exp(4*x*exp(-x)/(1/exp(x)+1/exp(2*x**2/(x+1)))) - exp(x))
/ exp(x)**4, x, oo) == 1
assert gruntz(exp(exp(x-exp(-x))/(1-1/x)) - exp(exp(x)), x, oo) == oo
assert gruntz(exp(exp(2*log(x**5+x)*log(log(x))))
/ exp(exp(10*log(x)*log(log(x)))), x, oo) == oo
assert gruntz((exp(x*exp(-x)/(exp(-x)+exp(-2*x**2/(x+1)))) - exp(x))/x,
x, oo) == -exp(2)
assert gruntz(exp(exp(x)) / exp(exp(x-exp(-exp(exp(x))))), x, oo) == 1
assert gruntz(exp(exp(exp(x+exp(-x)))) / exp(exp(exp(x))), x, oo) == oo
assert gruntz(exp(exp(exp(x+exp(-x)))) / exp(exp(x)), x, oo) == 1
assert gruntz(exp(exp(exp(x))) / exp(exp(exp(x-exp(-exp(exp(x)))))),
x, oo) == 1
开发者ID:greensnake,项目名称:sympy,代码行数:33,代码来源:test_gruntz.py
示例16: test_aseries_trig
def test_aseries_trig():
assert cancel(gruntz(1/log(atan(x)), x, oo)
- 1/(log(pi) + log(S(1)/2))) == 0
assert gruntz(1/acot(x), x, -oo) == -oo
开发者ID:agamdua,项目名称:sympy,代码行数:4,代码来源:test_gruntz.py
示例17: test_issue545
def test_issue545():
assert gruntz(((x**7 + x + 1)/(2**x + x**2))**(-1/x), x, oo) == 2
开发者ID:agamdua,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
示例18: test_grunts_eval_special_slow_sometimes_fail
def test_grunts_eval_special_slow_sometimes_fail():
_sskip()
# XXX This sometimes fails!!!
assert gruntz(exp(gamma(x - exp(-x))*exp(1/x)) - exp(gamma(x)), x, oo) == oo
开发者ID:agamdua,项目名称:sympy,代码行数:4,代码来源:test_gruntz.py
示例19: test_gruntz_eval_special_slow
def test_gruntz_eval_special_slow():
_sskip()
assert gruntz(gamma(x + 1)/sqrt(2*pi)
- exp(-x)*(x**(x + S(1)/2) + x**(x - S(1)/2)/12), x, oo) == oo
assert gruntz(exp(exp(exp(digamma(digamma(digamma(x))))))/x, x, oo) == 0
开发者ID:agamdua,项目名称:sympy,代码行数:5,代码来源:test_gruntz.py
示例20: test_issue_3583
def test_issue_3583():
assert gruntz(exp(2*Ei(-x))/x**2, x, 0) == exp(2*EulerGamma)
开发者ID:AALEKH,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
注:本文中的sympy.series.gruntz.gruntz函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论