# Rate of convergence of $\left[1+\frac{a}{x}\right]^x$ to $\operatorname{exp}[a]$ as $x\rightarrow\infty$

It's well-known that $\lim_{x\rightarrow\infty}\left[1+\frac{a}{x}\right]^x=\operatorname{exp}[a]$. I am wondering how fast does the limit converge as $x$ increases, and how the speed of convergence depends on $a$. That is, I would like to find out what $f(x,a)$ is where:

$$\left|\left[1+\frac{a}{x}\right]^x-\operatorname{exp}[a]\right|=\mathcal{O}(f(x,a))$$

However, I'm having trouble evaluating that absolute value. Any tips? Perhaps this a known result...

-
Take logarithms, set $h = 1/x$, and turn it into a question about the rate of convergence of $\frac{\log 1+ha)}{h} - a$. This last expression is $O(ha^2/2)$, so your $f$ is something like $f(x,a) = \frac{a^2}{2x}$. –  Hans Engler Dec 15 '12 at 22:31
$$\left(1+\frac{a}{x}\right)^x=\exp\left(x\ln\left(1+\frac{a}{x}\right)\right).$$ When $x\gg a$, expand the logarithm in a series, giving $$\left(1+\frac{a}{x}\right)^x\approx\exp\left(x\left[\frac{a}{x}-\frac{a^2}{2x^2}\right]\right)=e^a\cdot e^{-a^2/2x}\approx e^a\left(1-\frac{a^2}{2x}\right).$$ So it seems the answer to your question is $$f(x,a)=\frac{a^2 e^a}{2x}.$$