MRVLIMIT: A new exp-log limits package
Date: 2020-10-07 18:10:00

Up | Next | Prev | PrevTail | Tail

### 16.42 MRVLIMIT: A new exp-log limits package

Author: Neil Langmead

This package was written when the author was a placement student at ZIB Berlin.

#### 16.42.1 The Exp-Log Limits package

This package arises from the PhD thesis of Dominik Gruntz, of the ETH Zürich. He developed a new algorithm to compute limits of "exp-log" functions. Many of the examples he gave were unable to be computed by the present limits package in REDUCE, the simplest example being the following, whose limit is obviously 0:

load limits;
limit(x^7/e^x,x,infinity);
7
x
limit(----,x,infinity)
x
e

This particular problem arises, because L’Hopital’s rule for the computation of indeﬁnite forms (such as 0∕0, or ) can only be applied in a CAS a ﬁnite number of times, and in REDUCE, this number is 3. Applied 7 times to the above problem would have yielded the correct answer 0. The new algorithm solves this particular problem, and enables the computation of many more limit calculations in REDUCE. We ﬁrst deﬁne the domain in which we work, and then give a statement of the main algorithm that is used in this package.
Deﬁnition:
Let ℜ[x] be the ring of polynomials in x with real coeﬃcients, and let f be an element in this ring. The ﬁeld which is obtained from ℜ[x] by closing it under the operations f → exp(f) and f → log |f| is called the L- ﬁeld (or logarithmico-exponential ﬁeld, or ﬁeld of exp-log functions for short).
Hardy proved that every L function is ultimately continuous, of constant sign, monotonic, and tends to ±∞ or to a ﬁnite real constant as x → +∞.

Here are some examples of exp-log functions, which the package is able to deal with:

f(x) | = ex ∗ log(log(x)) |  |
f(x) | = |  |
f(x) | = log(x)log(x) |  |
f(x) | = ex∗log(x) |  |

#### 16.42.2 The Algorithm

A complete statement of the algorithm now follows: Let f be a log-exp function in x, whose limit we wish to compute as x → x0. The main steps of the algorithm to do this are as follows:

- Determine the set Ω of the most rapidly varying subexpressions of f(x). Limits may have to be computed recursively at this stage.
- Choose an expression ω such that ω > 0, limx→∞ω = 0 and ω is in the same comparability class as any element of Ω. Rewrite the other expressions in Ω as A(x)ωc, where A(x) only contains subexpressions in lower comparability classes than Ω.
- Let f(ω) be the function obtained from f(x) by replacing all elements of Ω by their representation in terms of ω. Consider all expressions independent of ω as constants and compute the leading term of the power series of f(ω) around ω = 0+
- If the leading exponent e0 > 0, then the limit is 0, and we stop. If the leading exponent e0 < 0 then the limit is ±∞. The sign is deﬁned by the sign of the leading coeﬃcient c0. If the leading exponent e0 = 0 then the limit is the limit of the leading coeﬁcient c0. If c0∉C, where C = Const(L), the set of exp-log constants, we apply the same algorithm recursively on c0.

The algorithm to compute the most rapidly varying subset (the mrv set) of a function f is given below:

The function max() computes the maximum of the two sets of expressions. Max() compares two elements of its argument sets and returns the set which is in the higher comparability class or the union of both if they have the same order of variation.
For further details, proofs and explanations of the algorithm, please consult [Gru96].

For example, we have

| mrv(ex) = {ex} |  |
| mrv(log(log(log(x + x2 + x3)))) = {x} |  |
| mrv(x) = {x} |  |
| mrv(ex + e−x + x2 + xlog(x)) = {ex,e−x} |  |
| mrv(ee−x ) = {e−x} |  |

##### 16.42.2.1 Mrv_limit Examples

Consider the following in REDUCE:

mrv_limit(e^x,x,infinity);
infinity
mrv_limit(1/log(x),x,infinity);
0
b:=e^x*(e^(1/x-e^-x)-e^(1/x));
-1 - x
x + x - e
b := e *(e - 1)
mrv_limit(b,x,infinity);
-1
-1
ex:= - log(log(log(log(x))) + log(x)) *log(x)
*(log(log(x)) - log(log(log(x)) + log(x)));
- log(x)*(log(log(x)) - log(log(log(x)) + log(x)))
ex:= -----------------------------------------------------
log(log(log(log(x))) + log(x))
off mcd;
mrv_limit(ex,x,infinity);
1
(log(x+e^-x)+log(1/x))/(log(x)*e^x);
- x -1 -1 - x
e *log(x) *(log(x ) + log(e + x));
mrv_limit(ws,x,infinity);
0
mrv_limit((log(x)*e^-x)/e^(log(x)+e^(x^2)),x,infinity);
0

#### 16.42.3 The tracing facility

The package provides a means of tracing the mrv_limit function at its main steps, and is intended to help the user if he encounters problems. Messages are displayed informing the user which Taylor expansion is being computed, all recursive calls are listed, and the value returned by the mrv function is given. This information is displayed when a switch tracelimit is on. This is oﬀ by default, but can be switched on with the command

on tracelimit;

For a more complete examination of the workings of the algorithm, the user could also try the command

tr mrv_limit;

This is not recommended, as the amount of information returned is often huge and diﬃcult to wade through. Here is a simple example in REDUCE:

Loading image file: /silo/cons/reduce35/Alpha/binary/redu37a.img
REDUCE Development Version, 4-Nov-96 ...
1: load mrvlimit;
2: on tracelimit;
3: mrv_limit(e^x,x,infinity);
mrv_f is {x}
x
After move_up, f is e
-1
performing taylor on: ww
-1
series expansion is ww
-1
series is ww
exponent list is {expt,-1}
leading exponent e0 is {expt,-1}
x
mrv_f is {e }
h is x
mrv_f is {x}
x
After move_up, f is e
-1
performing taylor on: ww
-1
series expansion is ww
-1
series is ww
exponent list is {expt,-1}
leading exponent e0 is {expt,-1}
- x
small has been changed to e
-1
After substitution to ww, f is ww
-1
performing taylor on: ww
-1
series expansion is ww
-1
series is ww
exponent list is {expt,-1}
leading exponent e0 is {expt,-1}
infinity

Note that, due to the recursiveness of the functions mrv and mrv_limit, many calls to each function are made, and information is given on all calls when the tracelimit switch is on.

Up | Next | Prev | PrevTail | Front