6
$\begingroup$

I have two related questions. Both are related to the asymptotics of Stirling's approximation, which is why I have included them in the same question. I will separate the questions if it is deemed necessary.

Consider Stirling's approximation. $$n! = \sqrt{2 \pi n} \left( \frac{n}{e} \right)^n \left( 1 + O \left(\frac{1}{n} \right)\right)$$ $$\lim_{n \rightarrow \infty} \frac{n!}{\sqrt{2 \pi n} \left( \frac{n}{e} \right)^n} = 1$$ The exact terms of the expression are more precisely described by Stirling's series. Unfortunately the series is not convergent so at some point, for each particular $n$ there is a term $a_{f(n)}$ of the expansion at which point summing terms increases the magnitude of relative error.

$f : \mathbb{N}^+ \rightarrow \mathbb{N}$ and for $n$ in the domain, $f(n)$ is defined as rank at which the magnitude of the terms in the asymptotic expansion of the ratio $\frac{n!}{\sqrt{2 \pi n} \left( \frac{n}{e} \right)^n \left(1+ \frac{1}{12n} + \cdots\right)}$ begins to increase.

My first question is what is known about $f(n)$? I believe it is known that $f(n)$ is monotonically increasing. Do we know the asymptotic growth of $f(n)$? If so, is there a known simple closed form expression for $f(n)$?

My second question has to do with error rates of Stirling's approximation and it depends on the first question having been resolved. Of course it is known that in the limit the relative error of approximating the factorial of $n$ approaches $0$. However, if one were to be interested in precisely how quickly the series well approximates the function, simple convergence in the limit is not enough. I would like to know the rate of convergence for the sequence $g(n) = \sum\limits_{i=0}^{f(n)} {a_i}$ in approximating $n!$. (Here $a_i$ are terms of the Stirling series).

  • 0
    Since you are using $O \left(\frac{1}{n} \right)$, you can write equality in $$n! = \sqrt{2 \pi n} \left( \frac{n}{e} \right)^n \left( 1 + O \left(\frac{1}{n} \right)\right)$$ By $f$, do you mean $1 + O \left(\frac{1}{n} \right)$?2011-11-04
  • 0
    I am not sure whether $f(n) = 1 + O(n^{-1})$. What I mean is, at some point summing terms of the Stirling series stops to increase the accuracy of the approximation (for any given $n$). I want to analyze, as $n$ increases, where one needs to stop summing terms of the series to get the best approximation.2011-11-04
  • 0
    Okay, so by $f(n)$, you mean $\frac{n!}{\sqrt{2\pi n}\left(\frac{n}{e}\right)^n}$ which is what I meant by $1+O\left(\frac{1}{n}\right)$.2011-11-04
  • 0
    Formula 6 in the MathWorld entry you linked to gives a few more terms of Stirling's series. [Temme](http://books.google.com/books?id=7dQko2CndYoC&pg=PA64) mentions a few useful estimates for the remainder after truncating the Stirling series2011-11-04
  • 0
    @robjohn: Could you expand more on your reasoning that that $f(n) = 1 + O(n^{-1})$ so that I know what you mean, especially since I would expect the range of $f$ to be $\mathbb{N}$.2011-11-04
  • 0
    @J. M.: Thanks for the link to Temme. I'll look over this material.2011-11-04
  • 0
    @robjohn, I believe $f(n)$ is the rank at which the magnitude of the terms in the asymptotic expansion of the ratio $n!/(\sqrt{2\pi n}(n/e)^n)$ begins to increase. Jason: it would have been simpler to explain this right away.2011-11-04
  • 0
    @Didier Piau: This is the concise way of describing $f(n)$ that I was missing. I will add it to the question. Thanks.2011-11-04
  • 0
    @Didier: thanks for clearing up my confusion. I think that by examining the size of the terms in the Euler-Maclaurin Sum Formula, it seems that $f(n)\sim\pi n$.2011-11-04

3 Answers 3