6.77 asymptotics of ln(ln(x)+a) (15.4.96)

6.77.1 Sjoerd W. Rienstra


gives a correct asymptotic series for large x. However,


gives only the trivial answer, i.e. the same. How do I convince Maple that \(\ln (x)\) also becomes large if \(x\) is large?

6.77.2 Robert Israel (25.4.96)

As far as I know, asympt(f(x), x, n), which is essentially the same as subs(t=1/x, series(f(1/t), t, n)), is supposed to do its calculations using all terms that are O(1/x^(n-epsilon)) for epsilon > 0 (i.e. it won’t include terms like ln(x)/x^n), but will include x^(-n+1/10)). The asymptotic series you want is

                               2            3            4 
                  a           a            a            a 
    ln(ln(x)) + ----- - 1/2 ------ + 1/3 ------ - 1/4 ------ + ... 
                ln(x)            2            3            4 
                            ln(x)        ln(x)        ln(x)

which would have infinitely many terms that are not O(1/x^p) for any p > 0. So that does not really fit the job description for "asympt". Anyway, you can get your series by

subs(u = ln(x), asympt(ln(u+a), u));

6.77.3 Gerald A. Edgar (26.4.96)

What would you like the answer to be? Presumably you do not object if asympt(x^2,x) returns x^2 ... Similarly, ln(ln(x)+a) is one of the basic types that Maple uses. Examples:

> asympt(ln(ln(x)+a),x); 
                          ln(ln(x) + a) 
> asympt(ln(ln(2*x)),x); 
                        ln(ln(x) + ln(2)) 
> asympt(ln(ln(x^2)),x); 
                           ln(2 ln(x)) 
> asympt(ln(ln(3*x^2+2*x-2)),x,2); 
                                      2                 1 
      ln(ln(3) + 2 ln(x)) + --------------------- + O(----) 
                            3 (ln(3) + 2 ln(x)) x       2 

6.77.4 Sjoerd W. Rienstra (14.5.96)

I would like to thank the MUG contributors Robert Israel and Gerald Edgar for their responses on my question. They explain what happens inside Maple. Nevertheless, I’m not fully convinced that Maple’s results are consistent, and are what they should be.

The argument that Maple only expands in powers of x is probably true in most cases, but not in general. For example,


gives an asymptotic series in powers of exp(x).



gives powers of exp(x), an asymptotic expansion in x in the coefficients of each exp(x), and a seemingly random "order" of the error O([x/exp(x)]^p).

On the other hand, the similar command


does not do a thing, apart from the error message

Error, (in asympt) unable to compute series At the same time,


gives a series in powers of x with ln(x) considered as a constant.

Apparently: in general the asymptotic gauge functions are x^p, and sometimes exp(p*x). Mixed expressions of x and exp(x) can be handled under a logarithm, but not under another power, and ln(x) is ignored as a function of x, and treated as a constant.

I think a more consistent approach would be to consider

(negative powers of ...),..1, ...,ln(ln(x))^p, ln(x)^p, x^p, 
exp(x)^p, exp(x^q)^p, exp(exp(x)^q)^p, ....

as gauge functions. Maybe this is a bit too ambitious, but then at least

exp(-px), x^(-p), ln(x)^(-p), 1, ln(x)^p, x^p, exp(px).

Otherwise, the name "asymptotic expansion" is a bit misleading, and should be something like "Laurent series expansion around infinity".

6.77.5 Gerald A. Edgar (17.5.96)

There is a package (gdev) written by a third party that does certain expansions in Maple. Get info from Bruno Salvy, Bruno.Salvy@inria.fr, or perhaps even on the web at


Here is your example...

> readlib(gdev); 
proc(fct:algebraic) ... end 
> readlib(glimit); 
proc(fct:algebraic) ... end 
> gdev(log(log(x)+a),x=infinity,4); 
                                2            3 
                   a           a            a           1 
     ln(ln(x)) + ----- - 1/2 ------ + 1/3 ------ + O(------) 
                 ln(x)            2            3          4 
                             ln(x)        ln(x)      ln(x)