# Uniform variant of Stirling's approximation

Stirling's formula is usually stated in the form $\log \Gamma(s) = (s-\frac12) \log{s} - s + \log\sqrt{2\pi} + E(s)$, where $E(s) = c_1/s + c_2/s^2 + \dots + O(s^{-K})$ for certain absolute constants $c_i$. I am interested in having a uniform approximation for $E(s)$ that is valid for all $s = \sigma + it$ with $\sigma>0$ fixed and $|t| \leq X$ for $X \geq 1$. Does there exist a known "nice" approximation for $E(s)$ of the form $E(s) = F(s) + O(X^{-K})$, where $F(s)$, which depends on $K$ and $X$ of course, has an explicit shape? Bonus points for explicit bounds
on $F(s)$ and its derivatives uniformly valid in $|t| \leq X$.

EDIT ADDED July 28 2010: I am doubtful if there is a positive answer to my question. As a simple example, consider the rate of convergence of the Taylor series of the cosine function. Of course, $\cos(x) = 1- \frac{x^2}{2!} + \frac{x^4}{4!} - \dots \pm \frac{x^{2k}}{(2k)!} + R_{2k}(x)$ where $R_{2k}(x) = \cos^{(2k+1)}(\xi) \frac{x^{2k+1}}{(2k+1)!}$ for some $|\xi| \leq |x|$. In order to get an error term that is $O(X^{-K})$ uniformly for $|x| \leq X$ we need to take $k$ roughly on the order of $X$ (since that is when the factorial in the denominator wins over the size of $X^{2k+1}$); at this point the error term gets very small very fast . This is a lot of terms!

• The uniform bound can be given only for $\sigma>0$. They are discussed in books on asymptotic methods (for example, de Brjin's). I don't think that "analytic nt" is a suitable tag here. Jun 15 '10 at 15:27
• I'm happy to assume $\sigma > 0$; I'll edit the question. As for the tag, I think the question is of interest to analytic number theorists. Jun 15 '10 at 17:01
• As far as I remember the expansion of $E(s)$ is asymptotic only, so you really need something like Pade approximations to it. These things were discussed in old book by Luke on special functions but could be also in the special literature on Pade approximations. I simply recommend you to explore more in this direction, it's really a narrow analytic question. Jun 16 '10 at 2:32
• Why are you unable to use the asymptotic expansion for log Gamma(z) halfway down the wikipedia page on Stirling's approximation? It holds in the plane with any thin sector around the negative x-axis taken out. In Washington's book on cyclotomic fields (pp. 58--59 of the 2nd edition) he says the asymptotic expansion can be differentiated termwise and it is still valid as an asymptotic expansion of the corresponding derivative of log Gamma(z). Jul 28 '10 at 3:10
• @KConrad: The problem with that asymptotic expansion is that if I truncate the series at the K-th term then the error term is of size O(z^{-K}), which does not go to zero when z is fixed. What I wanted was an error term that goes to zero uniformly in some range $|t| \leq X$ as $X$ gets big. Jul 28 '10 at 14:37

• An approximation for gamma itself is fine. The wikipedia article on the Lanczos approximation didn't give enough information to decide if it was useful. I'd need to know how many terms to truncate the sum to get a very good error of size $O(X^{-K})$. Similarly, Spouge's approximation seemed to require $a$ on the order of $\log{X}$ to get this error, but then the large size of $c_k$ dwarfs the error term. Jun 16 '10 at 0:25