Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
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)
Esempio n. 5
0
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)
Esempio n. 6
0
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)
Esempio n. 7
0
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
Esempio n. 8
0
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
Esempio n. 9
0
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
    )
Esempio n. 10
0
def test_issue1091():
    assert gruntz(x - gamma(1/x), x, oo) == S.EulerGamma
Esempio n. 11
0
def test_issue545():
    assert gruntz(((x**7 + x + 1)/(2**x + x**2))**(-1/x), x, oo) == 2
Esempio n. 12
0
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
Esempio n. 13
0
def test_issue1715():
    assert gruntz((x + 1)**(1/log(x + 1)), x, oo) == E
Esempio n. 14
0
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
Esempio n. 15
0
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
Esempio n. 16
0
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
Esempio n. 17
0
def test_limit4():
    skip("Takes too long")
    #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
Esempio n. 18
0
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
Esempio n. 19
0
def test_gruntz_eval_special():
    # Gruntz, p. 126
    assert gruntz(
        exp(x) * (sin(1 / x + exp(-x)) - sin(1 / x + exp(-x**2))), x, oo) == 1
    assert gruntz((erf(x - exp(-exp(x))) - erf(x)) * exp(exp(x)) * exp(x**2),
                  x, oo) == -2 / sqrt(pi)
    assert gruntz(
        exp(exp(x)) * (exp(sin(1 / x + exp(-exp(x)))) - exp(sin(1 / x))), x,
        oo) == 1
    assert gruntz(exp(x) * (gamma(x + exp(-x)) - gamma(x)), x, oo) == oo
    assert gruntz(exp(exp(digamma(digamma(x)))) / x, x, oo) == exp(-S(1) / 2)
    assert gruntz(exp(exp(digamma(log(x)))) / x, x, oo) == exp(-S(1) / 2)
    assert gruntz(digamma(digamma(digamma(x))), x, oo) == oo
    assert gruntz(loggamma(loggamma(x)), x, oo) == oo
    assert gruntz(
        ((gamma(x + 1 / gamma(x)) - gamma(x)) / log(x) - cos(1 / x)) * x *
        log(x), x, oo) == -S(1) / 2
    assert gruntz(x * (gamma(x-1/gamma(x)) - gamma(x) + log(x)), x, oo) \
           == S(1)/2
    assert gruntz((gamma(x + 1 / gamma(x)) - gamma(x)) / log(x), x, oo) == 1
Esempio n. 20
0
def test_issue545():
    assert gruntz(((x**7 + x + 1) / (2**x + x**2))**(-1 / x), x, oo) == 2
Esempio n. 21
0
def test_exp_log_series():
    assert gruntz(x / log(log(x * exp(x))), x, oo) == oo
Esempio n. 22
0
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
Esempio n. 23
0
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
Esempio n. 24
0
def test_gruntz_evaluation():
    # Gruntz' thesis pp. 122 to 123
    # 8.1
    assert gruntz(exp(x)*(exp(1/x - exp(-x)) - exp(1/x)), x, oo) == -1
    # 8.2
    assert gruntz(exp(x)*(exp(1/x + exp(-x) + exp(-x**2))
                  - exp(1/x - exp(-exp(x)))), x, oo) == 1
    # 8.3
    assert gruntz(exp(exp(x - exp(-x))/(1 - 1/x)) - exp(exp(x)), x, oo) == oo
    # 8.5
    assert gruntz(exp(exp(exp(x + exp(-x)))) / exp(exp(exp(x))), x, oo) == oo
    # 8.6
    assert gruntz(exp(exp(exp(x))) / exp(exp(exp(x - exp(-exp(x))))),
                  x, oo) == oo
    # 8.7
    assert gruntz(exp(exp(exp(x))) / exp(exp(exp(x - exp(-exp(exp(x)))))),
                  x, oo) == 1
    # 8.8
    assert gruntz(exp(exp(x)) / exp(exp(x - exp(-exp(exp(x))))), x, oo) == 1
    # 8.9
    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
    # 8.10
    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
    # 8.11
    assert gruntz((exp(x*exp(-x)/(exp(-x) + exp(-2*x**2/(x + 1)))) - exp(x))/x,
                  x, oo) == -exp(2)
    # 8.12
    assert gruntz((3**x + 5**x)**(1/x), x, oo) == 5
    # 8.13
    assert gruntz(x/log(x**(log(x**(log(2)/log(x))))), x, oo) == oo
    # 8.14
    assert gruntz(exp(exp(2*log(x**5 + x)*log(log(x))))
                  / exp(exp(10*log(x)*log(log(x)))), x, oo) == oo
    # 8.15
    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
    # 8.16
    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
    # 8.17
    assert gruntz(exp(x*exp(-x)/(exp(-x) + exp(-2*x**2/(x + 1))))/exp(x), x, oo) \
        == 1
    # 8.19
    assert gruntz(log(x)*(log(log(x) + log(log(x))) - log(log(x)))
                  / (log(log(x) + log(log(log(x))))), x, oo) == 1
    # 8.20
    assert gruntz(exp((log(log(x + exp(log(x)*log(log(x))))))
                  / (log(log(log(exp(x) + x + log(x)))))), x, oo) == E
    # Another
    assert gruntz(exp(exp(exp(x + exp(-x)))) / exp(exp(x)), x, oo) == oo
