Gruntz algorithm
An algorithm for limits of exp-log functions, built from x and constants by arithmetic, exp and log, as x tends to infinity. It finds the most rapidly varying subexpressions, rewrites the function as a series in one of them, and reads the limit off the leading term, recursing when that term is itself a function of x.
Functions tending to 0 or are compared through their logarithms. is more rapidly varying than , written , when
and they are in the same comparability class, , when the limit is finite and nonzero. So : every power of is in one class, and are in another above it, and is above both.
For :
The algorithm.
1. Compute the MRV set: the subexpressions of f in the highest comparability class.2. Pick w in that class with w -> 0, and rewrite each element of the set as A * w^c,with A in a lower class.3. Expand f as a series in w: f = c0 * w^e0 + ..., the ci functions of lower class.4. e0 > 0: the limit is 0. e0 < 0: it is +-infinity, with the sign of c0.e0 = 0: it is the limit of c0, computed by the same algorithm.
The recursion ends because each step moves to a strictly lower class. An example from Gruntz's thesis:[1]
The MRV set is . Take , so , and expand:
The leading exponent is 0, so the limit is that of , which is .
f(x) evaluated at 80 significant digits.
x = 10 -1.1051458311x = 20 -1.0512710953x = 40 -1.0253151205x = 80 -1.0125784515
An expansion in powers of cannot do this. Since is smaller than every power of , the bracket expands to zero at every order in , and the factor that makes the product finite is invisible. The series has to be taken in the most rapidly varying quantity, which is what the MRV set provides. The algorithm also has to decide whether the leading coefficient is identically zero, the same zero-equivalence problem that limits the Risch algorithm.
see also
- Risch algorithmA decision procedure for integration in finite terms: given an elementary function, it either finds an elementary antiderivative or proves that none exists. It rests on Liouville's theorem, which fixes the form any elementary antiderivative must have, and works through a tower of logarithmic and exponential extensions of the rational functions.
- Canonical formA representation chosen so that mathematically equal objects are structurally identical. Once expressions have one, deciding equality is a comparison rather than a search, and a zero test is a look at the representation rather than an attempt to prove an identity. It is the property every layer of a CAS is built to preserve.
further reading
- [1]D. Gruntz, On Computing Limits in a Symbolic Manipulation System, PhD thesis, ETH Zürich (1996).
- [2]G. H. Hardy, Orders of Infinity, Cambridge Tracts in Mathematics 12 (1910).