In [1]:
from sympy import *

In [2]:
x = Symbol("x")

In [3]:
limit(exp(x)*exp(x**2)*(erf(x+1/exp(x))-erf(x)), x, oo)


Out[3]:
2/sqrt(pi)

The examples here show the limit computation on exp-log expressions (from Gruntz' thesis pp. 122 to 123)

Eqn 8.1


In [4]:
exp(x)*(exp(1/x-exp(-x))-exp(1/x))


Out[4]:
(-exp(1/x) + exp(-exp(-x) + 1/x))*exp(x)

In [5]:
limit(_, x, oo)


Out[5]:
-1

Eqn 8.2


In [6]:
exp(x)*(exp(1/x+exp(-x)+exp(-x**2)) - exp(1/x-exp(-exp(x))))


Out[6]:
(-exp(-exp(-exp(x)) + 1/x) + exp(exp(-x**2) + exp(-x) + 1/x))*exp(x)

In [7]:
limit(_, x, oo)


Out[7]:
1

Eqn 8.3


In [8]:
exp(exp(x-exp(-x))/(1-1/x)) - exp(exp(x))


Out[8]:
exp(exp(x - exp(-x))/(1 - 1/x)) - exp(exp(x))

In [9]:
limit(_, x, oo)


Out[9]:
oo

Eqn 8.4


In [10]:
exp(exp(exp(x)/(1-1/x))) - exp(exp(exp(x)/(1-1/x-log(x)**(-log(x)))))


Out[10]:
exp(exp(exp(x)/(1 - 1/x))) - exp(exp(exp(x)/(1 - log(x)**(-log(x)) - 1/x)))

In [11]:
limit(_, x, oo)


Out[11]:
-oo

Eqn 8.5


In [12]:
exp(exp(exp(x+exp(-x)))) / exp(exp(exp(x)))


Out[12]:
exp(-exp(exp(x)))*exp(exp(exp(x + exp(-x))))

In [13]:
limit(_, x, oo)


Out[13]:
oo

Eqn 8.6


In [14]:
exp(exp(exp(x))) / exp(exp(exp(x-exp(-exp(x)))))


Out[14]:
exp(exp(exp(x)))*exp(-exp(exp(x - exp(-exp(x)))))

In [15]:
limit(_, x, oo)


Out[15]:
oo

Eqn 8.7


In [16]:
exp(exp(exp(x))) / exp(exp(exp(x-exp(-exp(exp(x))))))


Out[16]:
exp(exp(exp(x)))*exp(-exp(exp(x - exp(-exp(exp(x))))))

In [17]:
limit(_, x, oo)


Out[17]:
1

Eqn 8.8


In [18]:
exp(exp(x)) / exp(exp(x-exp(-exp(exp(x)))))


Out[18]:
exp(exp(x))*exp(-exp(x - exp(-exp(exp(x)))))

In [19]:
limit(_, x, oo)


Out[19]:
1

Eqn 8.9


In [20]:
log(x)**2 * exp(sqrt(log(x))*(log(log(x)))**2 * exp(sqrt(log(log(x))) * (log(log(log(x))))**3)) / sqrt(x)


Out[20]:
exp(exp(sqrt(log(log(x)))*log(log(log(x)))**3)*sqrt(log(x))*log(log(x))**2)*log(x)**2/sqrt(x)

In [21]:
limit(_, x, oo)


Out[21]:
0

Eqn 8.10


In [22]:
(x*log(x)*(log(x*exp(x)-x**2))**2) / (log(log(x**2+2*exp(exp(3*x**3*log(x))))))


Out[22]:
x*log(x)*log(-x**2 + x*exp(x))**2/log(log(x**2 + 2*exp(exp(3*x**3*log(x)))))

In [23]:
limit(_, x, oo)


Out[23]:
1/3

Eqn 8.11


In [24]:
(exp(x*exp(-x)/(exp(-x)+exp(-2*x**2/(x+1)))) - exp(x))/x


Out[24]:
(-exp(x) + exp(x*exp(-x)/(exp(-2*x**2/(x + 1)) + exp(-x))))/x

In [25]:
limit(_, x, oo)


Out[25]:
-exp(2)

Eqn 8.12


In [26]:
(3**x + 5**x)**(1/x)


Out[26]:
(3**x + 5**x)**(1/x)

In [27]:
limit(_, x, oo)


Out[27]:
5

Eqn 8.13


In [28]:
x/log(x**(log(x**(log(2)/log(x)))))


Out[28]:
x/log(x**log(x**(log(2)/log(x))))

In [29]:
limit(_, x, oo)


Out[29]:
oo

Eqn 8.14


In [30]:
exp(exp(2*log(x**5+x)*log(log(x)))) / exp(exp(10*log(x)*log(log(x))))


Out[30]:
exp(-exp(10*log(x)*log(log(x))))*exp(exp(2*log(x**5 + x)*log(log(x))))

In [31]:
limit(_, x, oo)


Out[31]:
oo

Eqn 8.15


In [32]:
4*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 / (9*log(log(-log(S(4)/3*x**(-S(5)/14))))**(S(7)/6))


Out[32]:
4*exp(8*exp(54*x**(49/45)/17 + 21*x**(6/11)/8 + 2/x**8 + 5/(2*x**(5/7))))/(9*log(log(-log(4/(3*x**(5/14)))))**(7/6))

In [33]:
limit(_, x, oo)


Out[33]:
oo

Eqn 8.16


In [34]:
(exp(4*x*exp(-x)/(1/exp(x)+1/exp(2*x**2/(x+1)))) - exp(x)) / exp(x)**4


Out[34]:
(-exp(x) + exp(4*x*exp(-x)/(exp(-2*x**2/(x + 1)) + exp(-x))))*exp(-4*x)

In [35]:
limit(_, x, oo)


Out[35]:
1

Eqn 8.17


In [36]:
exp(x*exp(-x)/(exp(-x)+exp(-2*x**2/(x+1))))/exp(x)


Out[36]:
exp(-x)*exp(x*exp(-x)/(exp(-2*x**2/(x + 1)) + exp(-x)))

In [37]:
limit(_, x, oo)


Out[37]:
1

Eqn 8.18


In [38]:
(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


Out[38]:
x - exp(x) + exp(2*x/(1 + exp(-x)))*exp(-x/(1 + exp(-x/(1 + exp(-x)))))*exp(exp(-x/(1 + exp(-x))))*exp(exp(-x + exp(-x/(1 + exp(-x)))))

In [39]:
limit(_, x, oo)


Out[39]:
2

Eqn 8.19


In [40]:
log(x)*(log(log(x)+log(log(x))) - log(log(x))) / (log(log(x)+log(log(log(x)))))


Out[40]:
(log(log(x) + log(log(x))) - log(log(x)))*log(x)/log(log(x) + log(log(log(x))))

In [41]:
limit(_, x, oo)


Out[41]:
1

Eqn 8.20


In [42]:
exp((log(log(x+exp(log(x)*log(log(x)))))) / (log(log(log(exp(x)+x+log(x))))))


Out[42]:
exp(log(log(x + exp(log(x)*log(log(x)))))/log(log(log(x + exp(x) + log(x)))))

In [43]:
limit(_, x, oo)


Out[43]:
E

The following examples show limit computation on special functions (from Gruntz' thesis p. 126)

Eqn 8.21


In [44]:
exp(x)*(sin(1/x+exp(-x))-sin(1/x+exp(-x**2)))


Out[44]:
(sin(exp(-x) + 1/x) - sin(exp(-x**2) + 1/x))*exp(x)

In [45]:
limit(_, x, oo)


Out[45]:
1

Eqn 8.22


In [46]:
exp(exp(x)) * (exp(sin(1/x+exp(-exp(x)))) - exp(sin(1/x)))


Out[46]:
(-exp(sin(1/x)) + exp(sin(exp(-exp(x)) + 1/x)))*exp(exp(x))

In [47]:
limit(_, x, oo)


Out[47]:
1

Eqn 8.23


In [48]:
(erf(x-exp(-exp(x))) - erf(x)) * exp(exp(x)) * exp(x**2)


Out[48]:
(-erf(x) + erf(x - exp(-exp(x))))*exp(x**2)*exp(exp(x))

In [49]:
limit(_, x, oo)


Out[49]:
-2/sqrt(pi)

Eqn 8.24


In [50]:
(Ei(x-exp(-exp(x))) - Ei(x)) *exp(-x)*exp(exp(x))*x


Out[50]:
x*(-Ei(x) + Ei(x - exp(-exp(x))))*exp(-x)*exp(exp(x))

In [51]:
limit(_, x, oo)


Out[51]:
-1

Eqn 8.25


In [52]:
exp((log(2)+1)*x) * (zeta(x+exp(-x)) - zeta(x))


Out[52]:
(-zeta(x) + zeta(x + exp(-x)))*exp(x*(log(2) + 1))

In [53]:
#limit(_, x, oo)

Eqn 8.26


In [54]:
exp(x)*(gamma(x+exp(-x)) - gamma(x))


Out[54]:
(-gamma(x) + gamma(x + exp(-x)))*exp(x)

In [55]:
limit(_, x, oo)


Out[55]:
oo

Eqn 8.27


In [56]:
exp(gamma(x-exp(-x))*exp(1/x)) - exp(gamma(x))


Out[56]:
exp(exp(1/x)*gamma(x - exp(-x))) - exp(gamma(x))

In [57]:
#limit(_, x, oo)

Eqn 8.28


In [58]:
(gamma(x+1/gamma(x)) - gamma(x)) / log(x)


Out[58]:
(-gamma(x) + gamma(x + 1/gamma(x)))/log(x)

In [59]:
limit(_, x, oo)


Out[59]:
1

Eqn 8.29


In [60]:
x * (gamma(x-1/gamma(x)) - gamma(x) + log(x))


Out[60]:
x*(log(x) - gamma(x) + gamma(x - 1/gamma(x)))

In [61]:
limit(_, x, oo)


Out[61]:
1/2

Eqn 8.30


In [62]:
((gamma(x+1/gamma(x)) - gamma(x))/log(x) - cos(1/x))*x*log(x)


Out[62]:
x*((-gamma(x) + gamma(x + 1/gamma(x)))/log(x) - cos(1/x))*log(x)

In [63]:
limit(_, x, oo)


Out[63]:
-1/2

Eqn 8.31


In [64]:
gamma(x+1)/sqrt(2*pi) - exp(-x)*(x**(x+S(1)/2) + x**(x-S(1)/2)/12)


Out[64]:
-(x**(x - 1/2)/12 + x**(x + 1/2))*exp(-x) + sqrt(2)*gamma(x + 1)/(2*sqrt(pi))

In [65]:
limit(_, x, oo)


Out[65]:
oo

Eqn 8.32


In [66]:
log(gamma(gamma(x)))/exp(x)


Out[66]:
exp(-x)*log(gamma(gamma(x)))

In [67]:
limit(_, x, oo)


Out[67]:
oo

Eqn 8.33


In [68]:
exp(exp(digamma(digamma(x))))/x


Out[68]:
exp(exp(polygamma(0, polygamma(0, x))))/x

In [69]:
limit(_, x, oo)


Out[69]:
exp(-1/2)

Eqn 8.34


In [70]:
exp(exp(digamma(log(x))))/x


Out[70]:
exp(exp(polygamma(0, log(x))))/x

In [71]:
limit(_, x, oo)


Out[71]:
exp(-1/2)

Eqn 8.35


In [72]:
exp(exp(exp(digamma(digamma(digamma(x))))))/x


Out[72]:
exp(exp(exp(polygamma(0, polygamma(0, polygamma(0, x))))))/x

In [73]:
limit(_, x, oo)


Out[73]:
0

Eqn 8.36


In [74]:
besselj(2,x)*exp(x*(2*log(2+sqrt(3))-sqrt(3)))*sqrt(x)


Out[74]:
sqrt(x)*exp(x*(-sqrt(3) + 2*log(sqrt(3) + 2)))*besselj(2, x)

In [75]:
#limit(_, x, oo)

Eqn 8.37


In [76]:
Max(x, exp(x))/log(Min(exp(-x), exp(-exp(x))))


Out[76]:
Max(x, exp(x))/log(Min(exp(-x), exp(-exp(x))))

In [77]:
#limit(_, x, oo)

Some other examples


In [78]:
digamma(digamma(digamma(x)))


Out[78]:
polygamma(0, polygamma(0, polygamma(0, x)))

In [79]:
limit(_, x, oo)


Out[79]:
oo

In [80]:
loggamma(loggamma(x))


Out[80]:
loggamma(loggamma(x))

In [81]:
limit(_, x, oo)


Out[81]:
oo