Esempio n. 25
0
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(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(exp(x))), x, oo) == oo
    assert gruntz(
        exp(exp(exp(x))) / exp(exp(exp(x - exp(-exp(exp(x)))))), x, oo) == 1
Esempio n. 26
0
def test_issue1715():
    assert gruntz((x + 1)**(1 / log(x + 1)), x, oo) == E
Esempio n. 27
0
def test_limit1():
    assert gruntz(x, x, oo) == oo
    assert gruntz(x, x, -oo) == -oo
    assert gruntz(-x, x, oo) == -oo
    assert gruntz(x**2, x, -oo) == oo
    assert gruntz(-x**2, x, oo) == -oo
    assert gruntz(x*log(x), x, 0, dir="+") == 0
    assert gruntz(1/x, x, oo) == 0
    assert gruntz(exp(x), x, oo) == oo
    assert gruntz(-exp(x), x, oo) == -oo
    assert gruntz(exp(x)/x, x, oo) == oo
    assert gruntz(1/x - exp(-x), x, oo) == 0
    assert gruntz(x + 1/x, x, oo) == oo
Esempio n. 28
0
def test_issue_4814():
    assert gruntz((x + 1)**(1/log(x + 1)), x, oo) == E
Esempio n. 29
0
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
Esempio n. 30
0
def test_issue_7096():
    from sympy.functions import sign
    assert gruntz(x**-pi, x, 0, dir='-') == oo*sign((-1)**(-pi))
Esempio n. 31
0
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
Esempio n. 32
0
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
Esempio n. 33
0
def test_limit1():
    assert gruntz(x, x, oo) == oo
    assert gruntz(x, x, -oo) == -oo
    assert gruntz(-x, x, oo) == -oo
    assert gruntz(x**2, x, -oo) == oo
    assert gruntz(-x**2, x, oo) == -oo
    assert gruntz(x * log(x), x, 0, dir="+") == 0
    assert gruntz(1 / x, x, oo) == 0
    assert gruntz(exp(x), x, oo) == oo
    assert gruntz(-exp(x), x, oo) == -oo
    assert gruntz(exp(x) / x, x, oo) == oo
    assert gruntz(1 / x - exp(-x), x, oo) == 0
    assert gruntz(x + 1 / x, x, oo) == oo
Esempio n. 34
0
def test_issue_1010():
    assert gruntz(1/gamma(x), x, 0) == 0
    assert gruntz(x*gamma(x), x, 0) == 1
Esempio n. 35
0
def test_exp_log_series():
    assert gruntz(x/log(log(x*exp(x))), x, oo) == oo
Esempio n. 36
0
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
Esempio n. 37
0
def test_issue3744():
    n = Symbol('n', integer=True, positive=True)
    r = (n + 1)*x**(n + 1)/(x**(n + 1) - 1) - x/(x - 1)
    assert gruntz(r, x, 1).simplify() == n/2
Esempio n. 38
0
def test_issue_3583():
    assert gruntz(exp(2*Ei(-x))/x**2, x, 0) == exp(2*EulerGamma)
Esempio n. 39
0
def test_gruntz_hyperbolic():
    assert gruntz(cosh(x), x, oo) == oo
    assert gruntz(cosh(x), x, -oo) == oo
    assert gruntz(sinh(x), x, oo) == oo
    assert gruntz(sinh(x), x, -oo) == -oo
    assert gruntz(2*cosh(x)*exp(x), x, oo) == oo
    assert gruntz(2*cosh(x)*exp(x), x, -oo) == 1
    assert gruntz(2*sinh(x)*exp(x), x, oo) == oo
    assert gruntz(2*sinh(x)*exp(x), x, -oo) == -1
    assert gruntz(tanh(x), x, oo) == 1
    assert gruntz(tanh(x), x, -oo) == -1
    assert gruntz(coth(x), x, oo) == 1
    assert gruntz(coth(x), x, -oo) == -1
Esempio n. 40
0
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
Esempio n. 41
0
def test_gruntz_eval_special():
    # Gruntz, p. 126
    assert gruntz(exp(x)*(sin(1/x + exp(-x)) - sin(1/x + exp(-x**2))), x, oo) == 1
    assert gruntz((erf(x - exp(-exp(x))) - erf(x)) * exp(exp(x)) * exp(x**2),
                  x, oo) == -2/sqrt(pi)
    assert gruntz(exp(exp(x)) * (exp(sin(1/x + exp(-exp(x)))) - exp(sin(1/x))),
                  x, oo) == 1
    assert gruntz(exp(x)*(gamma(x + exp(-x)) - gamma(x)), x, oo) == oo
    assert gruntz(exp(exp(digamma(digamma(x))))/x, x, oo) == exp(-S(1)/2)
    assert gruntz(exp(exp(digamma(log(x))))/x, x, oo) == exp(-S(1)/2)
    assert gruntz(digamma(digamma(digamma(x))), x, oo) == oo
    assert gruntz(loggamma(loggamma(x)), x, oo) == oo
    assert gruntz(((gamma(x + 1/gamma(x)) - gamma(x))/log(x) - cos(1/x))
                  * x*log(x), x, oo) == -S(1)/2
    assert gruntz(x * (gamma(x - 1/gamma(x)) - gamma(x) + log(x)), x, oo) \
        == S(1)/2
    assert gruntz((gamma(x + 1/gamma(x)) - gamma(x)) / log(x), x, oo) == 1
Esempio n. 42
0
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