16
$\begingroup$

While thinking of 71432, I encountered the following integral: $$ \mathcal{I}_n = \int_0^\infty \left( 1 + \frac{x}{n}\right)^{n-1} \mathrm{e}^{-x} \, \mathrm{d} x $$ Eric's answer to the linked question implies that $\mathcal{I}_n \sim \sqrt{\frac{\pi n}{2}} + O(1)$.

How would one arrive at this asymptotic from the integral representation, without reducing the problem back to the sum ([added] i.e. expanding $(1+x/n)^{n-1}$ into series and integrating term-wise, reducing the problem back to the sum solve by Eric) ?

Thanks for reading.

  • 0
    what if expand brackets and write series in Gamma-functions?2011-10-10
  • 0
    @Gortaur In that case we would arrive back to the sum Eric dealt with. I am hoping for something like a saddle point approximation approach.2011-10-10
  • 0
    I see, sorry - didn't understand which sum you tried to avoid2011-10-10
  • 1
    Not sure, if it counts, but your integral evaluates as $n\exp(n) E_{1-n}(n)$, where $E_p(z)$ is the generalized exponential integral. If you use [this expansion](http://dlmf.nist.gov/8.19.E11) along with Stirling, you obtain $\sqrt{2\pi n}$ as the first term...2011-10-10
  • 0
    @J.M. Nice, I knew the expression in terms of the exponential integral $E_p(z)$. I am not sure if applies though, when both $z$ and $p$ are large, although it seems very likely.2011-10-10
  • 0
    As long as $p$ isn't a positive integer, and $|\arg z| \leq \pi$, then it looks to be valid.2011-10-10
  • 3
    For what it's worth, this integral and its relationship to the sum in Question 71432 is mentioned in Flajolet, Grabner, Kirschenhofer, and Prodinger, "[On Ramanujan's Q-Function](http://algo.inria.fr/flajolet/Publications/FlGrKiPr95.pdf)" (*Journal of Computational and Applied Mathematics* 58 (1995), 103-116).2011-10-10
  • 0
    @Mike: that is a fascinating paper; thanks for finding! I'll only note that the function denoted $y(z)$ in section 2 of the paper is what would now be denoted as $-W(-z)$, where $W(z)$ is the Lambert function...2011-10-10
  • 0
    @J.M.: It was actually sitting on my desk! I had dug it up a while back when I was thinking about some other math.SE question related to the $Q$ function - probably [this one](http://math.stackexchange.com/questions/29534/how-to-show-that-sum-limits-k-1n-1-frackkn-kn-is-asymptotically). I hadn't gotten around to filing it yet. :)2011-10-10

4 Answers 4

15

With the change of variables $x\to(n-1)t-1$, we get $$ \begin{align} &\int_0^\infty\left(1+\frac{x}{n}\right)^{n-1}e^{-x}\;\mathrm{d}x\\ &=ne\left(1-\frac{1}{n}\right)^n\int_\frac{1}{n-1}^\infty e^{-(n-1)(t-\log(1+t))}\;\mathrm{d}t\tag{1}\\ \end{align} $$ Since $$ 1+n\log\left(1-\frac{1}{n}\right)=-\frac{1}{2n}-\frac{1}{3n^2}+O\left(\frac{1}{n^3}\right) $$ exponentiating and multiplying by $n$, we get $$ \begin{align} ne\left(1-\frac{1}{n}\right)^n &=ne^{-\frac{1}{2n}-\frac{1}{3n^2}+O\left(\frac{1}{n^3}\right)}\\ &=n-\frac{1}{2}-\frac{5}{24n}+O\left(\frac{1}{n^2}\right)\tag{2} \end{align} $$ Note that $$ \begin{align} \int_0^\frac{1}{n-1} e^{-(n-1)(t-\log(1+t))}\;\mathrm{d}t &=\int_0^\frac{1}{n-1}\left(1-\tfrac{n-1}{2}t^2+\tfrac{n-1}{3}t^3+\tfrac{(n-1)^2}{8}t^4\right)\;\mathrm{d}t+O\left(\tfrac{1}{n^4}\right)\\ &=\frac{1}{n-1}-\frac{1}{6(n-1)^2}+\frac{13}{120(n-1)^3}+O\left(\frac{1}{n^4}\right)\\ &=\frac{1}{n}+\frac{5}{6n^2}+\frac{31}{40n^3}+O\left(\frac{1}{n^4}\right)\tag{3} \end{align} $$ Finally, setting $\frac{u^2}{2}=t-\log(1+t)$, so that $t=u+\frac{u^2}{3}+\frac{u^3}{36}-\frac{u^4}{270}+\frac{u^5}{4320}+\frac{u^6}{17010}+O(u^7)$, we get $$ \begin{align} &\int_0^\infty e^{-(n-1)(t-\log(1+t))}\;\mathrm{d}t\\ &=\int_0^\infty e^{-(n-1)u^2/2}\;\mathrm{d}t\\ &=\int_0^\infty e^{-(n-1)u^2/2}\;(1+\frac{2u}{3}+\frac{u^2}{12}-\frac{2u^3}{135}+\frac{u^4}{864}+\frac{u^5}{2835}+O(u^6))\;\mathrm{d}u\\ &=\sqrt{\tfrac{\pi}{2(n-1)}}+\tfrac{2}{3(n-1)}+\sqrt{\tfrac{\pi}{288(n-1)^3}}-\tfrac{4}{135(n-1)^2}+\sqrt{\tfrac{\pi}{165888(n-1)^5}}+\tfrac{8}{2835(n-1)^3}+O\left(\tfrac{1}{n^{7/2}}\right)\\ &=\sqrt{\tfrac{\pi}{2n}}\left(1+\tfrac{7}{12n}+\tfrac{145}{288n^2}\right)+\left(\tfrac{2}{3n}+\tfrac{86}{135n^2}+\tfrac{346}{567n^3}\right)+O\left(\tfrac{1}{n^{7/2}}\right)\tag{4} \end{align} $$ Combining $(3)$ and $(4)$, we get $$ \int_\frac{1}{n-1}^\infty e^{-(n-1)(t-\log(1+t))}\;\mathrm{d}t=\sqrt{\tfrac{\pi}{2n}}\left(1+\tfrac{7}{12n}+\tfrac{145}{288n^2}\right)-\left(\tfrac{1}{3n}+\tfrac{53}{270n^2}+\tfrac{3737}{22680n^3}\right)+O\left(\tfrac{1}{n^{7/2}}\right) $$ Including $(2)$, yields $$ \int_0^\infty\left(1+\frac{x}{n}\right)^{n-1}e^{-x}\;\mathrm{d}x=\sqrt{\tfrac{n\pi}{2}}\left(1+\tfrac{1}{12n}+\tfrac{1}{288n^2}\right)-\left(\tfrac{1}{3}+\tfrac{4}{135n}-\tfrac{8}{2835n^2}\right)+O\left(\tfrac{1}{n^{5/2}}\right) $$

  • 0
    Added a bit more of the asymptotic expansion2011-10-10
  • 0
    Your edited answer is close, but doesn't quite agree with the published result in Flajolet, et al, mentioned in my comment on the original question. (The integral is equal to $Q(n)$ in their paper; see Theorem 2.)2011-10-10
  • 0
    @Mike: Thanks! I found the error; I had multiplied two terms instead of adding them. I have double checked the rest, too.2011-10-10
  • 0
    You're welcome, and nice work, by the way!2011-10-11
  • 0
    Doing a numerical check, I found an error in the sixth order $\left(\frac{1}{n^2}\right)$ term. Now things seem correct. The error term is approximately $\frac{1}{300n^{5/2}}$.2011-10-11
5

A related result was given in the problems column of the American Mathematical Monthly not too long ago. This is problem 11353 whose solution was published in the January 2010 issue.

Let $$g(s)=\int_0^\infty \left(1+{x\over s}\right)^se^{-x}\, dx-\sqrt{s\pi\over 2}.$$ Show that $g(s)$ decreases from $1$ to $2/3$ as $s$ ranges from $0$ to $\infty$.

Note that the exponent in the integral is $s$, not $s-1$.

  • 3
    Note that by-parts gives $$\int_0^\infty\left(1+\frac{x}{s}\right)^{s-1}e^{-x}dx=1+\int_0^\infty\left(1+\frac{x}{s}\right)^se^{-x}dx.$$2011-10-10
  • 0
    @anon: Since my answer gives $-\frac{1}{3}$, I checked and I believe that your limits on the boundary terms are switched. I get $$\int_0^\infty\left(1+\frac{x}{s}\right)^{s-1}e^{-x}dx=-1+\int_0^\infty\left(1+\frac{x}{s}\right)^se^{-x}dx.$$2011-10-10
  • 0
    @robjohn: whoops, you are correct.2011-10-10
  • 0
    @Byron: is their solution simpler in nature than mine? They needn't carry out as many terms as I did, but other than that, is the idea of theirs simpler?2011-10-10
  • 0
    @robjohn No, I wouldn't call their solution *simple*. It uses similar ideas to yours, but needs extra care in showing that $g(s)$ is decreasing.2011-10-10
3

Interesting. I've got a representation $$ \mathcal{I}_n = n e^n \int_1^\infty t^{n-1} e^{- nt}\, dt $$ which can be obtained from yours by the change of variables $t=1+\frac xn$. After some fiddling one can get $$ 2\mathcal{I}_n= n e^n \int_0^\infty t^{n-1} e^{- nt}\, dt+o(\mathcal{I}_n)= n^{-n} e^n \Gamma(n+1)+\ldots=\sqrt{2\pi n}+\ldots. $$

  • 0
    Thank you, could you elaborate a little on the fiddling needed ?2011-10-10
  • 1
    Briefly it's like follows. Consider function $g_n(t)=n e^n t^{n-1}e^{-nt}$, so $\mathcal{I}_n=\int_1^\infty g_n(t)\, dt\ $. The maximum of $g_n$ tends to $1$n as $n\to\infty$. For $\varepsilon\in(0,1)$ $\int_{[0,+\infty]\backslash [1-\varepsilon,1+\varepsilon]\ }g_n(t)\, dt=o(1)\ $, $n\to\infty\ $. So it is enough to consider $\int_{1-\varepsilon}^{1+\varepsilon}g_n(t)$. Also $g(1-t)=e^{2 n t}\left(\frac{1-t}{1+t}\right)^{n-1}g(1+t)\ \;$. The factor of $g$ in the rhs is small for small values of $t$ so the graphic of $g(1+t)$ is sort of symmetric around $t=0$.2011-10-10
  • 0
    Hence $$ \int_{0}^{\varepsilon}g_n(1-t)=\int_0^{\varepsilon}g_n(1+t)+ \int_0^{\varepsilon}\left(1-e^{2 n t}\left(\frac{1-t}{1+t}\right)^{n-1}\right)g(1+t)= $$ $$ \int_0^{\varepsilon}g_n(1+t)+O(\mathcal{I}_n). $$2011-10-10
2

I shifted the function by a unit since it won't effect the asymptotics and I'd like the global maximum to occur at $x=0$.

$$ \mathcal{I}_n \sim \int^{\infty}_0 \left( 1 + \frac{x-1}{n} \right)^{n-1} e^{-(x-1) } dx $$

$$\left( 1 + \frac{ x-1}{n} \right)^{n-1} e^{-(x-1) } = e \left( 1 - \frac{1}{n} \right)^{n-1} \left( 1 - \frac{x^2}{2(n-1)} + \cdots \right)$$

$$ \approx e \left(1 - \frac{1}{n} \right)^{n-1} \exp\left(\frac{-x^2}{2(n-1)} \right) $$

so $$ \mathcal{I}_n \sim e\left( 1 -\frac{1}{n}\right)^{n-1} \int^{\infty}_0 \exp\left( \frac{-x^2}{2(n-1)} \right) dx $$

$$ = e\left( 1 -\frac{1}{n}\right)^{n-1} \sqrt{\pi(n-1)/2} \sim \sqrt{\pi n/2}$$

  • 0
    But the fist integral diverges for all $n$ (for $x \to \infty$)2011-10-10
  • 0
    @RagibZaman Do you mean to write $\left(1 + \frac{\vert x-1\vert}{n}\right)^{n-1} \exp( - \vert x-1 \vert )$ ? Otherwise the first line contains a divergent integral for finite $n$.2011-10-10
  • 0
    Sorry, I hadn't noticed that. Of course you are correct @Sasha, I will correct it now.2011-10-10
  • 0
    The easiest fix up ended up being just to integrate over the positive reals, so I just did that in the end, @Sasha.2011-10-10
  • 0
    @Ragib, I wonder if this is meant as a proof, or as an indication of what causes the asymptotics of $I_n$.2011-10-10
  • 0
    @DidierPiau , The latter. The dodgy step is approximating the series above by the exponential. I've learned this "method" on this very website, and the users have always said "it's easy to justify this works" but to be honest, I have no idea how to justify it myself. It seems like it actually should be possible though, the intuition behind it seems sound.2011-10-10
  • 0
    To escape dodginess, you could try looking for rigorous approaches of the [Laplace's method](http://en.wikipedia.org/wiki/Laplace%27s_method) (note that this WP has a statement with no proof, and references). (But your shift of the function by a unit escapes me. First, the change of variables should modify the bounds of the integral, and second, AFTER the change, the global maximum is at $x=1$, not $x=0$.)2011-10-11
  • 0
    @DidierPiau, I computed (and Mathematica agrees) that $ \frac{d}{dx} \left(1+\frac{x-1}{n} \right)^{n-1} e^{-(x-1)} = \frac{ -n e^{-(x-1)} x (1 + (x-1)/n)^n }{(n+x-1)^2} $ which implies the global maximum is at $x=0$ after my shift. Also, I didn't shift the lower bound of the integral because it wouldn't change the asymptotic result and it was easier to calculate the integral over $[0,\infty)$ like I did. Thanks for the reference to Laplace's method, I'll read into it!2011-10-11
  • 0
    Sure, except that the first integral starts at $x=0$ hence the integral over your $x'=x+1$ should start at $x'=1$. Furthermore the global maximum is at $x=0$, that is, $x'=1$, and not at $x'=0$ which is not even in the interval of integration. Adding this $(-1,0)$ interval to the integral could change its asymptotics, especially since the function is greater on $(-1,0)$ than anywhere else. .../...2011-10-11
  • 0
    .../... The relevant maximum value of the function is $1$ (at $x=0$) and the one you use is $M_n=e(1-1/n)^{n-1}$ (at $x=-1$). Naturally, $M_n>1$ but what saves you is that $M_n\to1$ when $n\to\infty$, otherwise you would be off by a factor of $M_n$, which could be exponentially large. Lucky guy!2011-10-11