0
$\begingroup$

In Maple, the command asmypt($f$,$x$) computes the asymptotic expansion of the function $f$ with respect to the variable $x$ (as $x \rightarrow \infty$).

The command

asympt(ln(n)!,n);

gives the error

Error, (in asympt) unable to compute series.

Other functions having non-integer output (such as $\frac{1}{n}$ or $\sqrt{n}$) go through just fine. Is there something mathematically significant about $\ln(n)$ that is causing an error, or is this some peculiarity of Maple? Regardless, what can I do to get asymptotics for this function?

  • 1
    It may be that the factorial function is undefined for non-integer values in MAPLE. For non integer values, use the gamma function where $n!=\Gamma(n+1)$.2012-08-28
  • 0
    @Daryl Maple had no trouble with functions like $\left(\frac{1}{n}\right)!$ or $(\sqrt{n})!$, so the trouble does not seem to lie with evaluating non-integer inputs.2012-08-29

3 Answers 3

1

Asymptotics for $(\log n)!$ are the same as asymptotics for $m!$ where we substitute $m=\log n$ afterward. So Will is right, Stirling's approximation will do it.

In Maple 16...

enter image description here

2

See WIKI. I get $$ (\log n)! \approx \; n^{\log \log n \, - 1} \; \; \sqrt{2 \pi \log n} \; \; \; e^{ \left(\frac{1}{12 \log n} - \frac{1}{360 \, \log^3 n} \right) } $$

Alright, checked with my programmable calculator, which has a factorial function for positive reals. This approximation is really quite good.

1
restart:

asympt(ln(n)!,n);
Error, (in asympt) unable to compute series

asympt(GAMMA(ln(n)+1),n);
Error, (in asympt) unable to compute series

series(ln(n)!,n=infinity);
Error, (in asympt) unable to compute series

series(GAMMA(ln(n)+1),n=infinity);
Error, (in asympt) unable to compute series

unprotect(series):
series:=MultiSeries:-series:
protect(series):

ans1:=series(ln(n)!,n=infinity):
ans2:=series(GAMMA(ln(n)+1),n=infinity):

ans1s:=simplify(ans1) assuming n>0;

                           exp(lnGAMMA(ln(n) + 1))
                  ans1s := -----------------------
                                             (1/2)
                                (1/2) /  1  \     
                           ln(n)      |-----|     
                                      \ln(n)/     

ans2s:=simplify(ans2) assuming n>0;

                           exp(lnGAMMA(ln(n) + 1))
                  ans2s := -----------------------
                                             (1/2)
                                (1/2) /  1  \     
                           ln(n)      |-----|     
                                      \ln(n)/     

evalf[20](eval(ans1,n=900)): evalf[10](%);
                             3393.043111

evalf[20](eval(ans2,n=900)): evalf[10](%);
                             3393.043111

evalf[20](eval(ln(n)!,n=900)): evalf[10](%);
                             3393.043111

evalf[20](eval(GAMMA(ln(n)+1),n=900)): evalf[10](%);
                             3393.043111
  • 0
    I walked to the corner store, and it occurred to me that my answer is pretty silly. Well, that's what I get for not thinking. Sorry.2012-08-29
  • 0
    Actually, the change to MultiSeries:-series allowed my original code to go through unchanged. What is different about that package that could account for this?2012-08-30